# Stack Overflow API — $0.0003 per question

> Stack Overflow API: Questions from Stack Overflow and sister sites — score, answers. $0.0003 per delivered question, nothing delivered means nothing charged.

[Home](https://quanticdata.io/)/[Collectors](https://quanticdata.io/collectors/)/*Stack Overflow API*

# Stack Overflow API

A Stack Overflow API that returns questions as rows — title, score, answer and view counts, the answered and accepted-answer flags, tags, the asker with their reputation, the timestamps and the permalink. Search by keyword, by tag set, or both, across Stack Overflow or a sister Stack Exchange site, sorted by votes, activity, creation or relevance.

[Get my free API key](https://app.quanticdata.io/register) [See the request](/collectors/stack-overflow-api/#integration)

$0.0003 per delivered question · $2 free every month · Failed runs never billed

POST /v1/scraper/collectors/stackoverflow/run

```
$ curl $QD/stackoverflow/run \
    -H "Authorization: Bearer $QD_API_KEY" \
    -d '{"query": "web scraping", "sort": "votes", "max_results": 30}'
{ "status": "done", "count": 30,
  "results": [
    {
      "question_id": …,
      "title": "…",
      "score": …,
      "answer_count": … } ],
  "cost": 0.009 }
# 30 questions × $0.0003 · nothing delivered, nothing charged
```

**$0.0003 / question**6,666 questions on the free $2 every month

**Semantic input**query, tags, site — no URL lists

**Up to 100**questions per run, pagination handled for you

**No browser**read over HTTP/TLS — cheaper and faster than rendering

On this page: [What it is](/collectors/stack-overflow-api/#what) [Output fields](/collectors/stack-overflow-api/#output) [Inputs](/collectors/stack-overflow-api/#input) [Pricing](/collectors/stack-overflow-api/#pricing) [Integration](/collectors/stack-overflow-api/#integration) [Use cases](/collectors/stack-overflow-api/#use-cases) [Versus the alternatives](/collectors/stack-overflow-api/#compare) [FAQ](/collectors/stack-overflow-api/#faq)

## What a Stack Overflow API does

Stack Exchange already exposes a clean public API, and the friction is not the schema but the throttle: it keys quota to your IP and to a registered app, so a job that pulls thousands of questions across tags spends more time waiting out backoff than reading. This collector calls that same official API through rotating exits, which spreads the per-IP throttle across addresses, so you get the canonical fields without registering a key or nursing a quota.

Every row is decision-ready metadata: `score` and `view_count` as integers, `is_answered` and `has_accepted_answer` as booleans, `tags` as an array, and the asker's `author_reputation` alongside the name. That is enough to rank questions by demand, filter to the ones still lacking an accepted answer, or weight a signal by the reputation of who is asking — without opening a single page.

Input is meaning, not a URL *query* *tags* *site* *sort* *max_results*

## What one question looks like

Every delivered question carries these fields. Nullable means the source did not publish it — the field stays empty instead of being guessed.

| Field | Type | What it holds |
| --- | --- | --- |
| `rank` | integer | 1-based position. |
| `question_id` | integer | Stack Exchange question id. |
| `title` | string | Question title (entities decoded). |
| `score` | integer · nullable | Net votes. |
| `answer_count` | integer · nullable | Number of answers. |
| `view_count` | integer · nullable | Views. |
| `is_answered` | boolean | Has at least one upvoted answer. |
| `has_accepted_answer` | boolean | An answer is accepted. |
| `tags` | string[] | Question tags. |
| `author` | string · nullable | Asker display name. |
| `author_reputation` | integer · nullable | Asker reputation. |
| `created_at` | string · nullable | Asked at (ISO 8601). |
| `last_activity` | string · nullable | Last activity (ISO 8601). |
| `link` | string · nullable | Question permalink. |

## Inputs

The whole request. Anything you leave out falls back to the default shown in the catalog.

| Input | Type | Required | What it does |
| --- | --- | --- | --- |
| `query` | string | no | Keyword to search in titles/bodies. |
| `tags` | string | no | Semicolon-separated tag filter, e.g. python;beautifulsoup. |
| `site` | string | no | Stack Exchange site (default stackoverflow). One of: `stackoverflow`, `superuser`, `serverfault`, `askubuntu`, `mathoverflow`, `unix`, `dba`, `security`, `datascience`. |
| `sort` | string | no | Sort order (default votes). One of: `votes`, `activity`, `creation`, `relevance`. |
| `max_results` | integer | no | How many questions to deliver at most (1–100). You pay only for delivered questions. |

Pricing

## Stack Overflow API pricing

$0.0003 per delivered question. A run that delivers nothing costs nothing: blocked pages, challenges and retries are on us, and the $2 monthly allowance covers about 6,666 questions before you spend anything.

**$0.0003**per delivered question*$0.24 per 1,000 delivered questions*

**6,666 questions**on the free allowance*$2 every month, no card*

**Zero rows**zero charge*blocks, captchas and retries are on us*

**−30%**on volume tiers*the catalog returns your key's price*

### Pay as you go

$0/mo

- $2 free credit / month

- 60 requests / min

- List unit prices

### Starter

$19/mo

- $15 free credit / month

- 300 requests / min

- 10% off unit prices

Most popular

### Growth

$79/mo

- $50 free credit / month

- 600 requests / min

- 20% off unit prices

### Scale

$299/mo

- $250 free credit / month

- 1,200 requests / min

- 30% off unit prices

Same wallet, same key and same $2 monthly allowance as every other [Data API](https://quanticdata.io/web-data-api-for-ai/). Prices are launch pricing read live from the billing config — `GET /v1/scraper/collectors` returns the price your key actually pays.

Integration

## One POST, typed rows

Base URL `https://api.quanticdata.io/v1`, Bearer auth, the same key as every other Data API. Endpoint: `POST /v1/scraper/collectors/stackoverflow/run`.

```
curl -X POST https://api.quanticdata.io/v1/scraper/collectors/stackoverflow/run \
  -H "Authorization: Bearer $QD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"web scraping","sort":"votes","max_results":30}'
```

```
import requests

r = requests.post(
    "https://api.quanticdata.io/v1/scraper/collectors/stackoverflow/run",
    headers={"Authorization": f"Bearer {QD_API_KEY}"},
    json={
        "query": "web scraping",
        "sort": "votes",
        "max_results": 30
    },
    timeout=120,
)
for row in r.json()["payload"]["results"]:
    print(row)
```

```
const res = await fetch(
  "https://api.quanticdata.io/v1/scraper/collectors/stackoverflow/run",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.QD_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({"query":"web scraping","sort":"votes","max_results":30}),
  },
);
const { payload } = await res.json();
console.table(payload.results);
```

```
claude mcp add quantumproxies \
  -e QUANTUMPROXIES_API_KEY=qd_live_your_key_here \
  -- npx -y quantumproxies-mcp

# then, in the chat:
> run the stackoverflow collector with query="web scraping" and sort="votes"
```

## What people build with the Stack Overflow API

Three shapes of work this endpoint was designed around.

### Developer demand research

Pull the high-view, high-score questions for a tag and you have a ranked map of what people actually get stuck on — the raw material for docs, content or a product gap analysis.

### Unanswered-question mining

Filter to questions with no accepted answer in your area and you have a live list of where expertise, or a helpful bot, has room to add something.

### Cross-site technical corpora

Point the same query at Server Fault, Super User, Ask Ubuntu or the other sister sites to assemble a topic dataset that reaches past Stack Overflow itself.

## Stack Overflow API versus rolling your own

The differences that actually cost time when you build this in-house.

|  | DIY scraper | This collector |
| --- | --- | --- |
| Access | Register an app, hold a key | Keyless — the public API, called for you |
| Throttle | Quota pinned to your IP and app | Spread across rotating exits |
| Sites | One endpoint per site to wire up | Nine Stack Exchange sites behind one input |

## FAQ

Questions we get about the Stack Overflow API.

[Something else? Ask us →](mailto:hello@quanticdata.io)

### Is this scraping the Stack Overflow web pages?

No. It calls the official public Stack Exchange API, so the fields — score, answers, views, accepted-answer flag, tags, reputation — are the canonical ones, not values parsed out of rendered HTML. The collector's job is to run it keyless and absorb the per-IP throttle for you.

### Which sites can I query besides Stack Overflow?

Super User, Server Fault, Ask Ubuntu, Math Overflow, Unix & Linux, Database Administrators, Information Security and Data Science, chosen with the `site` input. The query, tag filter and sort behave the same on each.

### Do I get answer text or just the question?

Question-level metadata and the permalink, not the answer bodies. You get the counts and flags — how many answers, whether one is accepted, the score and views — which is what you need to rank or triage; follow the `link` when you want the thread itself.

### Is there a free Stack Overflow API?

Every account gets $2 of credit every month with no card, which is about 6,666 delivered questions on this endpoint at $0.0003 each. It renews monthly, and a run that delivers nothing is never billed — so a failed or blocked attempt does not eat the allowance.

### How much does one run cost?

Multiply the rows you actually receive by $0.0003. A run capped at 100 questions — the maximum for this collector — costs $0.03 if every row comes back, and less when the source has fewer. Volume tiers take up to 30% off, and `GET /v1/scraper/collectors` returns the price your key actually pays.

## Run the Stack Overflow API now

$2 of free credit every month, no card. Your key returns its own prices from `GET /v1/scraper/collectors`.

[Get my free API key](https://app.quanticdata.io/register)

Related: [All 65 collectors](https://quanticdata.io/collectors/) [Reddit scraper API](https://quanticdata.io/collectors/reddit-scraper-api/) [Google search results API](https://quanticdata.io/collectors/google-search-results-api/) [Keyword research API](https://quanticdata.io/collectors/keyword-research-api/) [npm registry API](https://quanticdata.io/collectors/npm-registry-api/) [YouTube video data API](https://quanticdata.io/collectors/youtube-video-data-api/) [Documentation](https://quanticdata.io/docs/)

---

Source: https://quanticdata.io/collectors/stack-overflow-api/ · Site index for AI: https://quanticdata.io/llms.txt
