Dev.to hub

Dev.to Article API

One post with its full body, author and engagement counts, as plain JSON.

GET /v1/dev-to/article

1 credit Failed requests are free

About this endpoint

GET /v1/dev-to/article takes exactly one of id (the numeric post id) or url (a Dev.to post URL such as https://dev.to/lydiahallie/javascript-visualized-event-loop-3dif) and returns the post in article. The body is available twice: bodyMarkdown when you want the author's source text and bodyHtml when you want to render it.

Around the body, the post carries title, tags, publishedAt, editedAt, readingTimeMinutes, reactionsCount, commentsCount, coverImage, canonicalUrl, seriesId, aiDisclosure and the author or organization it belongs to. The response is HTTP 200 for every outcome, so branch on lookupStatus: when it is not_found, article is null.

Dev.to Article API FAQ

Should I send an id or a URL?

Either one, but exactly one. id is the numeric post id, for example 207638. url is the full post URL. Sending both, or neither, is a validation error.

How many credits does a post lookup 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.

Why is article null?

lookupStatus is not_found when the post does not exist, was deleted, or is unpublished. HTTP 200 only means the request finished, so check lookupStatus before storing the row.

Can I get Markdown instead of HTML?

Both are returned on the same response. Use bodyMarkdown to keep the author's source and bodyHtml to render the post without converting it yourself.