Stack Overflow Scraper – Questions & Answers API avatar

Stack Overflow Scraper – Questions & Answers API

Pricing

from $2.00 / 1,000 questions

Go to Apify Store
Stack Overflow Scraper – Questions & Answers API

Stack Overflow Scraper – Questions & Answers API

Search Stack Overflow or any Stack Exchange site by keyword, tags and date. Get each question's title, link, body, tags, score, views, answer count, accepted answer and dates, with its CC BY-SA license. No login needed. Unofficial.

Pricing

from $2.00 / 1,000 questions

Rating

0.0

(0)

Developer

Unnoted

Unnoted

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Features

Limited permissions

Share

What does Stack Overflow Scraper – Questions & Answers API do?

Stack Overflow Scraper searches Stack Overflow, or any other Stack Exchange site, by keyword, tags and date, and returns each question as one typed row: title, link, Markdown body, tags, score, views, answer count, accepted answer, open bounty, close status, dates and the CC BY-SA license that applies to it.

Unofficial, not affiliated with Stack Overflow.

Main features: up to 100,000 questions per run, no login needed, export to JSON, CSV or Excel, and full API and scheduling support on Apify.

What data can you get from Stack Overflow?

Each question is one row with these fields:

FieldDescription
questionIdQuestion id on its site (always filled)
titleQuestion title (always filled)
linkQuestion page URL (always filled)
tagsTags on the question
bodyQuestion text in Markdown, as the asker wrote it
scoreUpvotes minus downvotes
viewCountTimes the question was viewed
answerCountNumber of answers
isAnsweredWhether the question has an accepted or upvoted answer
acceptedAnswerIdId of the accepted answer; empty when none is accepted
createdAtWhen the question was asked (ISO 8601)
lastActivityAtLast answer, comment or edit (ISO 8601)
lastEditAtLast edit of the question (ISO 8601); empty if never edited
closedAtWhen the question was closed (ISO 8601); empty while open
closedReasonWhy it was closed, e.g. Duplicate or Needs more focus
bountyAmountOpen bounty in reputation points; empty when none
contentLicenseLicense of the question's current text: CC BY-SA 2.5, 3.0 or 4.0, by the date of its last revision
siteSite the question is on, e.g. stackoverflow.com
searchQuerySearch words that found the question
scrapedAtWhen the question was collected (ISO 8601)

How to scrape Stack Overflow with Stack Overflow Scraper – Questions & Answers API

  1. Open Stack Overflow Scraper – Questions & Answers API on Apify and go to the Input tab.
  2. In Search words, enter python.
  3. In Max questions, enter 100.
  4. Click Start and wait for the run to finish. A small run like this one takes under a minute.
  5. Open the Output tab to see the results, or download them as JSON, CSV, Excel or HTML.

Input

See the Input tab for every option. The fields:

FieldNameWhat it doesDefault
querySearch wordsWords to search for in question titles and bodies, e.g. python asyncio or "null pointer". Empty means every question (narrowed by tags and dates).
tagsTagsOnly questions carrying all of these tags, e.g. python and pandas. Empty means any tags.
siteSiteWhich Stack Exchange site to search: stackoverflow, superuser, serverfault, askubuntu, math, or any site's address such as math.stackexchange.com."stackoverflow"
sortSort byOrder of the results. "Best match" stops at 2,500 questions without an API key; the other orders can go past it. Options: activity (Recent activity), creation (Newest), votes (Most votes), relevance (Best match)."activity"
acceptedAnswerAccepted answerFilter by whether the asker accepted an answer. Options: any (Any), yes (Only questions with an accepted answer), no (Only questions without one)."any"
dateFromAsked fromOnly questions asked on or after this date (YYYY-MM-DD, e.g. 2025-01-01). Empty means no lower bound.
dateToAsked untilOnly questions asked on or before this date (YYYY-MM-DD). Empty means up to today.
apiKeyStack Exchange app key (optional)Optional: your own free Stack Exchange app key, for large or frequent runs.
maxItemsMax questionsMaximum number of questions in total. You pay only for questions saved.100

Example input:

{
"query": "python",
"maxItems": 100
}

Output

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel. One real result:

