articles

Published articles

This endpoint allows the client to retrieve a list of articles.

"Articles" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article 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.

get/api/articles

Query parameters

pageinteger

Pagination page

per_pageinteger

Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.

tagstring

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.

tagsstring

Using this parameter will retrieve articles with any of the comma-separated tags. Articles will be ordered by descending popularity.

tags_excludestring

Using this parameter will retrieve articles that do not contain any of comma-separated tags. Articles will be ordered by descending popularity.

usernamestring

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.

state'fresh' | 'rising' | 'all'

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.

topinteger

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.

collection_idinteger

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

type_ofstring required
idinteger required
titlestring required
descriptionstring required
cover_imagestring url nullable required
readable_publish_datestring required
social_imagestring url required
tag_liststring[] required
tagsstring required
slugstring required
pathstring path required
urlstring url required
canonical_urlstring url required
positive_reactions_countinteger required
public_reactions_countinteger required
created_atstring date-time required
edited_atstring date-time nullable required
crossposted_atstring date-time nullable required
published_atstring date-time required
last_comment_atstring date-time required
published_timestampstring date-time required

Crossposting or published date time

reading_time_minutesinteger required

Reading time, in minutes

Changes