StackOverflow Scraper · Questions, Answers, Tags & Users avatar

StackOverflow Scraper · Questions, Answers, Tags & Users

Pricing

from $1.30 / 1,000 item returneds

Go to Apify Store
StackOverflow Scraper · Questions, Answers, Tags & Users

StackOverflow Scraper · Questions, Answers, Tags & Users

Stack Overflow Scraper (StackOverflow Scraper) to scrape questions, answers, tags, user profiles, and developer Q&A datasets across Stack Overflow and Stack Exchange sites. Filter by tag, query, score, date, and accepted answers. No login or API key required.

Pricing

from $1.30 / 1,000 item returneds

Rating

0.0

(0)

Developer

Tarek Etman

Tarek Etman

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 hours ago

Last modified

Share

reapX — public sources in, addressable records out

StackOverflow Scraper (Stack Overflow Scraper) · Questions, Answers & Tags

Stack Overflow Scraper and StackOverflow scraper to extract questions, answers, tags and user profiles through the public Stack Exchange API. No login, no cookies, no headless browser, and no API key needed for normal runs. Run it empty and you get the most recently active questions; add a tag, a score floor or a date window and you get exactly the slice you want.

Maintained by reapX. Every row cites the Apify run that produced it — nothing is inferred, modelled or filled in, and a field absent from the source is absent from the row. The extracted archive for this source is browsable at reapx.dev/data/stackoverflow-scraper/ and mirrored as an open dataset on Hugging Face and Kaggle. Questions: reapxdev@proton.me

Stack Overflow Scraper data output

DatasetOne row perKeyed by
QuestionsQuestion, with score, views, answer count, tags and authorquestionId
AnswersAnswer, with score, accepted flag and its questionanswerId
TagsTag, with how many questions carry ittagName
UsersUser profile, with reputation and badge countsuserId

Optionally attach the full body text of each post, and every answer to each question - highest score first, with author, accepted flag and body.

Five named dataset views ship with it: Questions, Answers, Tags, Users and Unanswered & gaps.

How to scrape Stack Overflow questions and answers

  1. Pick what to scrape. Leave everything else empty for the most recently active questions.
  2. Filter by tag, title text, full-text search, score, answers, accepted status or a date window.
  3. Turn on Include the full body text and Include answers with each question if you need the content, not just the metadata.
  4. Set Max items. You are charged once per item returned, so that is your cost cap.

Filters

  • Tagged with all of and Not tagged with - exact Stack Overflow tag names
  • Full-text search and Title contains - the latter is far more precise
  • Minimum score, minimum answers
  • Has an accepted answer, Unanswered only, Closed questions only
  • Author user ID - everything one person asked
  • Date window - a rolling "last N days" or explicit from/to dates
  • Tag name contains, display name contains, minimum reputation
  • Stack Exchange site - any site key, not just Stack Overflow

What you can build with it

  • Developer pain-point research - unansweredOnly on your library's tag shows exactly where docs fail.
  • Technology trend tracking - scrape tags monthly and diff questionCount to see what is growing.
  • Support-content mining - top-voted questions plus answers for a tag is a ready-made FAQ corpus.
  • Competitive intelligence - question volume and sentiment across rival tools' tags.
  • RAG and fine-tuning corpora - question and answer bodies with a stable id and a CC licence field on every row.
  • Expert identification - top users by reputation in a tag, for recruiting or developer relations.
  • Answer-quality analysis - accepted vs highest-scoring answers, and how long acceptance took.

Input configuration

Every field is optional. The prefilled values below are what runs if you press Start without changing anything.

What to scrape

Leave every filter below empty and the run returns the most recently active Stack Overflow questions.

FieldTypeAcceptsWhat it does
datasetstringquestions, answers, tags, usersWhich Stack Exchange collection to read. Each returns a different kind of row, keyed by its own Stack Exchange identifier. Prefilled with "questions".
sitestringfree textWhich site to read. Defaults to Stack Overflow; any Stack Exchange site key works, e.g. serverfault, superuser, askubuntu, math, unix, dba. Prefilled with "stackoverflow".

How much to fetch

Volume and ordering. You pay per item returned, so this decides the price of the run.

