Published articles
This endpoint allows the client to retrieve a list of articles.
"Articles" are all the posts that users create on DEV/Forem that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but are referred to as articles within the code.
By default it will return featured, published articles ordered by descending popularity.
It supports pagination, each page will contain 30 articles by default.
Query Parameter Usage Tips:
- Filtering by Tags:
- Use tag to filter articles containing a single exact tag (e.g. tag=discuss).
- Use tags to retrieve articles containing any of the comma-separated list of tags (e.g. tags=javascript,css).
- Use tags_exclude to filter out articles containing any of the comma-separated list of tags (e.g. tags_exclude=node,java).
- Filtering by User / Organization:
- Use username to retrieve articles belonging to a specific User or Organization. Articles are returned in reverse chronological publication order.
- State Options:
- Use state=fresh to fetch fresh articles.
- Use state=rising to fetch rising/trending articles.
- Combine state=all with username to fetch up to 1000 articles (both published and unpublished) from that user/organization in a single page.
- Top / Popularity:
- Use top=N to return the most popular articles published in the last N days (e.g. top=7 for top articles of the week, top=30 for top of the month). This parameter can be combined with tag to find top articles in a specific niche.
- Collections:
- Use collection_id to retrieve articles belonging to a specific collection/series, sorted chronologically.
Query parameters
Pagination page
Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
Using this parameter will retrieve articles that contain the requested tag. Articles will be ordered by descending popularity.This parameter can be used in conjuction with top.
Using this parameter will retrieve articles with any of the comma-separated tags. Articles will be ordered by descending popularity.
Using this parameter will retrieve articles that do not contain any of comma-separated tags. Articles will be ordered by descending popularity.
Using this parameter will retrieve articles belonging to a User or Organization ordered by descending publication date. If state=all the number of items returned will be 1000 instead of the default 30. This parameter can be used in conjuction with state.
Using this parameter will allow the client to check which articles are fresh or rising. If state=fresh the server will return fresh articles. If state=rising the server will return rising articles. This param can be used in conjuction with username, only if set to all.
Using this parameter will allow the client to return the most popular articles in the last N days. top indicates the number of days since publication of the articles returned. This param can be used in conjuction with tag.
Adding this will allow the client to return the list of articles belonging to the requested collection, ordered by ascending publication date.
Response
A List of Articles