Dev.to Comments API
Every comment under a post or podcast episode, flat in reading order with its parent and depth.
GET /v1/dev-to/article/comments1 credit Failed requests are free
About this endpoint
GET /v1/dev-to/article/comments takes exactly one of articleId or podcastEpisodeId and returns comments in reading order: each top-level comment immediately followed by its replies. parentId and depth are on every row, and depth is 0 for a top-level comment and 1 for a reply, which is enough to rebuild the tree without another call.
topLevelCount counts the top-level comments on this page. Replies are not counted against limit, so raise limit when a thread is reply-heavy. An unknown id and a post with no comments both return an empty list, so use the post route when you also need to know whether the post exists.
Dev.to Comments API FAQ
How do I rebuild the reply tree?
Group rows by parentId. A row with depth 0 has no parent; a reply points at the id of the comment above it. Rows arrive in reading order, so the tree is stable without extra sorting.
How many credits does a comments page cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.
Can I get comments for a podcast episode?
Yes. Send podcastEpisodeId instead of articleId. The response shape is the same flat list.
Why is the list empty?
Either the post has no comments or the id does not exist. This route returns an empty list for both, so check the post first when the difference matters.