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

---

# Stack Overflow Search API

Find questions by words, tags, author and status, and get whole questions or highlighted excerpts.

`GET /v1/stack-overflow/questions/search` takes at least one of `q`, `title`, `body`, `tagged`, `notTagged` or `user`, plus filters such as `accepted`, `closed`, `answersMin`, `viewsMin`, `createdAfter` and `createdBefore`. `mode=full`, the default, returns questions with the same fields as the questions list. `mode=excerpt` returns questions and answers that matched, each with `excerptHtml` (highlighted HTML) and `bodyHtml` (the full text as plain text), plus `itemType`, `questionId`, `answerId`, `isAccepted` and `equivalentTagSearch`.

Sort by `relevance` (the default), `creation`, `activity` or `votes`. A date range needs a sort other than relevance, and `creation` is the only sort that pages without a ceiling. Every search is HTTP 200, with an empty list when nothing matched.

## Request

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

## FAQ

### What is the difference between full and excerpt mode?

mode=full returns matching questions in data.questions. mode=excerpt returns matching questions and answers in data.excerpts, each with a snippet that has the matched words in a highlight span. The two lists are never both filled.

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

### How do I search by tag and date?

Set tagged to one or more tags and a createdAfter and createdBefore range, then choose sort=creation, activity or votes. A range is refused with the default relevance sort.

### Why does the search stop before the results run out?

Sorts other than creation return up to 2,500 rows per list (625 with include=body), then stop and set limitReached to true. Rows with equal scores can repeat or skip on those sorts. Use sort=creation when you need to walk the whole result set.
