Get comments on Stack Overflow posts
Get the comments on up to 100 Stack Overflow questions and answers in one call.
Headers
Get your API keyAPI key (`sfk_...`)
Post (question or answer) ids, comma-separated, 1 to 100, e.g. `11227809,11227902`. Duplicates are dropped.
Stack Exchange site, by its API name (`askubuntu`, `serverfault`, `math`, `ru.stackoverflow`). Default: `stackoverflow`. The sites endpoint lists them all.
Endpoint-specific response payload.
The Stack Exchange site the comments belong to.
One entry per distinct requested id, in the order first asked. Duplicates are dropped.
The post id that was asked for.
`not_found` when the post does not exist or was deleted.
one of: found, not_found
Whether the post is a question or an answer; null when not found.
one of: question, answer, null
Comments on the post as Stack Exchange counts them; null when not found.
False when the post has more comments than this list holds; null when not found.
The post's comments, oldest first; empty when not found.
Comment id.
The question or answer the comment is on.
Whether the comment is on a question or an answer; null when not known.
one of: question, answer, null
Link to the comment.
Upvotes the comment received.
Whether the comment was edited. The flag comes from the route that returned the comment, so the same comment can differ between routes.
When it was written, ISO 8601 UTC.
Who wrote it.
User id on this site; null for a deleted user.
Network-wide account id, the same on every site.
Display name.
Profile URL.
Avatar URL.
Reputation on this site.
Kind of account.
one of: registered, moderator, unregistered, does_not_exist, team_admin, null
Percent of the user's questions with an accepted answer; null when not shown.
The user the comment is addressed to, when it is a reply. Null when the comment is not a reply; on the comments-by-post routes it is always null because those routes do not carry reply targets.
User id on this site; null for a deleted user.
Network-wide account id, the same on every site.
Display name.
Profile URL.
Avatar URL.
Reputation on this site.
Kind of account.
one of: registered, moderator, unregistered, does_not_exist, team_admin, null
Percent of the user's questions with an accepted answer; null when not shown.
Whether the comment's author wrote the post it is on; null on lists that do not carry it.
Content licence, e.g. `CC BY-SA 4.0`.
Comment text as HTML.
Comment text as Markdown; null on lists that do not carry it.
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
Code example
curl "https://api.socialfetch.dev/v1/stack-overflow/posts/comments?ids=11227809,11227902" \
-H "x-api-key: YOUR_API_KEY"Responses
Comments by post.