{
"questionId": 80008650,
"title": "Does type-checking have any runtime overhead?",
"link": "https://stackoverflow.com/questions/80008650/does-type-checking-have-any-runtime-overhead",
"tags": [
"python",
"python-typing"
],
"body": "At the moment I am excluding all the type-checking imports from runtime as code below but now wondering if this is necessary and whether these actually get compiled into the .pyc and used at runtime anyway?\n\n```\n\nimport os\n\ninteractive_mode: bool = True if os.getenv('PYCHARM_HOSTED') else False\n\nif interactive_mode:\n from typing import Iterator\n from typing import Any\n import types\n from types import FrameLocalsProxyType\n from wsgiref.types import StartResponse\n```\n\nNote:\nThe linked duplicate doesn't really answer the question; it is quite old and seemingly inconclusive. The root question of whether ```import typing``` or ```import types``` has runtime overhead remains unanswered.",
"score": -4,
"viewCount": 43,
"answerCount": 0,
"isAnswered": false,
"acceptedAnswerId": null,
"createdAt": "2026-10-08T10:01:16.000Z",
"lastActivityAt": "2026-10-08T22:36:54.000Z",
"lastEditAt": "2026-10-08T22:36:54.000Z",
"closedAt": "2026-10-08T10:06:31.000Z",
"closedReason": "Duplicate",
"bountyAmount": null,
"contentLicense": "CC BY-SA 4.0",
"site": "stackoverflow.com",
"searchQuery": "python",
"scrapedAt": "2026-10-08T22:59:05.352Z"
}

How much does it cost to scrape Stack Overflow?

Stack Overflow Scraper – Questions & Answers API uses pay-per-event pricing: $2.00 per 1,000 questions (Question). You pay only for questions saved to the dataset; platform usage is included in the price. Each run also has Apify's standard start fee of a fraction of a cent.

QuestionsPrice
100$0.20
1,000$2.00
10,000$20.00

Set Max items (and the run's maximum cost in the run options) to cap what a run can spend. The run stops when either limit is reached.

Use cases

  • Developer relations and product teams: track every new question tagged with your library or API and see what users get stuck on.
  • Technology trend research: count questions per tag and month to compare frameworks, languages or cloud services.
  • Documentation gaps: find high-view questions without an accepted answer and write the docs or answers they need.
  • Support monitoring: schedule a daily run for your product's tag and send new questions to Slack, email or Google Sheets.
  • Community analytics: study scores, answer rates and close reasons across Stack Exchange sites such as Super User, Server Fault or Mathematics.

Tips

  • Tags are matched all together: python plus pandas returns questions tagged with both.
  • Sort by Newest and set Asked from to yesterday's date for a daily feed of new questions.
  • Without an app key a search goes up to 2,500 questions per window; with Recent activity, Newest or Most votes the Actor starts a new window and keeps going.
  • For runs of many thousands of questions, or several runs a day, add your own free Stack Exchange app key.
  • To credit the authors as CC BY-SA requires, keep each question's link and contentLicense with any text you reuse.

FAQ

Stack Overflow Scraper – Questions & Answers API collects only data that Stack Overflow shows publicly to every visitor, and it leaves out personal data such as private profiles and contact details. Our Actors are ethical and do not extract private user data. Results could still contain personal data in titles or descriptions written by uploaders. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. You are responsible for how you use the data.

Can I use it through an API?

Yes. Every Apify Actor has an API: start runs, pass input and read results over HTTP, or use the JavaScript and Python clients. See the API tab on the Actor page for ready-made examples.

Can I schedule runs and connect other apps?

Yes. Use Apify Schedules to run Stack Overflow Scraper – Questions & Answers API every hour, day or week, and integrations (Make, Zapier, Google Sheets, webhooks and more) to send the results where you need them.

Why did I get fewer results than expected?

The run stops at Max items or at the run's maximum cost, whichever comes first. Stack Overflow may also return fewer results for rare search terms. Duplicates across search terms are saved once. Check the run's RUN_SUMMARY record in the key-value store for the inputs that returned nothing.

What if it stops working?

Sites change. We run a daily check of our own and fix breakages quickly. If something looks wrong, open an issue in the Issues tab with the run link and we'll look at it.

Any public Stack Exchange site: Stack Overflow, Super User, Server Fault, Ask Ubuntu, Mathematics, and about 180 more. Enter the site's short name (superuser) or its address (math.stackexchange.com).

Do I need an app key?

No. Without one, the Stack Exchange API allows 300 requests a day per IP address, and each request gets up to 100 questions. The servers this Actor runs on are shared with other users, so for large or frequent runs add your own free key from stackapps.com.

Can I reuse the questions?

Stack Exchange content is licensed CC BY-SA: credit the author with a link to the question and share changes under the same license. Stack Exchange's API terms do not allow using the content as a training corpus for generative AI models.

Are answers included?

Each question has its answer count, whether it is answered and the accepted answer's id. The answer texts are not included.

Not included

No personal data: no asker or editor names, user ids, profiles, reputation or avatars, and no comments. Answer texts are not included. Using the data to train generative AI models is not allowed by Stack Exchange's API terms.

More Actors from us