FieldTypeAcceptsWhat it does
maxItemsinteger1 to 2500Hard cap on how many rows the run returns. This is also your cost cap: you are charged once per item returned. The API serves at most 2,500 items for one query. Prefilled with 100.
sortBystringone of 8: activity, votes, creation, relevance, ...Ordering. Questions accept activity, votes, creation and relevance; answers accept activity, votes and creation; tags accept popular, activity and name; users accept reputation, creation, name and modified. An unsupported value falls back to the dataset's default. Prefilled with "activity".
orderstringdesc, ascDescending gives the highest or newest first. Prefilled with "desc".

Question filters

These apply when you are scraping questions.

FieldTypeAcceptsWhat it does
querystringfree textFree-text search across question titles and bodies. Pair it with sort "Best match" for relevance ranking.
titleContainsstringfree textMatch text in the question title only, which is far more precise than a body search.
taggedlistone value per lineOnly questions carrying every one of these tags. Use the exact Stack Overflow tag spelling, e.g. python, pandas, machine-learning.
notTaggedlistone value per lineExclude questions carrying any of these tags.
minScoreintegerfree textOnly items at or above this vote score. Requires sort "Votes / score", which is how the API applies a floor.
minAnswersinteger1 to anyOnly questions with at least this many answers.
acceptedOnlytrue/falsecheckboxOnly questions where the asker accepted an answer - the solved set.
unansweredOnlytrue/falsecheckboxOnly questions with no answers and nothing accepted - where the gaps are.
closedOnlytrue/falsecheckboxOnly questions the community has closed.
userintegerfree textOnly questions asked by this Stack Exchange user ID.

Tag and user filters

These apply when you are scraping tags or users.

FieldTypeAcceptsWhat it does
tagNameContainsstringfree textOnly tags whose name contains this text. Applies when scraping tags.
userNameContainsstringfree textOnly users whose display name contains this text. Applies when scraping users.
minReputationintegerfree textOnly users at or above this reputation. Requires sort "Reputation".

Dates

All dates are YYYY-MM-DD. Stack Overflow data runs back to 2008.

FieldTypeAcceptsWhat it does
lastNDaysinteger1 to 20000Rolling window on the creation date. Ignored if you set an explicit "From date".
dateFromstringfree textEarliest creation date, YYYY-MM-DD.
dateTostringfree textLatest creation date, YYYY-MM-DD.

Output detail

Extra columns. These change the row size and the runtime, not the price.

FieldTypeAcceptsWhat it does
includeBodytrue/falsecheckboxAdd the question or answer body as both plain text and original HTML. Off by default to keep rows small.
includeAnswerstrue/falsecheckboxAttach every answer to each question row, highest score first, with author and accepted flag. Applies when scraping questions. Costs one extra request per 100 questions.
apiKeystringfree textOptional and free from stackapps.com/apps/oauth/register. Without one, Stack Exchange allows 300 requests per day per IP; with one, 10,000. Only needed for very large or frequent runs.

Pricing

Pay per event. The primary event is Item returned (item-returned), charged at $0.002 per event on the free plan, falling to $0.0008 on the highest tier.

Charged once per complete question, answer, tag or user row written to the default dataset. A throttled or unreachable API, a rejected query and a search that matches nothing are never charged.

Minimum charge cap per run: $0.002.

Tiered discounts apply automatically on every paid Apify plan. Platform usage is absorbed by the Actor, so the per-event price is the whole price.

Usage examples

The prefilled run, which is what Start does with nothing changed

{
"dataset": "questions",
"site": "stackoverflow",
"maxItems": 100,
"sortBy": "activity",
"order": "desc"
}

Filter by stack exchange site

{
"dataset": "questions",
"site": "serverfault",
"maxItems": 100,
"sortBy": "activity",
"order": "desc"
}

Filter by sort by

{
"dataset": "questions",
"site": "stackoverflow",
"maxItems": 100,
"sortBy": "votes",
"order": "desc"
}
{
"dataset": "questions",
"site": "stackoverflow",
"maxItems": 100,
"sortBy": "activity",
"order": "desc",
"query": "async await deadlock"
}

Filter by title contains

{
"dataset": "questions",
"site": "stackoverflow",
"maxItems": 100,
"sortBy": "activity",
"order": "desc",
"titleContains": "memory leak"
}

Output example

One row, exactly as the actor wrote it to the dataset:

