Stack Overflow & Stack Exchange Q&A Scraper avatar

Stack Overflow & Stack Exchange Q&A Scraper

Pricing

from $0.30 / 1,000 questions

Go to Apify Store
Stack Overflow & Stack Exchange Q&A Scraper

Stack Overflow & Stack Exchange Q&A Scraper

Search Stack Overflow or any Stack Exchange site's free public API by keyword or tag and get one row per question — score, tags, author, view/answer counts and the accepted answer's text.

Pricing

from $0.30 / 1,000 questions

Rating

0.0

(0)

Developer

Murat Uzun

Murat Uzun

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

16 days ago

Last modified

Share

What is Stack Overflow & Stack Exchange Q&A Scraper?

Stack Overflow & Stack Exchange Q&A Scraper is an Apify Actor that searches Stack Overflow — or any of the 170+ other Stack Exchange sites (Super User, Server Fault, Ask Ubuntu, Math Stack Exchange, and more) — through their free, official StackExchange API v2.3. Give it one or more search phrases and/or tags, and it returns one clean row per question: title, score, view/answer counts, tags, author reputation, the question body, and — optionally — the accepted answer's full text. No scraping of stackoverflow.com pages, no API key required. Runs on Apify's schedule, webhook and API infrastructure, so a weekly "new questions in my niche" digest is a five-minute setup.

Why use Stack Overflow & Stack Exchange Q&A Scraper?

  • Documentation and support teams track newly asked questions about their product's tags (e.g. a library or framework name) to spot gaps worth writing a guide for.
  • Content researchers pull the highest-voted questions on a topic across Stack Overflow to see what developers actually struggle with.
  • Community managers monitor a Stack Exchange site other than Stack Overflow — Super User, Server Fault, a language-specific SE site — for their own brand or product mentions.
  • Dataset builders and LLM fine-tuners collect question/accepted-answer pairs on a topic in one flat, ready-to-import table.

How to use Stack Overflow & Stack Exchange Q&A Scraper

  1. Fill Search queries with one phrase per row, e.g. web scraping, playwright timeout.
  2. Set Site to the Stack Exchange site's API slug (stackoverflow by default; see the full list at stackexchange.com/sites).
  3. Optionally add Tags to narrow every query, e.g. python.
  4. Choose Sort by and set Minimum score and Max results per query.
  5. Turn on Include accepted answer if you want each question's accepted answer text too.
  6. Click Start and export the dataset as JSON, CSV, Excel or HTML from the Output tab.

Example input

{
"queries": ["web scraping", "playwright timeout"],
"site": "stackoverflow",
"sortBy": "votes",
"minScore": 0,
"includeAnswers": false,
"maxResults": 50
}

Example output

{
"site": "stackoverflow",
"questionId": "76310103",
"title": "Cannot run Playwright test \"--ui\"",
"link": "https://stackoverflow.com/questions/76310103",
"score": 5,
"viewCount": 10151,
"answerCount": 2,
"isAnswered": true,
"acceptedAnswerId": "76583732",
"tags": ["reactjs", "playwright"],
"author": "Kode_12",
"authorReputation": 5016,
"createdAt": "2023-05-22T18:48:52.000Z",
"lastActivityAt": "2025-01-13T20:19:54.000Z",
"body": "I'm trying to run npx playwright test --ui to run the playwright e2e test files…",
"acceptedAnswerBody": null,
"query": "playwright timeout",
"scrapedAt": "2026-09-14T01:26:37.933Z",
"error": null
}

Data table

Stack Overflow & Stack Exchange Q&A Scraper extracts 17 fields per row:

FieldTypeDescription
site, questionId, title, linkstringSite slug, numeric id, title and public question URL
score, viewCount, answerCountnumberUpvotes minus downvotes, view count and answer count
isAnswered, acceptedAnswerIdboolean, stringWhether it has any answer, and the accepted one's id
tagsarrayThe question's tags
author, authorReputationstring, numberDisplay name and reputation of the question's owner
createdAt, lastActivityAtstringISO 8601 UTC timestamps
bodystringQuestion body, plain text, up to 5000 characters
acceptedAnswerBodystringAccepted answer text, plain text, up to 5000 characters (only with Include accepted answer)
query, error, scrapedAtstringThe search that produced this row, any failure reason and the run timestamp

Input parameters

ParameterTypeDefaultDescription
queriesarray["web scraping"]One search phrase per query
sitestringstackoverflowStack Exchange site API slug
taggedarray[]Tags applied to every query
sortBystringvotesrelevance, votes, creation or activity
minScoreinteger0Drop questions scoring below this
includeAnswersbooleanfalseAdd the accepted answer's full text
maxResultsinteger50Max questions per query (1-500)
apiKeystring—Optional StackApps app key; raises the shared daily quota from 300 to 10,000 requests

Pricing

Stack Overflow & Stack Exchange Q&A Scraper uses pay-per-event pricing: $0.001 per result row, plus a negligible actor-start fee. A default run (one query, 50 questions) costs about five cents. Set Maximum cost per run and the Actor trims the work to what the budget covers instead of overspending.

Stack Overflow & Stack Exchange Q&A Scraper vs. the Stack Overflow search page

Stack Overflow's own search UI shows 15 results per page with no structured export, and searching a niche Stack Exchange site means visiting it separately. This Actor runs any number of queries — against Stack Overflow or any other Stack Exchange site — in one batch, and returns every result as a flat, typed row, ready to sort, filter or join with other data.

Using Stack Overflow & Stack Exchange Q&A Scraper with AI agents and MCP

Stack Overflow & Stack Exchange Q&A Scraper is pay-per-event with limited permissions — the two requirements for an Actor to be callable through the Apify MCP server at mcp.apify.com. An agent passes a queries list and gets back structured question rows — including, on request, the accepted answer's own text — ready to summarise "what are the top-voted answers about X" without the agent visiting stackoverflow.com itself.

FAQ

Does this need an API key? No. The StackExchange API's /search/advanced endpoint is free and unauthenticated, shared at 300 requests per IP per day. An optional apiKey (free at stackapps.com/apps/oauth/register) raises that to 10,000 requests per day — worth it for large or frequent runs.

Why is acceptedAnswerBody null even with Include accepted answer on? Many questions have no accepted answer at all (acceptedAnswerId is also null in that case) — isAnswered can still be true from an unaccepted answer.

What counts as the body? The question's own text (body_markdown from the API), HTML-decoded and with any inline HTML tags stripped down to plain text, truncated at 5000 characters. Markdown syntax like **bold** or `code` is left as-is.

How does tagged combine with queries? Every tag in tagged is applied to every query as an additional filter — a query of web scraping with tagged: ["python"] returns only Python-tagged questions matching that text.

What happens on the API's rate-limit backoff? When a response carries a backoff field (seconds), this Actor sleeps that long before its next request — automatically, with no configuration needed.

What are the limitations? minScore is applied after fetching, so a query can legitimately return fewer rows than maxResults once low-scoring questions are dropped. A failing query still produces one row, with the reason in error.

Is this legal to run? Yes. The StackExchange API is a public, documented, officially supported endpoint built for third-party use, and all content returned is licensed CC BY-SA by its authors — this Actor collects no private or personal data beyond public display names.

Part of the webdatatools web-intelligence suite — every Actor is pay-per-event, reads public data without a login, and returns one clean row per entity:

Browse the whole suite at webdatatools, or call ten of these Actors straight from Claude, Cursor or Cline with the webdatatools MCP server.

Website & domain intelligence

Content for AI, LLMs and RAG

Search, video and social

Leads, jobs and company data

Developer, app and research data