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

---

# Dev.to Comment API

One comment by its short code, plus the replies underneath it.

`GET /v1/dev-to/comment` takes a comment `id`, the short code in a comment URL such as `https://dev.to/ben/comment/3jnm7`, or the full URL. The reply returns the comment in `comment` with `bodyHtml`, `createdAt`, `aiDisclosure` and its `author`, plus `replies` in reading order.

The response does not include the requested comment's position in its full thread, so `comment.parentId` and `comment.depth` are null even when the comment is itself a reply. Each reply keeps the `parentId` it answers and a `depth` counted from the requested comment, so a direct reply has `depth: 1`. Use `/v1/dev-to/article/comments` for the whole thread with positions. When the comment does not exist, `lookupStatus` is `not_found`, `comment` is null and `replies` is empty.

## Request

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

## FAQ

### Where do I find a comment id?

It is the short code at the end of a comment URL, for example 3jnm7 in https://dev.to/ben/comment/3jnm7. The comments list returns the same id on every row, and a full comment URL is also accepted.

### How many credits does a comment 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 are comment.parentId and comment.depth null?

A single comment response does not say where the requested comment sits in its full thread. The call returns both fields as null instead of guessing. Use /v1/dev-to/article/comments for the whole thread with positions.

### What does lookupStatus mean?

found means the comment was returned. not_found means no comment has that id. HTTP 200 only means the request finished, so branch on lookupStatus.

### Are replies included?

Yes. Every reply under the comment comes back in the replies array with its own parentId and a depth counted from the requested comment, so a direct reply has depth 1. Use /v1/dev-to/article/comments for positions in the full thread.
