> **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>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/dev-to.mdx>

---

# Dev.to API. Developer writing as JSON.

Posts, full article bodies, comments, profiles, organizations, tags and the home feed from Dev.to, in one JSON shape with one API key.

- 21 routes
- Full post bodies
- 1 credit per request

Social Fetch covers Dev.to with 21 routes under `/v1/dev-to`, all on the same `{ data, meta }` envelope. `/v1/dev-to/articles` lists the front page, a tag, a user, a series or the most-reacted posts of the last N days. `/v1/dev-to/articles/search` searches titles, tags and bodies with a `query`, and `/v1/dev-to/article` returns one post with `bodyHtml` and `bodyMarkdown`.

People have their own routes. `/v1/dev-to/user` gives the basic account, `/v1/dev-to/user/profile` adds `postsPublished`, `commentsWritten`, `tagsFollowed`, `badges`, `pinnedPosts` and `githubRepositories`, while `/v1/dev-to/organization` and `/v1/dev-to/organization/members` cover teams. Comments come back in reading order with `parentId` and `depth`, so you can rebuild a thread from one flat list, and `/v1/dev-to/comment` returns one comment with its replies.

The catalog routes help you decide what to read next: `/v1/dev-to/tags`, `/v1/dev-to/tag`, `/v1/dev-to/trends`, `/v1/dev-to/trend`, `/v1/dev-to/feed`, `/v1/dev-to/videos`, `/v1/dev-to/podcast/episodes`, `/v1/dev-to/podcast/episode`, `/v1/dev-to/events` and `/v1/dev-to/communities`. Lookups answer HTTP 200 with `data.lookupStatus` set to `found` or `not_found`, and every list carries a `page` block with `page`, `hasMore` and `nextPage`.

## What you can get

- Posts with `title`, `tags`, `reactionsCount`, `commentsCount`, `readingTimeMinutes`, `publishedAt` and the `author`.
- Full post bodies as `bodyHtml` and `bodyMarkdown` from the single-post route.
- Keyword search with `query`, an optional `top` window, and `limit` up to 1000.
- Flat comment lists in reading order with `parentId`, `depth` and `topLevelCount`.
- Profiles with counts, badges, pinned posts and the public repositories the user chose to show.
- Organizations with `memberCount`, `postsPublished`, `techStack`, `location` and `contactEmail`.

## Dev.to endpoints

| Endpoint | Request | Credits | Docs |
| --- | --- | --- | --- |
| Post | GET /v1/dev-to/article | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/article/get) |
| Posts | GET /v1/dev-to/articles | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/articles/get) |
| Search posts | GET /v1/dev-to/articles/search | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/articles/search/get) |
| Comments | GET /v1/dev-to/article/comments | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/article/comments/get) |
| Comment | GET /v1/dev-to/comment | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/comment/get) |
| Post details | GET /v1/dev-to/article/details | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/article/details/get) |
| User | GET /v1/dev-to/user | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/user/get) |
| Profile | GET /v1/dev-to/user/profile | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/user/profile/get) |
| Organization | GET /v1/dev-to/organization | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/organization/get) |
| Organization members | GET /v1/dev-to/organization/members | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/organization/members/get) |
| Organizations | GET /v1/dev-to/organizations | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/organizations/get) |
| Tags | GET /v1/dev-to/tags | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/tags/get) |
| Tag | GET /v1/dev-to/tag | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/tag/get) |
| Videos | GET /v1/dev-to/videos | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/videos/get) |
| Trends | GET /v1/dev-to/trends | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/trends/get) |
| Trend | GET /v1/dev-to/trend | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/trend/get) |
| Events | GET /v1/dev-to/events | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/events/get) |
| Feed | GET /v1/dev-to/feed | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/feed/get) |
| Communities | GET /v1/dev-to/communities | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/communities/get) |
| Podcast episodes | GET /v1/dev-to/podcast/episodes | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/podcast/episodes/get) |
| Podcast episode | GET /v1/dev-to/podcast/episode | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/dev-to/podcast/episode/get) |

## How to start

1. **Create an API key.** Sign up at Social Fetch and copy a key (`sfk_...`). New accounts get 100 free credits, enough to try every Dev.to route several times.
2. **Pick a route and send it.** Use `GET /v1/dev-to/article?id=207638` for one post, `GET /v1/dev-to/articles?tag=rust` for a tag, or `GET /v1/dev-to/user/profile?username=heyitsjem` for a profile. Send `x-api-key` on every request.
3. **Branch and page.** For a lookup, check `data.lookupStatus` before storing a row. For a list, read `data.page.nextPage` while `hasMore` is true. `meta.creditsCharged` on each response is the billing record.

