Stack Overflow scraper API
The InsightSocial Stack Overflow API has 23 endpoints, from 20 credits a call. A question call costs 20 credits, about $0.02 on Pro, and your first 10 calls up to 100 credits each are free.
The Stack Overflow API for public questions, answers, comments, users and tags, as JSON, on Stack Overflow and every other Stack Exchange site, on the same key as 60 other platforms.
23 endpoints · from 20 credits a call · 10 free calls up to 100 credits each · no credit card
curl "https://api.insightsocial.app/v1/stackoverflow/question?question_id=11227809&include=answers" \-H "x-api-key: $INSIGHTSOCIAL_API_KEY"
What Stack Overflow data can you get?
Public Stack Overflow data only, in the same JSON envelope as every other platform. Every Stack Overflow endpoint is beta: inside data it returns Stack Overflow's own structure under our naming rules (snake_case keys, string ids, ISO times where Stack Overflow gives a timestamp), not the shared profile and post schema, and fields may change.
Questions and answers
A question in full with its answers and comments on request, the answers alone by votes or activity, and up to 100 questions in one call.
Search and lists
Questions by words, tags, author, answer count or date, by closest title, or by tag and time range with the related and linked questions.
Users and reputation
A user's profile, reputation history, badges, top tags, and the questions, answers and comments they wrote.
Edits, comments and tags
Every revision of a post with the text before and after, its full timeline, its comments, and tags with synonyms and top answerers.
What people build with the Stack Overflow API
Developer-relations research
Track the questions asked under your product's tags, how fast they get an accepted answer, and who answers them most.
Documentation gaps
Search questions about your library by title and body, and read the accepted answers to see where your own docs fall short.
Training and evaluation sets
Pull questions with their answers and edit history in batches of 100, and keep the licence and author on every row.
Stack Overflow API endpoints
All 23 Stack Overflow endpoints and their price in credits. 3 are metered: they show a range and charge what the call actually read.
| Endpoint | Credits | What it returns |
|---|---|---|
| /post/citation | 20 | Get a BibTeX, AMS and text citation for a Stack Overflow question or answer. |
| /post/comments | 20 | List every comment on a Stack Overflow question or answer. |
| /post/revisions | 20 | List the versions of a Stack Overflow post, with the text before and after each edit. |
| /post/timeline | 20 | List everything that happened to a Stack Overflow post: edits, locks, answers, comments, votes and reviews. |
| /posts/comments | 20–1,260 | Get the comments on up to 100 Stack Overflow questions and answers in one call. |
| /question | 20 | Get a Stack Overflow question with its text, tags, votes, closed or locked state and, if asked, its answers and comments. |
| /question/answers | 20 | List the answers to a Stack Overflow question by votes, activity or time, with their text and, if asked, their comments. |
| /questions | 20 | List Stack Overflow questions by tag, time range, votes or activity, or the questions related to or linking to one. |
| /questions/batch | 20–1,260 | Get up to 100 Stack Overflow questions in one call, by id. |
| /questions/search | 20 | Search Stack Overflow questions and answers by words, title, body, tag, author or answer count, with snippets. |
| /questions/title-search | 20 | Search Stack Overflow questions whose title is closest to a title. |
| /sites | 20 | List the sites of the Stack Exchange network and the name each takes in the `site` parameter. |
| /tag | 20 | Get a Stack Overflow tag with its description, synonyms, related tags and best answerers. |
| /tags | 20 | List Stack Overflow tags by popularity, activity or name, with question counts. |
| /user | 20 | Get a Stack Overflow user's profile: reputation, badges, activity counts, location, website and profile text. |
| /user/answers | 20 | List the answers a Stack Overflow user has given, by activity, votes or time. |
| /user/badges | 20 | List the badges a Stack Overflow user has earned. |
| /user/comments | 20 | List the comments a Stack Overflow user has written, by time or votes. |
| /user/questions | 20 | List the questions a Stack Overflow user has asked, by activity, votes or time. |
| /user/reputation | 20 | List the changes to a Stack Overflow user's reputation, newest first. |
| /user/tags | 20 | List the tags a Stack Overflow user posts under, with question and answer counts and scores. |
| /users/batch | 20–1,260 | Get up to 100 Stack Overflow users in one call, by id. |
| /users/search | 20 | Search Stack Overflow users by name, reputation or when they joined. |
Parameters, response fields and examples for each endpoint are in the Stack Overflow API reference.
InsightSocial vs the official Stack Overflow API
The Stack Exchange API is free and open: anyone can call it, with a daily quota that a registered key raises. If Stack Overflow is all you need, it is a good choice.
| InsightSocial API | Official Stack Overflow API | |
|---|---|---|
| Access | One key for Stack Overflow and 60 other platforms | Free; a registered key raises the daily quota |
| Response shape | The same envelope, credits and cursor paging as every other platform on your key | Its own envelope, filters and paging |
| Billing | One credit balance across every platform | No billing; quotas instead |
| Cost per call | 20 credits | Free, within daily quotas |
The official API is the right tool for posting, messaging or managing accounts you own. This one is read-only public data.
How much does the Stack Overflow API cost?
Stack Overflow calls start at 20 credits. Every endpoint's price is in the table above and in the free GET /v1/endpoints catalogue, so you know the cost before you call. Pro's 10,000 monthly credits cover about 500 questions at 20 credits each.
Failed calls are free
A call that errors or finds nothing costs 0 credits.
Repeats and retries
A repeat call is charged again: the full price when it fetches new data, 2 credits when the answer comes from the shared cache. Add fresh=1 to force a new read. Only a retry with the same Idempotency-Key is free.
One balance
API calls and Chrome extension exports share the same credits. The free plan includes 500 a month.
Not writing code?
Connect InsightSocial to Claude or ChatGPT and ask for Stack Overflow data in plain English. Same account, same credits.
Stack Overflow API: frequently asked questions
Yes. Most endpoints take a site parameter, such as askubuntu, serverfault or math, and default to stackoverflow. /v1/stackoverflow/sites lists every site and the name it takes.
Yes. /v1/stackoverflow/question returns the question, and include=answers adds its answers (include=answers,comments adds the comments too). /v1/stackoverflow/question/answers pages through answers on their own, by votes, activity or time.
/v1/stackoverflow/post/revisions lists every version of a question or answer with the text before and after each edit, and /v1/stackoverflow/post/timeline lists everything that happened to it.
They return the Stack Exchange own structure under our naming rules (snake_case keys, string ids, ISO times where a timestamp is given) rather than the shared profile and post entities, so fields may change. Each endpoint is 20 credits a call, except the three batch endpoints (questions/batch, users/batch and posts/comments), which are metered from 20 to 1,260 by how many ids you send. Calls that fail or find nothing are free.
No. There is no Stack Overflow app, OAuth flow or review. One API key in the x-api-key header works for Stack Overflow and the other 60 platforms.
Yes. Your first 10 calls priced at 100 credits or less are free, and the free plan includes 500 credits every month. No credit card is needed to get a key.
60 requests a minute and 10 requests in flight at once, per API key. Going over either returns a 429 with a Retry-After header, and a rejected request costs nothing. There is no daily quota: past those two limits, your credit balance is what bounds volume.
List endpoints return rows in data.items and a pagination object with next_cursor and has_more. Send next_cursor back unchanged as the cursor parameter for the next page, and stop when has_more is false. A handful of endpoints page with their own parameter instead; their reference pages name it.
No. A call that errors or finds nothing costs 0 credits. A live fetch costs the endpoint's price, or for a metered endpoint what it actually read. A repeat call is charged again: the full price when it fetches new data, 2 credits when the answer comes from the shared cache. Add fresh=1 to force a new read. Only a retry with the same Idempotency-Key is free.
A call fetches live unless a recent copy is in the shared cache, and every response says which with the cached field; a cached answer costs 2 credits. Add fresh=1 or send Cache-Control: no-cache to skip the cache; that call is charged at the normal price.
Collecting publicly available data is generally treated differently from accessing private data, but the answer depends on your jurisdiction, Stack Overflow's terms and what you do with personal data afterwards. The API reads public data only. Talk to a lawyer for anything commercial.
Stack Overflow API guides
The same key works for 60 more platforms
- TikTok scraper API
- LinkedIn scraper API
- Twitter/X scraper API
- YouTube scraper API
- Reddit scraper API
- Pinterest scraper API
- Bluesky scraper API
- Truth Social scraper API
- Snapchat scraper API
- Telegram scraper API
- Twitch scraper API
- Kick scraper API
- Rumble scraper API
- Kwai scraper API
- Douyin scraper API
- Xiaohongshu (RedNote) scraper API
- Quora scraper API
- TikTok Shop scraper API
- Weibo scraper API
- Zhihu scraper API
- Substack scraper API
- Nextdoor scraper API
- Amazon scraper API
- App Store scraper API
- Apple Music scraper API
- Behance scraper API
- Dailymotion scraper API
- Deezer scraper API
- DEV Community scraper API
- Discord scraper API
- Dribbble scraper API
- Fandom scraper API
- Flickr scraper API
- GitHub scraper API
- Google Ads Transparency scraper API
- Google News scraper API
- Google Trends scraper API
- Gumroad scraper API
- Hacker News scraper API
- Hugging Face scraper API
- Ko-fi scraper API
- Lemmy scraper API
- Letterboxd scraper API
- Linktree scraper API
- Lnk.Bio scraper API
- Mastodon scraper API
- Medium scraper API
- MyAnimeList scraper API
- npm scraper API
- Polymarket scraper API
- Product Hunt scraper API
- Shopify scraper API
- SoundCloud scraper API
- Spotify scraper API
- Stan Store scraper API
- Steam scraper API
- Vimeo scraper API
- Wikipedia scraper API
- Yahoo Finance scraper API
- Yelp scraper API