> **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/stack-overflow/users-memberid-comments>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/stack-overflow/users-memberid-comments.mdx>

---

# Stack Overflow User Comments API

Every comment one user has written, with the post it is on, its score and its text.

`GET /v1/stack-overflow/users/{memberId}/comments` returns a page of comments by one user. Each comment has `id`, `postId`, `postType`, `url`, `score`, `edited`, `createdAt`, `author`, `replyTo`, `isByPostAuthor`, `license`, `bodyHtml` and `bodyMarkdown`.

Sort by `creation` (the default) or `votes`. The creation sort pages with a keyset cursor, so it keeps going past the 25 page ceiling; the votes sort returns up to 2,500 rows and then stops with `limitReached`. Rows with equal scores can repeat or skip on the votes sort. For a user with more than 2,500 comments, `votes` returns the first 100 rows and then sets `limitReached`; use `creation` to walk the list. A user with no comments is `found` with an empty list; a user id that does not exist is `not_found`.

## Request

- **Endpoint:** `GET /v1/stack-overflow/users/{memberId}/comments`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by user id
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/stack-overflow/users/memberid/comments/get)
- **Platform page:** [/platforms/stack-overflow](https://www.socialfetch.dev/platforms/stack-overflow)

## FAQ

### How do I tell which post a comment is on?

postId is the question or answer id and postType says which it is. url links to the comment on the site.

### How many credits does a page 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. Each paginated page is a separate billed request.

### Does this include reply details?

When the list carries them, replyTo names the user the comment answers and isByPostAuthor says whether the author wrote the post. Both can be null when not available.

### Which sort should I use to walk every comment?

sort=creation, the default. It uses a keyset cursor and keeps paging; votes stops at 2,500 rows, or after its first 100 rows for a user with more than 2,500 comments. Rows with equal scores can repeat or skip on votes.