## Pricing

Every Dev.to route charges a flat credit amount per completed request, shown on each endpoint page. Each page of a list is its own request and its own credit. Credits do not expire on pay-as-you-go packs, and `meta.creditsCharged` on every response is the billing source of truth.

## Compared with the official API

Dev.to publishes its own API. Social Fetch adds one response envelope shared with every other platform, typed `lookupStatus` results, `page` blocks on lists, and consistent field names across routes. The extras that live outside the plain post payload, such as profile counts, pinned posts, tag guidelines, series navigation, comment reaction counts and the home feed with its top comments, arrive in the same shape as the rest, so a job that mixes them does not need a second parser. A missing post, user, tag, organization, episode or trend comes back as `not_found` data, not as an HTTP error.

## FAQ

### What can I do with the Dev.to API?

Read posts and their full bodies, search posts, collect comment threads, look up users and organizations, list tags and tag details, follow trends, read the home and popular feeds, list video posts and podcast episodes, list events, and list communities. There are 21 routes under /v1/dev-to.

### How do I fetch one post by URL or id?

Send exactly one of id or url to GET /v1/dev-to/article, for example id=207638 or url=https://dev.to/lydiahallie/javascript-visualized-event-loop-3dif. The response has lookupStatus and, when found, article with bodyHtml and bodyMarkdown.

### How far can I page and how many rows can I ask for?

page is 1 to 1000 on the list routes and 1 to 2000 on the feed; limit is 1 to 1000, with a default of 30. Each page is billed as its own request, so a large limit is one request rather than many. The page block returns page, hasMore and nextPage; a page past the end is an empty list with hasMore false.

### How do comment threads work?

GET /v1/dev-to/article/comments returns a flat list in reading order: each top-level comment followed by its replies. Use parentId and depth to rebuild the tree. topLevelCount counts the top-level comments in the response, and replies are not counted against limit.

### What is the difference between article and article/details?

GET /v1/dev-to/article returns the post with its full body. GET /v1/dev-to/article/details returns page-only extras: isPublished, isScheduled, coAuthorIds, the series and its parts, and commentsOnPage with numeric ids and reaction counts. Add details only when you need those fields.

### Can I combine article filters?

Only tag with top. Dev.to applies one of tag, username, state or seriesId and ignores the rest, so Social Fetch refuses combinations that would silently drop a filter. sort=latest is accepted only on the unfiltered feed.

### How do I get a user's posts?

Send username to GET /v1/dev-to/articles, for example username=ben. The list is newest first and cannot be combined with other filters. Use GET /v1/dev-to/user for the account and GET /v1/dev-to/user/profile for the page details.

### Why is a field sometimes null?

Some fields are optional on Dev.to. Organization memberCount, postsPublished and isVerified are null when the count is unavailable, profile counts are null when the profile page is hidden, and a podcast audioUrl can be null when the episode has no audio file. A pinned post with no reaction or comment count, and a repository that shows a language but no star count, return 0. Null means unavailable, not zero.

### Does HTTP 200 mean the post exists?

No. HTTP 200 means the request finished. For lookups, check data.lookupStatus: not_found means the post, user, tag, organization, episode or trend does not exist. Lists use an empty array with the same rule where the contract says so.

### Can I use Dev.to routes from agents or MCP?

Yes. Every Dev.to route is available through the hosted MCP server and through Ask (POST /v1/ask) in plain English. Use the typed routes for production jobs, where lookupStatus and the page block are explicit.

## Related

- [Dev.to Article API](https://www.socialfetch.dev/platforms/dev-to/article): One post with bodyHtml and bodyMarkdown (`GET /v1/dev-to/article`).
- [Dev.to Articles API](https://www.socialfetch.dev/platforms/dev-to/articles): The front page, a tag, a user, a series or the top posts of N days (`GET /v1/dev-to/articles`).
- [Dev.to Profile API](https://www.socialfetch.dev/platforms/dev-to/user-profile): Counts, badges, pinned posts and listed repositories (`GET /v1/dev-to/user/profile`).
- [Dev.to Comments API](https://www.socialfetch.dev/platforms/dev-to/article-comments): Comment threads in reading order with parentId and depth (`GET /v1/dev-to/article/comments`).
- [Ask in plain English](https://www.socialfetch.dev/ask): Route a natural-language Dev.to question to the matching operation.
- [Hosted MCP](https://www.socialfetch.dev/mcp): Call Dev.to tools from Cursor or Claude with the same credit metering as REST.