{
"itemId": "22343224",
"itemType": "question",
"site": "stackoverflow",
"scrapedAt": "2026-08-03T04:01:45Z",
"questionId": 22343224,
"title": "What's the difference between tilde(~) and caret(^) in package.json?",
"link": "https://stackoverflow.com/questions/22343224/whats-the-difference-between-tilde-and-caret-in-package-json",
"score": 5611,
"viewCount": 2158729,
"answerCount": 23,
"isAnswered": true,
"hasAcceptedAnswer": true,
"acceptedAnswerId": 22345808,
"tags": [
"node.js",
"npm",
"package.json",
"caret",
"semantic-versioning"
],
"createdAt": "2014-03-12T06:02:21Z",
"lastActivityAt": "2025-05-14T10:28:46Z",
"ownerUserId": 1154350,
"ownerDisplayName": "Fizer Khan"
}

That row carries 21 fields in total; 18 are shown.

Fields on every row

FieldTypeWhat it is
acceptRateintegerPercentage of the user’s questions with an accepted answer. Present on: users.
acceptedAnswerIdintegerId of the accepted answer, when there is one. Present on: questions.
answerCountintegerHow many answers the question has. Present on: questions.
answerIdintegerNumeric Stack Overflow answer id. Present on: answers.
answerslistAnswers to the question, highest score first, each with id, score, accepted flag and author. Present only when Include answers with each question is on. Present on: questions.
answersFetchedintegerHow many answers were attached to this question row. Present on: questions.
bodyHtmlstringPost body as the original HTML. Present only when Include the full body text is on. Present on: answers, questions.
bodyTextstringPost body as plain text, HTML stripped. Present only when Include the full body text is on. Present on: answers, questions.
bronzeBadgesintegerBronze badge count. Present on: users.
contentLicensestringCreative Commons licence the content is published under. Present on: answers, questions.
createdAtstringUTC ISO 8601 timestamp the item was created. Present on: answers, questions, users.
displayNamestringUser display name. Present on: users.
goldBadgesintegerGold badge count. Present on: users.
hasAcceptedAnswertrue/falseWhether the asker accepted an answer. Present on: questions.
hasSynonymstrue/falseWhether the tag has registered synonyms. Present on: tags.
isAcceptedtrue/falseWhether this answer was accepted by the asker. Present on: answers.
isAnsweredtrue/falseWhether Stack Overflow considers the question answered. Present on: questions.
isClosedtrue/falseWhether the question has been closed. Present on: questions.
isModeratorOnlytrue/falseWhether only moderators may apply the tag. Present on: tags.
isRequiredtrue/falseWhether the tag is required on this site. Present on: tags.
itemIdstringStack Exchange identifier for the thing this row describes - question id, answer id, user id or tag name. Stable and how the row is addressed downstream.
itemTypestringWhich kind of Stack Exchange object this row is.
lastAccessAtstringUTC ISO 8601 timestamp the user was last active. Present on: users.
lastActivityAtstringUTC ISO 8601 timestamp of the most recent activity. Present on: answers, questions.
linkstringCanonical link to the question, answer, tag or user profile.
locationstringSelf-reported location on the profile. Present on: users.
ownerDisplayNamestringDisplay name of the author. Present on: answers, questions.
ownerReputationintegerReputation of the author at scrape time. Present on: answers, questions.
ownerUserIdintegerStack Exchange user id of the author. Present on: answers, questions.
questionCountintegerHow many questions carry the tag. Present on: tags.
questionIdintegerNumeric Stack Overflow question id. Present on: answers, questions.
reputationintegerTotal reputation. Present on: users.
reputationChangeMonthintegerReputation gained in the last month. Present on: users.
reputationChangeYearintegerReputation gained in the last year. Present on: users.
scoreintegerNet votes on the post. Present on: answers, questions.
scrapedAtstringUTC ISO 8601 timestamp of this run.
silverBadgesintegerSilver badge count. Present on: users.
sitestringStack Exchange site key the row came from.
tagNamestringThe tag itself, as Stack Overflow spells it. Present on: tags.
tagslistTags on the question, reusable as the Tagged with all of input. Present on: questions.
titlestringQuestion title, HTML entities decoded. Present on: questions.
userIdintegerNumeric Stack Exchange user id. Present on: users.
userTypestringAccount type, e.g. registered or moderator. Present on: users.
viewCountintegerHow many times the question has been viewed. Present on: questions.
websiteUrlstringSelf-reported website on the profile. Present on: users.

