Stack Overflow questions + answers search (Stack Exchange API) avatar

Stack Overflow questions + answers search (Stack Exchange API)

Pricing

from $5.00 / 1,000 records

Go to Apify Store
Stack Overflow questions + answers search (Stack Exchange API)

Stack Overflow questions + answers search (Stack Exchange API)

Search Stack Overflow (or any Stack Exchange site) by query, tags, sort and date range through the public Stack Exchange API and get one row per question - title, tags, score, views, answers, owner, link, body text - plus its top answers as rows. CC BY-SA content; each row carries the license.

Pricing

from $5.00 / 1,000 records

Rating

0.0

(0)

Developer

RetrainMap Team

RetrainMap Team

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Share

Stack Overflow questions + answers search — Stack Exchange API 2.3

One row per Stack Overflow question matched by your query, tags, sort and date range — question id, title, tags, score, view count, answer count, answered / accepted-answer flags, creation and last-activity dates, owner display name and reputation, canonical link and the body as plain text — followed by the question's top answers as rows of row_type = answer. Works for any Stack Exchange site (site input). Read through the public Stack Exchange API 2.3 (https://api.stackexchange.com/docs), no login.

**The default input (query asyncio, tag python, last activity first, 100 questions

  • up to 3 answers each) succeeds within 5 minutes and returns rows** — Apify auto-tests it daily.

Data source, license and status

PublisherStack Exchange, Inc. (Stack Overflow and the Stack Exchange network)
APIhttps://api.stackexchange.com/2.3 — public, documented at https://api.stackexchange.com/docs; /search/advanced for questions, /questions/{ids}/answers for answers, both with filter=withbody
Quota300 requests per day per IP without a key. Your own app key (stackexchange_key, registered free at https://stackapps.com/apps/oauth/register) raises it to 10,000. Each 100 questions cost one request; answers cost about one request per 30 questions
RateAt most one request per second by default; the API's backoff field is honoured; throttle errors (error_id 502) are retried after 30 s
License / attributionUser contributions on Stack Exchange sites are licensed under Creative Commons Attribution-ShareAlike (CC BY-SA, version per post: https://stackoverflow.com/help/licensing). Every row carries the API's own content_license as license, the author as owner_display_name and the canonical link. If you republish the text you must attribute the author, link to the post, and share alike
API termshttps://stackoverflow.com/legal/api-terms-of-use — this Actor identifies itself, respects the quota and backoff, and caches nothing
Known caveatsbody_text is the HTML body with tags stripped and cut at 3,000 characters (code blocks lose their formatting); view_count, answer_count, is_answered are null on answer rows; accepted_answer_id is absent when nothing was accepted; deleted or closed questions are whatever the API returns

Honesty note: the rows are the API's own fields renamed and flattened — nothing is inferred, summarised or classified by this Actor, and a run stops with an error rather than guess when the API's shape changes.

Identification: the requests carry a product-token User-Agent and the operator's contact address in the standard From: header (RFC 9110 §10.1.2).

Input

FieldTypeMeaning
querystringFree-text query (q); optional when tags are given
tagsarrayUp to 5 tags, all must match (tagged=a;b)
sortactivity / votes / creationDefault activity, always descending
from_date / to_dateYYYY-MM-DDOptional creation-date bounds (UTC, inclusive)
include_answersbooleanDefault true — top answers (by votes) as extra rows
answers_per_questionintegerDefault 3, at most 20
max_recordsintegerMaximum question rows; default 100, at most 5,000
sitestringDefault stackoverflow; any site from https://api.stackexchange.com/docs/sites
stackexchange_keysecret stringOptional app key, raises the daily quota
request_interval_msintegerDefault 1000 (floor 250)
contact_emailstringSent in the From: header

Example — highest-voted pandas questions about groupby created in 2026, no answers:

{ "query": "groupby", "tags": ["python", "pandas"], "sort": "votes", "from_date": "2026-01-01", "include_answers": false, "max_records": 50 }

Output (dataset row)

row_type (question / answer), question_id, answer_id, site, title, tags, score, view_count, answer_count, is_answered, accepted_answer_id, is_accepted, creation_date, last_activity_date (ISO 8601 UTC), owner_display_name, owner_reputation, owner_user_id, link, body_text (≤ 3,000 chars), license, fetched_at, source.

Answer rows repeat the parent question's title, tags and accepted_answer_id so each row stands alone; their link is the question link with #answer_id.

A run summary (filters, row counts, requests, remaining daily quota, whether more pages were available or the pay-per-event budget stopped the run) is stored as RUN_SUMMARY in the run's key-value store.

Pricing (pay per event)

EventPrice
run-start — once per run$0.10
record — per row written (question or answer)$0.005

The default pull (100 questions + up to 300 answers) costs at most $2.10; 100 questions without answers cost $0.60. Rows stop when your run's maximum charge is reached; the run summary says so.

Operator

Steelyard Ventures LLC (RetrainMap) — info@steelyardclinical.com. Not affiliated with Stack Exchange, Inc. The Actor writes only to its own dataset and key-value store; the optional API key is sent only to api.stackexchange.com and never stored.