Stack Exchange, Inc. (Stack Overflow)v2.3 current; MCP server betaVerified 2026-10-30

Stack Overflow API for AI agents, Stack Exchange API no key

Stack Exchange’s official, free read API (v2.3) over Stack Overflow and every other Stack Exchange site: plain GET requests return questions, answers, comments, tags and users as JSON. No key for 300 requests a day per IP; a free Stack Apps key raises that to 10,000. Content is CC BY-SA and must be attributed.

Verified factsChecked 2026-10-30

PriceFree. Reads need no account; registering an app on Stack Apps for a request key is also free.1 [Verified 2026-10-30]
API key / authNone for reads. Our keyless GETs on 2026-10-30 returned HTTP 200. A request key or OAuth access token only raises the quota; writes and /me routes need an access token.5 [Verified 2026-10-30]
Rate limitKeyless calls share a per-IP daily quota; our responses showed quota_max 300. The default with a key is 10,000 a day. More than 30 requests a second from one IP gets dropped for 30 seconds to a few minutes, and any method can return a backoff value in seconds that you must honour.3 [Verified 2026-10-30]
Paging capsPage size up to 100 and up to 100 ids per call. Anonymous access stops at page 25: our request for page 26 returned error 403 “page above 25 requires access token or app key”.1 [Verified 2026-10-30]
License / termsThe API Terms of Use require every app to show visibly that the Stack Exchange Network is the source, and to follow the attribution rules in the Public Network Terms (last updated Nov 13, 2025). Each post carries content_license, for example “CC BY-SA 4.0”.4 [Verified 2026-10-30]
Stack Overflow MCP serverBeta, hosted at mcp.stackoverflow.com with tools so_search and get_content. Sign in with a Stack Overflow account (OAuth); 100 calls a day per user. Its terms forbid model training and long-term storage or caching of the content. Our unauthenticated POST returned HTTP 401.6 [Verified 2026-10-30]
Our check of the trend969 new Stack Overflow questions were created in September 2026 versus 207,169 in March 2014 (keyless /questions with filter=total, run 2026-10-30).7 [Verified 2026-10-30]

FeaturesChecked 2026-10-30

