Stack Overflow Scraper
Pricing
Pay per usage
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
9 hours ago
Last modified
Categories
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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | ✅* | "" | Search query to match in question titles and bodies. |
tags | string | ❌ | "" | Comma-separated tags to filter by (e.g. python,asyncio). |
maxResults | integer | ❌ | 30 | Maximum number of questions to return (1–100). |
sort | string (enum) | ❌ | relevance | Sort questions by relevance, votes, or creation. |
order | string (enum) | ❌ | desc | Sort order: desc or asc. |
acceptedOnly | boolean | ❌ | false | If true, only return questions that have an accepted answer. |
* At least a
queryortagsmust be provided.
Output Fields
Each pushed dataset item is a question record with the following fields:
| Field | Type | Description |
|---|---|---|
id | integer | Stack Overflow question ID. |
title | string | Question title. |
body | string | Plain-text excerpt of the question body (max ~500 chars). |
tags | array<string> | Tags applied to the question. |
score | integer | Question score (upvotes − downvotes). |
answerCount | integer | Number of answers. |
viewCount | integer | Number of views. |
isAnswered | boolean | Whether the question has at least one answer. |
link | string | Direct URL to the question. |
author | string | Display name of the question author. |
creationDate | string | Creation 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.