5 named dataset views ship with it: Questions, Answers, Tags, Users, Unanswered & gaps. They drive the Output tab in Console and the Output block on the Actor's .md page.

FAQ

How do I scrape Stack Overflow questions?

Run this actor with no input and it returns the most recently active questions. Everything comes from api.stackexchange.com, the official Stack Exchange API.

Do I need an API key or a login?

Not for normal runs. Stack Exchange allows 300 requests per day per IP anonymously, and this actor pulls 100 items per request. For very large or frequent jobs, register a free key at stackapps.com and paste it into the optional Stack Apps API key field to raise the limit to 10,000 requests per day.

How do I get all questions for a tag?

Put the tag into Tagged with all of - for example python - and set Max items. Add more tags to require all of them at once, which is how Stack Overflow's own tag intersection works.

How do I find unanswered questions?

Turn on Unanswered only. You get questions with no answers and nothing accepted, which is the fastest way to find gaps in a library's documentation or support coverage.

Can I get the answers as well as the questions?

Yes. Turn on Include answers with each question and each row gains an answers array, highest score first, with author, accepted flag and - if body text is on - the answer text. It costs one extra API request per 100 questions.

How do I get the highest-voted questions?

Set Sort by to "Votes / score" and optionally a Minimum score. The score floor only works with that sort, which is how the API applies it.

Can I scrape other Stack Exchange sites?

Yes. Change Stack Exchange site to any site key - serverfault, superuser, askubuntu, math, unix, dba and so on. Every filter works the same way.

How many items can one run return?

Up to 2,500 for a single query, which is the API's own paging ceiling. Split larger jobs into date windows and run each one.

What licence does the content carry?

Every question and answer row includes contentLicense - normally CC BY-SA. Attribution requirements apply when you republish the text.

Can an AI agent call this actor?

Yes. Every input and output field carries a title, description and example, and every row is addressed by its Stack Exchange itemId, so an agent can fill the input and chain the output without extra prompting.


Unofficial - not affiliated with Stack Overflow. Collects public data only. reapx. Contact reapxdev@proton.me.

The full published archive

Each archive page carries Dataset JSON-LD, a canonical URL and the identifiers used, so an agent can resolve an entity without running anything. Nothing on those pages is estimated or modelled.

🧪 Example input

A real, runnable configuration — this is an actual input this Actor has run with.

{
"dataset": "questions",
"tagged": [
"node.js"
],
"sortBy": "votes",
"order": "desc",
"maxItems": 300
}

📄 Sample output

One real row from a real run of this Actor, unedited.

{
"itemId": "22343224",
"itemType": "question",
"site": "stackoverflow",
"scrapedAt": "2026-08-03T04:01:45Z",
"questionId": 22343224,
"title": "What's the difference between tilde(~) and caret(^) in package.json?",
"link": "https://stackoverflow.com/questions/22343224/whats-the-difference-between-tilde-and-caret-in-package-json",
"score": 5611,
"viewCount": 2158729,
"answerCount": 23,
"isAnswered": true,
"hasAcceptedAnswer": true,
"acceptedAnswerId": 22345808,
"tags": [
"node.js",
"npm",
"package.json",
"caret",
"semantic-versioning"
],
"createdAt": "2014-03-12T06:02:21Z",
"lastActivityAt": "2025-05-14T10:28:46Z",
"ownerUserId": 1154350,
"ownerDisplayName": "Fizer Khan",
"ownerReputation": 93957,
"isClosed": false,
"contentLicense": "CC BY-SA 4.0"
}

How it works

  1. You set the filters below, or none at all.
  2. The Actor calls the source's own public endpoint and pages through the results.
  3. Every row is pushed to the dataset as it is built, not buffered to the end — so a run that hits its time limit still returns everything it collected up to that point.
  4. You are charged per row returned, so the maximum-results field is also your cost cap.

💬 Your feedback

Found a bug, or need a field this does not return yet? Open an issue on the Actor's Issues tab, or write to reapxdev@proton.me. Bugs get fixed and reasonable field requests get added.