Stack Exchange Scraper: Questions, Answers & Tags avatar

Stack Exchange Scraper: Questions, Answers & Tags

Pricing

from $0.50 / 1,000 rows

Go to Apify Store
Stack Exchange Scraper: Questions, Answers & Tags

Stack Exchange Scraper: Questions, Answers & Tags

Search Stack Overflow and 24 other Stack Exchange sites: question title and full body, score, views, tags, author reputation, and optionally every answer with the accepted one flagged. Official API, no key needed.

Pricing

from $0.50 / 1,000 rows

Rating

0.0

(0)

Developer

Daniel Meshulam

Daniel Meshulam

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

19 hours ago

Last modified

Share

Search Stack Overflow and 24 other Stack Exchange sites, and get the full text back, not just titles.

{ "site": "stackoverflow", "tags": ["python", "asyncio"], "sortBy": "votes" }

No API key required.

The filter that most Actors forget

Stack Exchange's API omits question and answer bodies unless you explicitly pass filter=withbody. An Actor that does not pass it returns rows with a title, a score, and no content, which looks exactly like a site that had nothing to say, and is useless for anything downstream.

Every request here sends it. You get the body.

What you can ask for

searchQueriesfree text, searched across titles and bodies
tagsall-of tag filter; use it alone to pull the top questions in a tag
sortByscore, recent activity, newest, relevance
minScoreonly questions above a score
acceptedOnlyonly questions where an answer was accepted
includeAnswersevery answer to every question found, accepted one flagged

25 sites are offered as a dropdown, Stack Overflow, Server Fault, Super User, Ask Ubuntu, Security, DBA, Unix & Linux, Data Science, Cross Validated, Physics, Math, WordPress, Magento, Salesforce, SharePoint, Law, Money, and more, so there is no site slug to get wrong.

Output

Rows carry recordType, so questions and answers stay separable:

  • question, title, full body, tags, score, views, answer count, accepted answer id, author + reputation, asked and last-activity dates, close reason
  • answer, full body, score, isAccepted, author + reputation, dates, and the questionId it belongs to

The daily quota, stated plainly

Unauthenticated Stack Exchange allows 300 requests per day per IP. Every response reports what is left, and that number is read: when it hits zero you get one error row saying the quota is spent, instead of an opaque failure.

Proxy rotation buys a fresh 300 per address, and answers are fetched 100 question ids per request rather than one at a time, the difference between one request and a hundred against the same budget.

Use cases

  • Developer research: what people actually struggle with in your library, ranked by views
  • Support content: mine accepted answers for docs and FAQ material
  • Product feedback: search your product name, sort by newest, watch what breaks
  • Training and RAG corpora: question/answer pairs with scores as a quality signal
  • Competitive intelligence: tag volume and sentiment around a competitor's tool

Pricing

Charged per row returned. A query Stack Exchange rejects, or an exhausted daily quota, produces an error row and costs $0.00.

Which sites, and what a Stack Overflow scrape returns

This reads the official Stack Exchange API 2.3, not rendered HTML, so the field names do not move when someone redesigns the site.

site picks the network member. All 25 supported:

Programmingstackoverflow softwareengineering datascience gis
Sysadmin and opsserverfault superuser askubuntu unix dba security
Vendor stackssharepoint salesforce magento wordpress drupal apple
Science and mathsmath stats physics electronics
Everything elseell english money law cooking

Per question: title, body as plain text, score, view count, answer count, tags, author, creation and activity dates, whether an answer was accepted, and the canonical URL. Turn on includeAnswers and each accepted or top-voted answer arrives as its own row tied to the question.

Filters that run before you are charged: tags, minScore, acceptedOnly, and a sortBy of votes, activity, creation or relevance. A question dropped by a filter is not billed, so a narrow query costs less rather than the same.

No API key is needed. Stack Exchange allows a modest anonymous quota, which is what this uses, and it paces requests to stay inside it.

Do you need an API key? No. Is there a free tier? Yes.

The two things people search for in this category, measured, are free and API key: stack overflow api key.

So, plainly:

  • No API key. Nothing to register for, nothing to rotate, no key to leak in a repo. The source is a public API published deliberately by its owner.
  • No proxy setup. The source does not bot-wall datacenter addresses, so the default works.
  • Pay per result, not per month. There is no subscription and no minimum. Rows that error or that your filters drop are not charged.
  • Free to try. Run it with the prefilled input and see real rows before deciding anything.

Notes

  • All content is CC BY-SA licensed by Stack Exchange. Attribution is your responsibility when republishing; the url field on every row is there for exactly that.
  • Bodies are converted from HTML to plain text and capped at 4,000 characters.
  • minScore forces sorting by score, because the API's minimum filter applies to whatever field the sort uses, asking for "score ≥ 50, newest first" is not a thing the API can express, and silently returning the wrong rows would be worse than saying so.

FAQ

Do I need a Stack Exchange API key?

No. It works unauthenticated at 300 requests per day per IP. Every response reports the remaining quota, and when it reaches zero you get one error row saying the quota is spent rather than an opaque failure. Proxy rotation buys a fresh 300 per address.

Does it return the full question and answer text?

Yes. Stack Exchange's API omits bodies unless the request passes filter=withbody, and an Actor that forgets it returns titles and scores with no content, which looks exactly like a site that had nothing to say. Every request here sends it. Bodies are converted from HTML to plain text and capped at 4,000 characters.

Can I search sites other than Stack Overflow?

Yes, 25 of them, as a dropdown so there is no site slug to get wrong: Server Fault, Super User, Ask Ubuntu, Security, DBA, Unix & Linux, Data Science, Cross Validated, Physics, Math, WordPress, Magento, Salesforce, SharePoint, Law, Money and more.

How do I get the top questions for a tag?

Use tags on its own, with no searchQueries, and set sortBy to votes. The tag filter is all-of, so ["python", "asyncio"] means both tags, not either.

Can I get only questions that have an accepted answer?

Set acceptedOnly: true, and includeAnswers: true to pull the answers themselves. The accepted one is flagged with isAccepted.

Why does minScore change my sort order?

Because the API's minimum filter applies to whatever field the sort uses, so "score ≥ 50, newest first" is not a query it can express. Setting minScore forces sorting by score. Silently returning the wrong rows would be worse than saying so.

Can I use this content in a product or a training set?

All Stack Exchange content is CC BY-SA. Attribution is your responsibility when republishing, and the url field on every row exists for exactly that. Scores make a reasonable quality signal for filtering a corpus.