Stack Overflow Scraper - Questions, Answers, Tags
Pricing
from $1.00 / 1,000 run start fees
Stack Overflow Scraper - Questions, Answers, Tags
Get questions and answers from Stack Overflow and 170+ Stack Exchange sites by tag or search term: question text, accepted and top-voted answer, score, views, tags, closure reason and asker. One row per question, no account or API key needed. For docs research, support triage and AI training data.
Pricing
from $1.00 / 1,000 run start fees
Rating
0.0
(0)
Developer
SR
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
1
Monthly active users
2 months ago
Last modified
Categories
Features
Share
Stack Overflow Scraper
Stack Overflow Scraper extracts public questions and answer text from Stack Overflow and 170+ other Stack Exchange sites, for developer research, documentation planning, support triage and AI training data. Search by tag or free text, choose a network site, and receive one structured dataset row per question with votes, views, the accepted answer, the top-voted answer, closure details and author information. No account and no Stack Exchange API key are required; you can export the results as JSON, CSV or Excel.
Stack Overflow Scraper input
Use tagged, search, or both. The tags shown when you open the actor are a prefill, not a default. An API run with an empty object does not automatically search Python: provide at least one tag or a search term. Lists are joined with semicolons; the original string form also remains supported.
The following input is the actual input used for the three-page migration baseline:
{"tagged": ["python", "asyncio"], "limit": 250}
| Field | Meaning | Default |
|---|---|---|
tagged | Tag list or semicolon-separated string | None |
search | Free-text question search | None |
site | Network site, such as stackoverflow, serverfault or askubuntu | stackoverflow |
sort | votes, activity, creation, hot, week or month | votes |
order | desc or asc | desc |
min_score | Legacy minimum parameter for the selected sort | None |
api_key | Optional Stack Exchange application key | None |
limit | Maximum questions, up to 2000 | 100 |
retries | Attempts per source page, up to 6 | 3 |
Site names, sort names and order values are trimmed and normalized to lowercase. A zero limit retains the original default of 100. The original maximum remains 2000 questions. Each source page contains up to 100 questions, so a run requesting 250 questions needs three source pages when enough matches exist.
min_score preserves the original actor's behavior. With sort=votes, it filters by net score. With creation or activity, the underlying API treats the minimum as a timestamp. Hot, week and month do not accept a minimum and return a successful empty run with an error record when combined with it. Use votes when you need a score threshold. Some sort and search combinations are also rejected by the source API; these are reported instead of silently changing your query.
Output and question fields
Each question includes question_id, site, title, url, tags, score, view_count, answer_count and position. Resolution fields include is_answered, has_accepted_answer and accepted_answer_id. Lifecycle fields include created_at, last_activity_at, closed_at, closed_reason and is_closed. Author fields are asker, asker_reputation and asker_url.
The three body fields are question_body, accepted_answer_body and top_answer_body. HTML tags are removed, whitespace is combined, and each body is limited to 4000 characters. This preserves text from code blocks but removes their formatting. Missing answers or unavailable author information are represented by null values. The question title retains the source's HTML entities. The original comment_count field remains null because the selected source response does not supply a comment count; answer_count counts answers and should not be interpreted as comments.
The accepted answer is the one selected by the asker. The top answer is the one with the highest score, reported alongside top_answer_score. They can differ, so both are retained on the same question row. Answers do not become additional dataset rows.
views_per_score divides the view count by a positive net score, rounded to one decimal place. It is null when the score is zero or negative. unanswered_but_popular marks a question with more than 1000 views for which the source's is_answered flag is false. That flag is separate from whether the asker accepted an answer.
The following row comes from the real response captured on 6 October 2026 for the input {"tagged": ["python", "asyncio"], "limit": 3}. The three body fields and text are left out here for length; counts can change as the source receives more activity:
{"question_id": 27435284,"site": "stackoverflow","title": "multiprocessing vs multithreading vs asyncio","url": "https://stackoverflow.com/questions/27435284/multiprocessing-vs-multithreading-vs-asyncio","tags": ["python","multithreading","python-3.x","multiprocessing","python-asyncio"],"score": 399,"view_count": 220630,"answer_count": 13,"comment_count": null,"is_answered": true,"has_accepted_answer": true,"accepted_answer_id": 27436735,"created_at": "2014-12-12 01:03:57","last_activity_at": "2024-11-10 06:30:27","closed_at": null,"closed_reason": null,"is_closed": false,"asker": "user3654650","asker_reputation": 6423,"asker_url": "https://stackoverflow.com/users/3654650/user3654650","top_answer_score": 378,"views_per_score": 553,"unanswered_but_popular": false,"position": 1,"source": "stackexchange-scraper","platform": "stackexchange","post_id": "27435284","author_id": "3654650","posted_at": "2014-12-12T01:03:57.000Z"}
The dataset also includes source, platform, fetched_at, post_id, author_id, posted_at and text. The original numeric question ID and original UTC date strings remain available. The additional post ID is a string; the additional dates use ISO 8601 UTC. A question ID is unique within a site. Use the question URL, or the combination of site and question ID, when combining data across sites.
Use cases for a Stack Overflow scraper
- Documentation and content research. Pull the questions for the tags of your product, sort by
views_per_score, and you get a ranked list of problems many developers hit that the community never rewarded with a high score. That list is a ready-made backlog for docs pages, tutorials and blog posts. - Developer support triage. Watch
unanswered_but_popularon the tags you own. A question with thousands of views and no answer above the site threshold is a support gap that is visible to every user who searches for it. - Ecosystem and competitor research. Compare question volume, answer rates and scores across tags such as two frameworks or two cloud services to see which tools developers actually adopt and where they struggle.
- AI training and evaluation data. Each row pairs a question body with the accepted answer and the top-voted answer, plus score and view count as quality signals. That gives you question-answer pairs for retrieval, fine-tuning or evaluation sets without parsing pages.
- Developer relations and community work. Track new and active questions on a tag with
sort=creationorsort=activityand route them to the people who can answer.
Stack Overflow scraper vs the Stack Exchange API and the data dump
| This actor | Calling the Stack Exchange API yourself | Stack Exchange data dump | |
|---|---|---|---|
| Setup | Fill in tags or a search term | Write code for paging, quota checks, retries and HTML clean-up | Download and load a very large archive |
| Freshness | Current at run time | Current at run time | A snapshot, not live data |
| Answers | Accepted and top-voted answer text on the question row | Separate requests and matching by answer ID | Separate tables to join |
| Output | Flat rows, JSON, CSV or Excel | Raw JSON with HTML bodies | XML files |
| Cost | Pay per question delivered | Your own time and hosting | Free, heavy to process |
The Stack Exchange API is the right choice when you build your own application and want full control. The data dump suits full-history analysis of an entire site. This actor fits when you need a clean, current Stack Overflow dataset for a set of tags or a search term, without writing and maintaining the paging, quota and parsing code yourself.
Pricing and free-plan limits
The existing price remains $0.001 per run start and $0.001 per delivered question. The actual migration baseline delivered 250 questions and charged one start event and 250 question events. Empty results do not trigger question events; the run-start event still applies. Answers included on a question row do not generate extra question events.
Non-paying Apify users receive at most ten question rows per run. Paying users can request up to the original 2000-question limit. The run summary states whether the free-plan cap applied. The amount charged for questions follows the rows delivered to the dataset.
Quotas, errors and the summary
The source reports its remaining quota in responses. The actor includes quotaRemaining, quotaMax and authenticated in the summary. Supplying an optional application key can increase the allowance. The run stops before exhausting a low quota and reports quota_low; questions collected before that point remain available. Source throttling, invalid parameters and failed page requests are recorded in errors.
No matches, invalid search input and upstream failures are handled as successful empty runs, matching the original actor. A later page failure can leave a partial dataset with the questions already collected. Check the summary and errors record when completeness matters. A quota or availability problem is not evidence that a topic has no questions.
Frequently asked questions
Is this a Stack Exchange API alternative?
It uses the public question data that the Stack Exchange network makes available and handles paging, quota reporting, retries and HTML clean-up for you. If you only need rows of questions and answers for a tag or search, you do not have to write API code. If you need write access, voting or private Teams content, use the official API directly.
Can I export a Stack Overflow dataset to CSV or Excel?
Yes. Every run writes its questions to an Apify dataset, which you can download as JSON, CSV, Excel, XML or HTML, or read through the Apify API. One question is one row, with the answer text in its own columns.
Can I scrape sites other than Stack Overflow?
Yes. Set site to a Stack Exchange site identifier such as serverfault or askubuntu. The same question fields and source quota reporting apply. Unknown site identifiers are reported as rejected parameters.
Do I need an API key?
The measured baseline runs used no key. You can supply your own Stack Exchange application key through api_key when you need its quota allowance. The key is omitted from question rows and error messages.
Why are the accepted and top answers different?
Acceptance reflects the asker's choice; the top answer reflects the highest answer score. Returning both helps you distinguish an answer that solved a specific case from the answer the community rated most highly.
How can I tell whether a run is complete?
Read the summary and errors record. The actor retains collected rows when a later page fails, reports source quota stops, and marks incomplete collection explicitly. A free-plan cap is reported separately from the source's available question count.