Dev.to

List Dev.to comments

List the comments and replies on a Dev.to post or podcast episode.

GET/v1/dev-to/article/comments
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
4
articleIdintegerquery

Numeric post id.

≥ 1 · ≤ 9007199254740991

podcastEpisodeIdintegerquery

Numeric podcast episode id.

≥ 1 · ≤ 9007199254740991

pageintegerquery

Page of top-level comments (1-1000). Replies come with their comment. Default: 1. A full page may be followed by an empty page when the list ends exactly at a page boundary.

≥ 1 · ≤ 1000

limitintegerquery

Top-level comments per page (1-1000). Default: 30. Replies are not counted.

≥ 1 · ≤ 1000

Response fields
25

Endpoint-specific response payload.

Comments in reading order: each top-level comment followed by its replies. Use `parentId` and `depth` to rebuild the tree. Empty both for a post with no comments and for an id that does not exist; for a post, look it up to tell them apart.

datacomments[]id
string

Comment id, the short code used in comment URLs (`https://dev.to/{username}/comment/{id}`).

datacomments[]parentId
stringnullable

Id of the comment this one replies to, or null at the top.

datacomments[]depth
integer

Nesting level: 0 for a top-level comment, 1 for a reply.

≥ 0

datacomments[]createdAt
stringnullable

When the comment was posted (ISO-8601).

datacomments[]bodyHtml
string

Comment body as HTML.

datacomments[]aiDisclosure
stringnullable

The author's AI disclosure for the comment.

Who wrote the comment, or null when the account is gone.

datacomments[]authorid
integernullable

Numeric user id.

datacomments[]authorusername
string

Username, e.g. `ben`.

datacomments[]authorname
stringnullable

Display name.

datacomments[]authoravatarUrl
stringnullable

Profile picture URL.

datacomments[]authorwebsiteUrl
stringnullable

Website the user lists on their profile.

datacomments[]authortwitterUsername
stringnullable

Twitter or X username the user lists.

datacomments[]authorgithubUsername
stringnullable

GitHub username the user lists.

datatopLevelCount
integer

Top-level comments on this page.

≥ 0

Pagination state for the current page. A full page may be followed by an empty page when the list ends exactly at a page boundary.

datapagepage
integer

Current page number (1-based).

≥ 0

datapagehasMore
boolean

Whether another page is available. A full page may be followed by an empty page when the list ends exactly at a page boundary.

datapagenextPage
integernullable

Next page number when more pages exist; null on the last page.

≥ 0

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/dev-to/article/comments?articleId=207638" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Comment listing.