Dev.to

Get Dev.to comment

Get one Dev.to comment with its replies.

GET/v1/dev-to/comment
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
1
idstringrequiredquery

Comment id, the short code in comment URLs (`https://dev.to/ben/comment/3jnm7`). A comment URL is also accepted.

pattern: ^[a-z0-9]{1,12}$

Response fields
36

Endpoint-specific response payload.

datalookupStatus
string

Whether the item was found.

one of: found, not_found

The comment when found; otherwise null.

datacommentid
string

Comment id, the short code used in comment URLs (`https://dev.to/{username}/comment/{id}`).

datacommentparentId
stringnullable

Always null for a single comment lookup: the response does not say which comment this one replies to. Use `/v1/dev-to/article/comments` for its position in the full thread.

datacommentdepth
integernullable

Always null for a single comment lookup: the response does not say how deep this comment sits in the full thread. Use `/v1/dev-to/article/comments` for its position in the full thread.

≥ 0

datacommentcreatedAt
stringnullable

When the comment was posted (ISO-8601).

datacommentbodyHtml
string

Comment body as HTML.

datacommentaiDisclosure
stringnullable

The author's AI disclosure for the comment.

Who wrote the comment, or null when the account is gone.

datacommentauthorid
integernullable

Numeric user id.

datacommentauthorusername
string

Username, e.g. `ben`.

datacommentauthorname
stringnullable

Display name.

datacommentauthoravatarUrl
stringnullable

Profile picture URL.

datacommentauthorwebsiteUrl
stringnullable

Website the user lists on their profile.

datacommentauthortwitterUsername
stringnullable

Twitter or X username the user lists.

datacommentauthorgithubUsername
stringnullable

GitHub username the user lists.

Replies under the comment, in reading order. `depth` counts from the requested comment, so a direct reply has depth 1; `parentId` is the comment it answers.

datareplies[]id
string

Comment id, the short code used in comment URLs (`https://dev.to/{username}/comment/{id}`).

datareplies[]parentId
stringnullable

Id of the comment this one replies to, or null at the top.

datareplies[]depth
integer

Nesting level: 0 for a top-level comment, 1 for a reply.

≥ 0

datareplies[]createdAt
stringnullable

When the comment was posted (ISO-8601).

datareplies[]bodyHtml
string

Comment body as HTML.

datareplies[]aiDisclosure
stringnullable

The author's AI disclosure for the comment.

Who wrote the comment, or null when the account is gone.

datareplies[]authorid
integernullable

Numeric user id.

datareplies[]authorusername
string

Username, e.g. `ben`.

datareplies[]authorname
stringnullable

Display name.

datareplies[]authoravatarUrl
stringnullable

Profile picture URL.

datareplies[]authorwebsiteUrl
stringnullable

Website the user lists on their profile.

datareplies[]authortwitterUsername
stringnullable

Twitter or X username the user lists.

datareplies[]authorgithubUsername
stringnullable

GitHub username the user lists.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/dev-to/comment?id=3jnm7" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Dev.to comment.