> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/dev-to/article>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/dev-to/article.mdx>

---

# Dev.to Article API

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

`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.

## Request

- **Endpoint:** `GET /v1/dev-to/article`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by id or URL
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/article/get)
- **Platform page:** [/platforms/dev-to](https://www.socialfetch.dev/platforms/dev-to)

## 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.