YesNoN/ANot published
CapabilityValueNote
StatusThe docs cover v2.3 as the public version; the hosted MCP server is labelled beta, and API v3 is not yet broadly available.v2.3 current; MCP server beta1 [Verified 2026-10-30 on https://api.stackexchange.com/docs]The docs cover v2.3 as the public version; the hosted MCP server is labelled beta, and API v3 is not yet broadly available.
API key requiredNo key for reads. Keyless GETs returned HTTP 200 on 2026-10-30; a free Stack Apps key or OAuth token only raises the quota.No2 [Verified 2026-10-30 by test request to https://api.stackexchange.com/2.3/info?site=stackoverflow]No key for reads. Keyless GETs returned HTTP 200 on 2026-10-30; a free Stack Apps key or OAuth token only raises the quota.
Free tierFree; free key for more. No paid tier for the API; request keys come free with a Stack Apps app registration.Yes1 [Verified 2026-10-30 on https://api.stackexchange.com/docs]Free; free key for more. No paid tier for the API; request keys come free with a Stack Apps app registration.
Rate limitquota_max 300 in our keyless responses; docs give 10,000 a day by default with a key, over 30 requests/second per IP banned, and backoff to honour.300/day per IP keyless; 10,000 with key3 [Verified 2026-10-30 on https://api.stackexchange.com/docs/throttle]quota_max 300 in our keyless responses; docs give 10,000 a day by default with a key, over 30 requests/second per IP banned, and backoff to honour.
Official MCP serverOfficial beta, mcp.stackoverflow.com. so_search and get_content; Stack Overflow sign-in (OAuth), 100 calls a day per user. Our unauthenticated call returned 401.Yes6 [Verified 2026-10-30 on https://api.stackexchange.com/docs/mcp-server]Official beta, mcp.stackoverflow.com. so_search and get_content; Stack Overflow sign-in (OAuth), 100 calls a day per user. Our unauthenticated call returned 401.
Official SDKMinimal JavaScript SDK. A small JS library for client-side OAuth only; fuller community libraries are listed on Stack Apps.Yes8 [Verified 2026-10-30 on https://api.stackexchange.com/docs/js-lib]Minimal JavaScript SDK. A small JS library for client-side OAuth only; fuller community libraries are listed on Stack Apps.
Data license / termsPosts carry content_license (e.g. CC BY-SA 4.0); the API terms require visible attribution to the Stack Exchange Network.CC BY-SA content + API Terms4 [Verified 2026-10-30 on https://stackoverflow.com/legal/api-terms-of-use]Posts carry content_license (e.g. CC BY-SA 4.0); the API terms require visible attribution to the Stack Exchange Network.
Commercial use allowedAllowed with attribution. The API terms set no commercial ban; attribution and CC BY-SA share-alike apply. The MCP server terms add no training and no long-term caching.Yes4 [Verified 2026-10-30 on https://stackoverflow.com/legal/api-terms-of-use]Allowed with attribution. The API terms set no commercial ban; attribution and CC BY-SA share-alike apply. The MCP server terms add no training and no long-term caching.
CORS / browser useAccess-Control-Allow-Origin: *. GET and an OPTIONS preflight with a third-party Origin returned * on 2026-10-30.Yes2 [Verified 2026-10-30 by test request to https://api.stackexchange.com/2.3/info?site=stackoverflow]Access-Control-Allow-Origin: *. GET and an OPTIONS preflight with a third-party Origin returned * on 2026-10-30.
Freshness / coverageResults reflect the live sites; the docs say identical requests within a minute usually return the same cached result.Live site data, heavily cached3 [Verified 2026-10-30 on https://api.stackexchange.com/docs/throttle]Results reflect the live sites; the docs say identical requests within a minute usually return the same cached result.

What it does

The Stack Exchange API is the read and write interface to the Stack Exchange network, which includes Stack Overflow, Server Fault, Super User and the other Stack Exchange Q&A sites. Version 2.3 is the documented public version at api.stackexchange.com. An agent picks a site with site=stackoverflow and calls endpoints such as /search/advanced (full-text search with tag, accepted-answer and date filters), /questions/{ids}/answers or /answers/{ids} with filter=withbody to read the answer text. Every response is wrapped in an object that reports quota_max and quota_remaining, so the agent can see its budget, and may carry a backoff field it must respect. Responses are always gzip or deflate compressed, so use curl --compressed or a client that decompresses. Stack Overflow also runs a separate hosted MCP server (beta) with so_search and get_content tools; it needs a Stack Overflow sign-in and allows 100 calls a day per user (see the facts below). This listing came from a post by a developer who used the public API to count how few new questions Stack Overflow now gets; we reproduced the count ourselves.

Working exampleRun 2026-10-30

ShellRequest
curl -sS --compressed "https://api.stackexchange.com/2.3/search/advanced?site=stackoverflow&q=streamable%20http&tagged=model-context-protocol&accepted=True&sort=votes&order=desc&pagesize=2"

Response (trimmed)

HTTP responseResponse
HTTP 200 (run 2026-10-30, no key; owner details trimmed)
{"items":[
  {"tags":["python","model-context-protocol"],
   "is_answered":true, "accepted_answer_id":79713236, "answer_count":2, "score":6,
   "question_id":79713188, "content_license":"CC BY-SA 4.0",
   "link":"https://stackoverflow.com/questions/79713188/issue-on-call-fastmcp-server-using-postman",
   "title":"Issue on call FastMCP Server using Postman"},
  {"tags":["python","python-asyncio","model-context-protocol"],
   "accepted_answer_id":79692603, "score":4, "question_id":79692462,
   "title":"FastMCP client timing out while initializing the session", ...}],
 "has_more":true, "quota_max":300, "quota_remaining":294}

Agent setup

Prompt to give your agent

Prompt
Use the Stack Exchange API (no key; always decompress responses). Search Stack Overflow with GET https://api.stackexchange.com/2.3/search/advanced?site=stackoverflow&q=<my error message>&accepted=True&sort=relevance&order=desc&pagesize=5. Then fetch the accepted answers with GET https://api.stackexchange.com/2.3/answers/<accepted_answer_ids>?site=stackoverflow&filter=withbody. Summarise the fix from the highest-scored accepted answer, note the answer date (old answers may be outdated for my library version), and cite each question link with “Source: Stack Overflow, CC BY-SA”. Stop if quota_remaining drops below 20 or a backoff field appears.

Agent / MCP-style tool snippet

JSONTool snippet
// Tool definitions for Claude, OpenAI or any function-calling agent
[
  {
    "name": "stackoverflow_search",
    "description": "Search Stack Overflow questions via the Stack Exchange API. Read-only, no key (300 calls/day per IP). Cite results as Stack Overflow, CC BY-SA.",
    "input_schema": {
      "type": "object",
      "properties": {
        "q": { "type": "string", "description": "Free-text query, e.g. an error message" },
        "tagged": { "type": "string", "description": "Semicolon-separated tags, e.g. python;fastapi" },
        "accepted": { "type": "boolean" },
        "pagesize": { "type": "integer", "maximum": 100 }
      },
      "required": ["q"]
    }
  },
  {
    "name": "stackoverflow_answers",
    "description": "Fetch answers by id with their body text.",
    "input_schema": {
      "type": "object",
      "properties": { "ids": { "type": "string", "description": "Up to 100 ids separated by semicolons" } },
      "required": ["ids"]
    }
  }
]
// Implementation (decompress gzip; honour any "backoff" field):
//   GET https://api.stackexchange.com/2.3/search/advanced?site=stackoverflow&q={q}&tagged={tagged}&accepted={accepted}&pagesize={pagesize}
//   GET https://api.stackexchange.com/2.3/answers/{ids}?site=stackoverflow&filter=withbody

Fit and safety

Good for

  • Letting a coding agent look up an error message and the accepted fix
  • Checking whether a library question has already been answered before opening an issue
  • Tracking question volume and tags over time for developer-trend research

Watch out

  • Do not show answers without attribution. The API terms require every app to show that the content comes from the Stack Exchange Network, and posts are CC BY-SA, which also carries a share-alike condition.
  • Do not lean on it for brand-new libraries. New question volume has collapsed (969 new questions in September 2026 by our count), so recent frameworks and APIs often have no answers at all; read the vendor’s docs instead.
  • Do not run a shared agent fleet on the keyless quota. The 300-a-day quota is per IP and shared by every app on that IP; register a free Stack Apps key for 10,000 a day.
  • Do not deep-page or mirror the site. Anonymous paging stops at page 25, and the network publishes a separate data dump for bulk research.
  • Do not repeat the same request within a minute. The docs say results are heavily cached and identical calls more than once a minute are wasted.

Alternatives

Stack Overflow MCP server (beta)Stack Overflow’s own hosted MCP with so_search and get_content; needs a Stack Overflow sign-in and allows 100 calls a day per user.
GitBook docs MCPKeyless MCP over a vendor’s published docs, often fresher than old Q&A threads.
Exa hosted MCPKeyless hosted web search for answers that are not on Stack Overflow.
GitLab MCP serverIssues and merge requests in your own GitLab projects, for bugs that never reach public Q&A.

FAQ

Does the Stack Overflow API need an API key?

No. Reads from https://api.stackexchange.com/2.3/ work without a key; keyless calls share a 300-a-day quota per IP. A free key from Stack Apps raises it to 10,000 a day.

What is the Stack Exchange API rate limit?

About 300 calls a day per IP without a key (quota_max in each response) and 10,000 by default with a key. More than 30 requests a second from one IP is blocked for a short period, and backoff values must be honoured.

Is there an official Stack Overflow MCP server?

Yes, in beta at mcp.stackoverflow.com with so_search and get_content. It needs a Stack Overflow sign-in and allows 100 calls a day per user.

Why is the Stack Exchange API response unreadable?

Responses are always gzip or deflate compressed. Use curl --compressed or an HTTP client that decompresses automatically.

Compare

Put Stack Exchange API (Stack Overflow Q&A) side by side with other free agent tools on keys, limits, MCP support, licensing and CORS. Open the comparison grid →

SourcesFootnotes