Stack Overflow Questions Scraper — Tags, Scores & Views
Pricing
from $16.00 / 1,000 stack overflow questions
Stack Overflow Questions Scraper — Tags, Scores & Views
Export Stack Overflow questions by search text, tags or URL with titles, tags, scores, views, answer counts and authors for dev research. $20 per 1,000.
Pricing
from $16.00 / 1,000 stack overflow questions
Rating
0.0
(0)
Developer
Muhammad Afzal
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
11 days ago
Last modified
Categories
Security
Limited permissionsShare
Stack Overflow Questions Scraper exports public Stack Overflow questions found by search text, tags, or exact question URLs, with title, tags, score, view count, answer count, accepted-answer state, author, dates, licence, and an optional question body. It is built for developer-relations, documentation, and research teams who need Stack Overflow data as a clean dataset, and costs $20 per 1,000 questions on the FREE tier ($0.02 each) plus a $0.005 start fee.
What Stack Overflow data does it return?
It returns one dataset record per unique question. Values Stack Overflow does not provide, such as the reputation of a deleted user, stay null.
| Field | What it contains |
|---|---|
questionId, url, title | Question ID, canonical link, and decoded title |
tags | Stack Overflow tags on the question |
score, viewCount, answerCount | Votes, views, and number of answers at scrape time |
isAnswered, acceptedAnswerId | Whether it counts as answered, and the accepted answer's ID |
authorName, authorId, authorReputation | Public author details when available |
creationDate, lastActivityDate, lastEditDate | ISO 8601 UTC timestamps |
closedDate, closedReason | Closure details for closed questions |
contentLicense | Licence reported for the post, for example CC BY-SA 4.0 |
bodyHtml, bodyText | Question body as HTML and plain text when includeBody is true; otherwise null |
source, scrapedAt | Always Stack Exchange API v2.3, plus retrieval time |
The dataset holds questions only. Each run also writes an OUTPUT record with status (data, empty, rejected, blocked, or failed), records, apiRequests, quotaRemaining, and warnings.
How do I scrape Stack Overflow questions by keyword or tag?
Put a phrase in searchQuery, tags in tags, or both. The Actor reads Stack Overflow's official public API, pages through results up to maxResults, and removes duplicate question IDs.
- Text search (
searchQueryset) ranks byrelevanceby default; you can also sort byactivity,creation, orvotes. - Tag browse (
searchQueryempty,tagsset) lists questions that carry every tag you give, sorted byactivity,creation, orvotes. Relevance needs a search phrase. - Filters:
minScore(not with relevance sorting), andfromDate/toDateasYYYY-MM-DDcreation-date bounds in UTC.
Can I build a Stack Overflow dataset for one tag over time?
Yes. Browse a tag with sort: "creation" and a date window, and export the dataset. Repeating the run per month gives you question counts, scores, and answer rates per tag, the "questions per month" view that analysts often ask for.
{"searchQuery": "","tags": ["rust"],"sort": "creation","fromDate": "2026-09-01","toDate": "2026-09-30","maxResults": 500}
One run returns at most 500 questions, so busy tags need narrower date windows.
When should I use it, and when not?
Use it when you need:
- unanswered or low-answer questions on your product's tag, for docs and developer-relations work;
- the most-viewed questions for a technology, for content planning;
- exact questions by URL, with or without their body text;
- a recurring snapshot of new questions on a set of tags.
Do not use it when you need:
- answers, comments, revisions, or full user profiles: the Actor returns questions only;
- the full history of every question: Stack Exchange's official data dump suits bulk analysis better;
- developer rants and sentiment: use devRant Scraper;
- open-source repositories by language or stars: use GitHub Repository Search Scraper.
How do I run it?
Text search with bodies:
{"searchQuery": "typescript generics","tags": ["typescript"],"sort": "relevance","includeBody": true,"maxResults": 25}
Exact questions by URL. Set searchQuery to an empty string; otherwise any maxResults slots left after the URLs are filled from the text search:
{"searchQuery": "","startUrls": [{ "url": "https://stackoverflow.com/questions/37233735/interfaces-vs-types-in-typescript" }],"sort": "activity","maxResults": 1}
| Input | Default | Bounds |
|---|---|---|
searchQuery | typescript | Up to 300 characters; may be empty for tag browse or URL lookup |
tags | none | Up to 5 tags |
startUrls | none | stackoverflow.com/questions/<id>/… URLs only |
sort | relevance | relevance, activity, creation, votes |
minScore | none | −100 to 100,000; not with relevance |
fromDate, toDate | none | YYYY-MM-DD |
includeBody | false | Adds bodyHtml and bodyText |
maxResults | 25 | 1–500, also the billing cap |
Invalid combinations, such as relevance sorting without a search phrase or a date range that ends before it starts, are rejected before any question is charged.
JavaScript (apify-client)
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('muhammadafzal/stack-overflow-questions-scraper').call({searchQuery: 'python async await',tags: ['python'],maxResults: 50,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items.map((q) => [q.score, q.answerCount, q.title]));
Python (apify-client 3.x)
import osfrom apify_client import ApifyClientclient = ApifyClient(os.environ["APIFY_TOKEN"])run = client.actor("muhammadafzal/stack-overflow-questions-scraper").call(run_input={"searchQuery": "python async await", "tags": ["python"], "maxResults": 50})for q in client.dataset(run.default_dataset_id).iterate_items():print(q["score"], q["answerCount"], q["title"])
Use it from an AI assistant
The Actor works from Claude, ChatGPT, Cursor, or any MCP client through Apify's MCP server. Add https://mcp.apify.com/?tools=muhammadafzal/stack-overflow-questions-scraper as a server, then ask, for example: "Find the 30 most-voted Stack Overflow questions tagged rust from this year and list which ones still have no accepted answer."
What does the output look like?
Records for the default typescript search, built from Stack Overflow's public API response on 2026-10-27:
[{"questionId": 37233735,"title": "Interfaces vs Types in TypeScript","url": "https://stackoverflow.com/questions/37233735/interfaces-vs-types-in-typescript","tags": ["typescript", "interface", "typescript-types"],"score": 2813,"viewCount": 1140498,"answerCount": 25,"isAnswered": true,"acceptedAnswerId": 37233777,"authorName": "user6101582","authorId": null,"authorReputation": null,"creationDate": "2016-05-15T01:53:52.000Z","lastActivityDate": "2026-07-27T16:04:10.000Z","lastEditDate": "2023-07-16T08:38:38.000Z","closedDate": null,"closedReason": null,"contentLicense": "CC BY-SA 4.0","bodyHtml": null,"bodyText": null,"source": "Stack Exchange API v2.3","scrapedAt": "2026-10-27T07:40:00.000Z"},{"questionId": 12694530,"title": "What is TypeScript and why should I use it instead of JavaScript?","url": "https://stackoverflow.com/questions/12694530/what-is-typescript-and-why-should-i-use-it-instead-of-javascript","tags": ["javascript", "typescript"],"score": 1940,"viewCount": 698176,"answerCount": 5,"isAnswered": true,"acceptedAnswerId": 12694578,"authorName": "Mohammed Thabet","authorId": 353953,"authorReputation": 21719,"creationDate": "2012-10-02T16:37:58.000Z","contentLicense": "CC BY-SA 4.0","bodyHtml": null,"bodyText": null,"source": "Stack Exchange API v2.3"}]
How much does it cost to scrape Stack Overflow?
You pay per question delivered, plus one start fee. Platform usage is included in these prices.
| Event | FREE | BRONZE | SILVER | GOLD, PLATINUM, DIAMOND |
|---|---|---|---|---|
| Stack Overflow question (per question) | $0.02 | $0.02 | $0.02 | $0.016 |
| Actor start (per started GB of allocated memory) | $0.005 | $0.005 | $0.005 | $0.005 |
The default memory is 256 MB, so a run normally pays one start event. Worked totals on the FREE tier:
- Default run, 25 questions: $0.005 + 25 × $0.02 = $0.505.
- 500 questions for one tag and month: $0.005 + 500 × $0.02 = $10.005 (GOLD: $8.005).
Rejected input and searches with no matches charge no question events. The run's progress message currently quotes an older per-question figure; the table above is the live price.
Limits and reliability
- Up to 500 questions per run; each API page holds up to 100 questions.
- The Actor follows the API's
backoffinstructions and retries temporary errors up to three times with growing delays. - Without an API key, Stack Overflow's API allows a limited number of requests per IP address per day. If that quota is exhausted or access is throttled, the run writes
OUTPUT.status: "blocked"(or"failed"for other API errors) with the reason, saves no invented questions, charges no result events, and ends as Failed so schedules and integrations notice. - Relevance ranking is Stack Overflow's own and can change between runs.
FAQ
Do I need a Stack Exchange API key?
No. The Actor calls the public Stack Exchange API without a key and handles paging and retries for you.
Can I get the question body text?
Yes. Set includeBody to true to add bodyHtml and a cleaned bodyText to every record.
Does it return answers or comments?
No. It returns questions with answerCount, isAnswered, and acceptedAnswerId. Answer and comment text are not collected.
How is this different from the Stack Exchange data dump?
The data dump is a periodic full export of every post, suited to bulk research. This Actor gives you current, filtered questions on demand, with today's scores and view counts, without downloading or querying the full dump.
Can I scrape other Stack Exchange sites?
No. Only stackoverflow.com questions are supported. URLs from other sites are skipped with a warning in OUTPUT.
Can I export the questions to CSV or Excel?
Yes. Export the run's dataset as JSON, CSV, Excel, XML, or RSS from Apify Console, or read it through the API.
Can I monitor new questions on my tag?
Yes. Save a tag-browse input with sort: "creation" as a Task and attach an Apify schedule.
Related Actors
- devRant Scraper: public developer rants with tags, scores, and authors.
- GitHub Repository Search Scraper: repositories by keyword, language, topic, and stars.
- AlternativeTo Scraper: ranked software alternatives for any product.
- iPad App Store Scraper: iPad app prices, ratings, and versions.
Legal and responsible use
The Actor reads public questions through Stack Overflow's official API and does not log in or bypass access controls. Questions are licensed under the contentLicense shown in each record, which requires attribution when you republish them. Follow Stack Overflow's terms and do not use author data for spam, harassment, or profiling.
Last verified: 2026-10-27