Stack Overflow Questions & Answers Scraper avatar

Stack Overflow Questions & Answers Scraper

Pricing

$1.00 / 1,000 results

Go to Apify Store
Stack Overflow Questions & Answers Scraper

Stack Overflow Questions & Answers Scraper

Extracts public Stack Overflow questions, answers, scores and tags for any search term or tag via the public Stack Exchange API.

Pricing

$1.00 / 1,000 results

Rating

0.0

(0)

Developer

James Barnes

James Barnes

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

17 days ago

Last modified

Categories

Features

Limited permissions

Share

Get structured Stack Overflow questions with their top answers, scores and tags for any search term or tag. Use it for developer research, AI training data, content monitoring or tracking what people struggle with in a technology.

Sample output

{
"questionId": 12345678,
"title": "How do I use async await in a loop?",
"url": "https://stackoverflow.com/questions/12345678/how-do-i-use-async-await-in-a-loop",
"tags": ["python", "async-await"],
"score": 42,
"viewCount": 15300,
"answerCount": 5,
"isAnswered": true,
"acceptedAnswerId": 12345999,
"createdAt": "2020-05-01T10:12:00+00:00",
"lastActivityAt": "2023-02-11T08:00:00+00:00",
"author": {"name": "Jane", "reputation": 1520, "link": "https://stackoverflow.com/users/1/jane"},
"bodyHtml": "<p>...</p>",
"answers": [
{"answerId": 12345999, "score": 60, "isAccepted": true, "createdAt": "2020-05-01T11:00:00+00:00", "author": {"name": "Sam", "reputation": 9000, "link": "https://stackoverflow.com/users/2/sam"}, "bodyHtml": "<p>...</p>"}
]
}

The values above are illustrative; real runs return live data.

Input

  • searchTerm: text to search for (optional if a tag is given).
  • tag: filter by tag(s), comma separated.
  • site: Stack Exchange site, default stackoverflow.
  • sort: relevance, votes, activity or creation.
  • onlyAnswered: skip unanswered questions.
  • maxQuestions: 1-1000.
  • includeAnswers and maxAnswersPerQuestion: attach top answers.

At least a search term or a tag is required.

Output

One dataset item per question, with the question body (HTML), tags, score, views, dates, author public display name and the top answers.

Pricing

$0.001 per result (per question returned). Answers are included in the question item at no extra cost.

Limits

  • Uses the public Stack Exchange API without a key, so the API's daily quota per IP applies and large runs may slow down when the API asks to back off.
  • Maximum 1000 questions per run.
  • Only public data is read; no login is used.