Stack Overflow & Stack Exchange Scraper avatar

Stack Overflow & Stack Exchange Scraper

Pricing

$2.00 / 1,000 question scrapeds

Go to Apify Store
Stack Overflow & Stack Exchange Scraper

Stack Overflow & Stack Exchange Scraper

Search Stack Overflow and any Stack Exchange site by keyword, tag, score and date, browse a tag, or paste question URLs from any site. Each question has full text, tags, views and the top answers with the accepted one flagged. Many searches per run, each with its own cap. $2 per 1,000 questions.

Pricing

$2.00 / 1,000 question scrapeds

Rating

0.0

(0)

Developer

TidyHarvest

TidyHarvest

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Search Stack Overflow and any of the 170+ Stack Exchange sites (Server Fault, Super User, Ask Ubuntu, Math, Cooking, Law and more) and get questions with their answers as clean JSON. Filter by keyword, tags, minimum score, date range and accepted answer, and sort by votes, activity or newest. Every question comes with the full text (plain text and original HTML), score, views, tags, author and link, plus the top answers with the accepted answer flagged. Mix many searches and question URLs from different sites in one run; each search gets its own cap and a run total is shared fairly between them. No login needed, and runs finish in seconds. $2.00 per 1,000 questions, answers included.

What you can do with it

  • Build Q&A datasets for LLMs and RAG: export high-score questions with accepted answers for a topic or tag, with license info per item.
  • Developer-demand research: find the most-viewed unanswered or high-vote questions in a tag to spot what people struggle with.
  • Support and docs gap analysis: monitor questions about your product or library on a schedule (sort by newest, filter by tag).
  • Competitor and technology tracking: watch how a framework's question volume and scores change over time.
  • Look up specific threads: paste question URLs or ids and get each one with its answers.

Input

FieldWhat it does
queriesSearch texts, question URLs, answer URLs or question ids, one per line. URLs from any Stack Exchange site (superuser.com, math.stackexchange.com, ...) use their own site. Leave empty to browse tags.
tagsOnly questions that have all of these tags. With no queries, the run browses these tags.
siteSite for searches and tag browsing, default stackoverflow (serverfault, superuser, askubuntu, math, cooking, ... or the site address).
sort, orderrelevance (default, best with search text), votes, activity, creation; desc or asc.
maxPerQueryMost questions per search line (or for the tag browse). Default 100. A question URL or id returns its one question.
maxItemsCap on questions for the whole run (and your cost), shared fairly across all lines. Empty = no total cap.
minScoreDrop searched questions below this score.
onlyWithAcceptedAnswerKeep only searched questions that have an accepted answer.
fromDate, toDateQuestion creation date window, YYYY-MM-DD (UTC).
includeAnswers, maxAnswersAdd the top answers (accepted first, then by score) inside each question; default 3, set 0 for questions only.
keywordsKeep a searched question only if its title, text or tags contain one of these words.

Filters (tags, minScore, accepted answer, dates, keywords) apply to searches and tag browsing; a question URL or id always returns that question. The same question found by two lines is returned (and charged) once.

Examples:

{ "queries": ["python asyncio gather", "pandas merge on multiple columns", "https://superuser.com/questions/1"], "sort": "votes", "minScore": 20, "maxPerQuery": 50, "maxItems": 120 }
{ "tags": ["pandas"], "sort": "votes", "maxPerQuery": 20 }

Output

One item per question:

{
"question_id": 27435284, "site": "stackoverflow", "url": "https://stackoverflow.com/questions/27435284/...", "query": "python asyncio gather",
"title": "multiprocessing vs multithreading vs asyncio", "tags": ["python", "python-asyncio"],
"score": 399, "view_count": 220812, "answer_count": 13, "is_answered": true, "accepted_answer_id": 27436735,
"created": "2014-12-12T01:23:57Z", "last_activity": "2024-11-10T06:30:27Z", "author": "...", "author_reputation": 6423,
"license": "CC BY-SA 4.0", "body_html": "<p>...</p>", "body_text": "...",
"answers": [{"answer_id": 27436735, "is_accepted": true, "score": 520, "author": "...", "body_text": "...", "body_html": "...", "url": "https://stackoverflow.com/a/27436735"}],
"accepted_answer": {"answer_id": 27436735, "...": "..."}
}

query is the input line that returned the question (empty for a tag browse). The run's SUMMARY record lists, for every line, how many questions matched on the site (found), how many were returned, duplicates skipped and whether more were available, plus any line that failed (for example an unknown site name).

Pricing

Pay per result: $2.00 per 1,000 questions (question-scraped). Answers are included in the question item at no extra charge. Filters and caps apply before you are charged. A run that finds nothing fails instead of silently returning an empty dataset.

Limits and notes

  • A search with no matches returns nothing for that line and the rest of the run carries on; the run fails only if every line failed or nothing matched at all.
  • Very large exports can reach Stack Exchange's daily request limit. The run then stops cleanly with what it already collected and says so in its status; run again later for more.
  • Each search returns at most 10,000 questions; split a bigger export by tag or date range.
  • Content is user-contributed under Creative Commons (CC BY-SA); each item includes its license. Keep attribution if you republish it.
  • Public data only. Not affiliated with Stack Exchange, Inc.