Stack Overflow Scraper avatar

Stack Overflow Scraper

Pricing

Pay per usage

Go to Apify Store
Stack Overflow Scraper

Stack Overflow Scraper

Search and scrape Stack Overflow questions via the Stack Exchange API with filters for tags, sorting, and accepted answers.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Moeeze Hassan

Moeeze Hassan

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 hours ago

Last modified

Share

Search and scrape Stack Overflow questions via the Stack Exchange API. The actor supports tag filtering, sorting by relevance/votes/creation date, and an accepted-answer filter, returning structured question records with body excerpts.

Features

  • Full-text search across question titles and bodies
  • Comma-separated tag filtering (e.g. python,asyncio)
  • Sort by relevance, votes, or creation date
  • Optional filter to return only questions with an accepted answer
  • HTML-stripped body excerpts for clean output

Input Fields

FieldTypeRequiredDefaultDescription
querystring✅*""Search query to match in question titles and bodies.
tagsstring""Comma-separated tags to filter by (e.g. python,asyncio).
maxResultsinteger30Maximum number of questions to return (1–100).
sortstring (enum)relevanceSort questions by relevance, votes, or creation.
orderstring (enum)descSort order: desc or asc.
acceptedOnlybooleanfalseIf true, only return questions that have an accepted answer.

* At least a query or tags must be provided.

Output Fields

Each pushed dataset item is a question record with the following fields:

FieldTypeDescription
idintegerStack Overflow question ID.
titlestringQuestion title.
bodystringPlain-text excerpt of the question body (max ~500 chars).
tagsarray<string>Tags applied to the question.
scoreintegerQuestion score (upvotes − downvotes).
answerCountintegerNumber of answers.
viewCountintegerNumber of views.
isAnsweredbooleanWhether the question has at least one answer.
linkstringDirect URL to the question.
authorstringDisplay name of the question author.
creationDatestringCreation date (ISO-8601).

Usage Example

Search for Python asyncio questions with accepted answers

{
"query": "asyncio",
"tags": "python",
"maxResults": 30,
"sort": "votes",
"order": "desc",
"acceptedOnly": true
}

Find the most recent questions tagged react-hooks

{
"tags": "react-hooks",
"maxResults": 20,
"sort": "creation",
"order": "desc"
}

Run via the Apify CLI

$apify run stack-overflow-scraper --input '{"query":"asyncio","tags":"python","sort":"votes","acceptedOnly":true}'

Data Source

Questions are fetched from the Stack Exchange API at https://api.stackexchange.com/2.3/search using the withbody filter for full body content.