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

---

# Stack Overflow Question API

One question with its votes, views, accepted answer id and timestamps, plus answers or comments when you ask.

`GET /v1/stack-overflow/questions/{questionId}` returns one question. On `found`, `data.question` has `id`, `url`, `title`, `tags`, `score`, `votes`, `viewCount`, `answerCount`, `commentCount`, `favoriteCount`, `isAnswered`, `acceptedAnswerId`, `author`, `lastEditor`, `license`, `closed`, `bounty`, `notice`, `protectedAt`, `lockedAt`, `createdAt`, `lastActivityAt` and `lastEditedAt`.

Add `include=answers` for the answer list, `include=comments` for the question's comments, or both. Each answer carries `isAccepted`, `score`, `votes`, `author`, `commentCount` and its own comments when included. `answersComplete` is false when the answer list is shorter than `answerCount` says. A missing or deleted question is HTTP 200 with `lookupStatus` of `not_found` and `question` null.

## Request

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

## FAQ

### Does a missing question return 404?

No. The request finished, so the status is 200 and data.lookupStatus is not_found with data.question null. Branch on lookupStatus before writing the row.

### How many credits does a question 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.

### How do I get the answers with the question?

Add include=answers. The answers are in data.question.answers and answersComplete says whether they are all there. For a question with more answers than one page holds, use GET /v1/stack-overflow/questions/{questionId}/answers and page with sort=creation.

### Are comments included in the answers?

Only when you ask. Use include=answers,comments so each answer gets its comments as well as the question. answer.comments and question.comments are null when comments were not asked for.
