Stack Exchange Q&A Scraper
parseforge/stack-exchange-qa-scraper
Developer toolsEducationOther
Scrapes Stack Exchange questions and answers by site, tag, search query, or date range. Returns each question as a flat row with score, view count, and answer bodies.
- Total users
- 2
- Monthly active
- 0
- Total runs
- 123
- Bookmarked
- 0
- Rating
- Not rated yet
- Last modified
- 9 days ago
Overview
Stack Exchange Q&A Scraper
Scrape Stack Exchange questions and answers from any site, tag, or search query, up to a million per run. Every question comes with its score, view count, accepted answer, and full answer bodies. No API key or login. Export to CSV, JSON, Excel, or XML.
Stack Exchange's official API needs an app registration, OAuth, and rate-limits you. This reads the public question feeds directly, filtered by site, tag, search query, or date range, and returns each match in one fixed schema. It covers Stack Overflow, Server Fault, Super User, Ask Ubuntu, and 28 more communities.
| Who uses it | What they scrape Stack Exchange for |
|---|---|
| Market researchers | Which technical topics a community is discussing this week |
| Developer advocates | Common pain points and unanswered questions in a technology tag |
| Data scientists | Building a dataset of question-answer pairs for model training |
| SEO analysts | Finding high-traffic questions to target with content |
| Community managers | Monitoring activity and trending tags on a Stack Exchange site |
What it does
This Actor collects Stack Exchange questions and their answers by site, tag, search query, or date range, and returns each one as a flat row.
- ๐ Search by keyword: free-text search in question titles and bodies, e.g. 'kubernetes ingress'.
- ๐ท๏ธ Filter by tag: collect only questions tagged python, react, or any other tag.
- ๐ Date range: restrict to questions created between two dates.
- ๐ Sort options: order by activity, votes, creation date, hot, week, or month.
- ๐ฌ Include answers: fetch full answer bodies for each question, with scores and accepted status.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with Stack Exchange data
๐ Track topics and trends.
A market researcher runs the Actor weekly on the 'python' tag, sorted by votes, to see which libraries and problems are gaining attention.
๐ง Build training data.
A data scientist collects question-answer pairs from Stack Overflow with includeAnswers enabled, then filters for accepted answers to create a high-quality dataset.
๐ Find content gaps.
An SEO analyst searches for a keyword like 'react hooks' and exports the top questions to identify topics that need better documentation or blog posts.
๐ ๏ธ Monitor developer pain.
A developer advocate runs the Actor daily on a product's tag, sorted by activity, to catch new bug reports and feature requests early.
๐ Localize insights.
A community manager scrapes es.stackoverflow or ja.stackoverflow to understand what Spanish- or Japanese-speaking developers are asking.
Why choose this scraper
| What you get | |
|---|---|
| No API key | Uses the public anonymous API, no registration or OAuth |
| Fixed schema | Every question returns the same flat fields, ready for analysis |
| Up to 1M rows | Collect up to a million questions per run |
| Multiple sites | 32 Stack Exchange communities, including Stack Overflow and localized sites |
How it compares
No other Store actor targets Stack Exchange the same way, so the honest comparison is with the alternatives teams actually weigh.
| Stack Exchange Q&A Scraper | Build it in-house | By hand | |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When Stack Exchange changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |
Configure the run
Drive the Actor from a Stack Exchange site, a tag, and a search query, alone or together, and filters run as each question is read so only matches reach your dataset. The Input tab lists every parameter.
A first run with the defaults:
{
"maxItems": 10,
"site": "stackoverflow",
"sort": "activity"
}
A larger pull:
{
"maxItems": 200,
"site": "stackoverflow",
"sort": "activity"
}
Pricing
Pay-per-result: $0.011 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $1.10 |
| 1,000 results | $11.00 |
| 10,000 results | $110.00 |
New Apify accounts start with $5 in free credit.
Free users
Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.
Run it
- Create a free Apify account with $5 in credit.
- Open the Stack Exchange Q&A Scraper.
- Set your inputs and any filters, then click Start.
- Export the results as CSV, Excel, JSON, or XML from the Dataset tab.
Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.
Use with AI agents (MCP)
Give an AI agent live access to Stack Exchange through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/stack-exchange-qa-scraper"
Then prompt it in plain language to run the scraper and read back the results.
Troubleshooting
Why am I getting no results?
Check your filters. If you set both a tag and a search query, they are combined with AND, so the question must match both. Also verify the date range and that the site is correct.
Why did the run stop early?
The public API has a daily quota of 300 requests per IP. If you hit the quota, the Actor stops. Wait for the quota to reset or run from a different IP.
Why are some questions missing answers?
If 'Include answers' is enabled, the Actor fetches answers for each question. However, some questions may have no answers, or the API may return an error for a specific question. Those are skipped.
Why is the output file empty?
Check the 'Maximum questions' setting. If it is set to 0 or a very low number, no data will be collected. Also ensure your filters are not too restrictive.
Can I get more than 300 requests per day?
The anonymous quota is fixed. For higher limits, you would need to register an app and use an API key, which this Actor does not support. Consider running multiple instances from different IPs.
FAQ
| Question | Answer |
|---|---|
| Does this Actor need an API key? | No. It uses the public anonymous Stack Exchange API, which allows 300 requests per day per IP address. No registration or OAuth is required. |
| Which Stack Exchange sites are supported? | All 32 sites in the dropdown are supported, including Stack Overflow, Server Fault, Super User, Ask Ubuntu, Math, Stats, and localized sites like ja.stackoverflow, es.stackoverflow, ru.stackoverflow, and pt.stackoverflow. |
| Can I get answers along with questions? | Yes. Enable the 'Include answers' checkbox and the Actor will fetch the full answer bodies for each question, including scores and whether the answer is accepted. |
| How many questions can I collect in one run? | You can set 'Maximum questions' up to 1,000,000. The actual number depends on the API quota and the filters you apply. |
| Can I search by keyword? | Yes. Use the 'Question keyword or tag' field to search in both question titles and bodies. For example, 'kubernetes ingress' returns questions containing that phrase. |
| Can I filter by tag? | Yes. Use the 'Tag (optional)' field to collect only questions with a specific tag, like 'python' or 'react'. |
| Can I filter by date? | Yes. Set 'From date' and 'To date' in YYYY-MM-DD format to restrict results to questions created within that range. |
| What sorting options are available? | You can sort by activity, votes, creation date, hot, week, or month. The default is activity. |
| What output formats are supported? | The Actor exports to CSV, JSON, Excel, and XML. You can choose the format when you download the dataset. |
| Is there a rate limit? | The public API allows 300 requests per day per IP. If you need more, you can run the Actor from different IPs or wait for the quota to reset. |
| Can I scrape multiple sites in one run? | No, each run targets one site. To scrape multiple sites, run the Actor multiple times with different site settings. |
| Does this Actor handle pagination? | Yes, it automatically paginates through results until it reaches the maximum number of questions you set or the API quota is exhausted. |
Related actors
Browse the full ParseForge collection for more scrapers.
๐ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.
โ ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Stack Exchange, Inc. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.
Input
| Field | Type | What it does | Default |
|---|---|---|---|
| maxItems | integer | How many questions to collect per run. | 10 |
| site | string (32 options) | Which Stack Exchange site to query. | stackoverflow |
| tag | string | Filter by tag, e.g. python, react, kubernetes. | not set |
| searchQuery | string | Free-text search in titles + bodies. | not set |
| sort | string (6 options) | How to order results. | activity |
| fromDate | string | Earliest creation date (YYYY-MM-DD). | not set |
| toDate | string | Latest creation date (YYYY-MM-DD). | not set |
| includeAnswers | boolean | When enabled, fetch answers for each question. | true |
Pricing
from $8.25 per 1,000 results
| Charged for | What it is | Price each |
|---|---|---|
| Item | One row in the default dataset. | $0.00825 to $0.011 |
Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.
API
One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.
curl -X POST "https://api.apify.com/v2/acts/parseforge~stack-exchange-qa-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"helloWorld": 123
}' Examples
Input that runs as-is.
{
"helloWorld": 123
} Reviews
No reviews yet. Be the first.
Issues
We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.
Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.
