Stack Overflow & Stack Exchange Questions
Pricing
Pay per event
Stack Overflow & Stack Exchange Questions
Stack Overflow and Stack Exchange questions scraper. Filter by tags or search text; export question fields and optional linked answer rows as JSON with source links and attribution.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Grit
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
12 days ago
Last modified
Categories
Share
Stack Overflow and Stack Exchange questions scraper returns public question records with tags, scores, body HTML, source links, and attribution. Stack Exchange questions API exports optional answer records linked by questionId from the selected site.
What it does
Choose a Stack Exchange site and filter by tags or search text. Questions and answers are separate dataset rows; an answer links back through questionId. maxItems covers both kinds of rows and errors. Source ordering can change as posts are edited or scored.
Input example
{"site": "stackoverflow","tags": ["python"],"includeAnswers": true,"maxItems": 10}
The example uses fields defined in the actor input schema. Other filters can be set in the Apify input form.
Output fields
Examples below come from the first record in sample_output.json; long strings and arrays are shown as excerpts. Other modes and error rows can have different fields.
| Field | Type in sample | Example value |
|---|---|---|
type | string | "question" |
site | string | "stackoverflow" |
postId | number | 231767 |
questionId | number | 231767 |
answerId | null | null |
title | string | "What does the \"yield\" keyword do in Python?" |
url | string | "https://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do-in-python" |
questionUrl | string | "https://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do-in-python" |
tags | array | ["python", "iterator", "generator", "yield"] |
score | number | 13135 |
viewCount | number | 3500476 |
answerCount | number | 51 |
isAnswered | boolean | true |
isAccepted | null | null |
acceptedAnswerId | number | 231855 |
createdAt | string | "2008-10-23T22:21:11Z" |
lastActivityAt | string | "2026-04-30T18:43:47Z" |
lastEditedAt | string | "2024-03-24T04:11:22Z" |
bodyHtml | string | "<p>What functionality does the <a href=\"https://docs.python.org/3/reference/simp… |
authorId | number | 18300 |
authorName | string | "Alex. S." |
authorUrl | string | "https://stackoverflow.com/users/18300/alex-s" |
contentLicense | string | "CC BY-SA 4.0" |
licenseUrl | string | "https://creativecommons.org/licenses/by-sa/4.0/" |
attribution | object | {"sourceUrl": "https://stackoverflow.com/questions/231767/what-does-the-yield-keyw… |
warnings | array | [] |
errors | array | [] |
Output example
A trimmed record copied from sample_output.json:
{"type": "question","site": "stackoverflow","postId": 231767,"questionId": 231767,"title": "What does the \"yield\" keyword do in Python?","url": "https://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do-in-python","tags": ["python","iterator","generator","yield"],"score": 13135,"contentLicense": "CC BY-SA 4.0","licenseUrl": "https://creativecommons.org/licenses/by-sa/4.0/","warnings": [],"errors": []}
FAQ
What does the result limit count? maxItems counts question, answer, and error rows together. maxPages also limits scanning, so a run may finish before reaching the row cap.
Do I need a proxy or login? No login or proxy is used. An optional Stack Exchange application API key can be supplied; API quotas still apply.
How is pricing handled? The proposed pay-per-event model charges $0.001 for each unique successful question or answer row. Error and duplicate rows have no custom event. The owner must configure those rates in Apify before publication.
How are API rate limits handled? Requests share a paced lane with a 0.2-second minimum interval. Transient failures get at most four attempts; the client honors API backoff, Retry-After, and quota exhaustion.
How current are the posts? Rows reflect the public Stack Exchange API at retrieval time. Scores, activity, page boundaries, and licenses can change; this actor does not recover deleted posts or revision history.
Use with AI agents / MCP
After this actor is available to your account, configure it as an actor tool in the Apify MCP server, or start a run through the Apify API with the same input JSON. Give the agent the actor identifier and access through your Apify credentials. Read the completed run’s default dataset through the returned run or dataset reference, check error fields before using records, and keep source URLs with quoted data. Limit the input to the task the agent is answering.
Source and reuse notes
Keep url, authorName, authorUrl, contentLicense, and licenseUrl with reused text. The API can omit author or license details; warnings flags those cases. The actor preserves the API license value without inferring an older revision license. See Stack Overflow licensing. Accepted answers and total answer counts can exceed the answer rows saved under the configured caps.