Stack Overflow API & Scraper
The Stack Overflow API returns Q&A data — questions, answers, users and tags — as clean JSON.
🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.
The primary questions endpoint returns questions with title, score, tags, view and answer counts and timestamps, and the broad action set covers a single question and its answers, user profiles and their questions, answers, tags and badges, plus full-text search and tag browsing. It is built for developer research, community analytics and knowledge tools that need Stack Overflow data without the official API's throttling. One ReefAPI key, one shared credit pool, the standard envelope.
Fields that read like one thing and mean another
The schema is Stack Exchange's own, which means several fields have names that invite the wrong assumption: two unrelated popularity numbers, a close reason written for humans rather than machines, and titles that arrive still HTML-escaped. Every value below is from live calls against stackoverflow, serverfault, askubuntu and math.
| Field | What it actually is | Measured example |
|---|---|---|
| creation_date, last_activity_date, closed_date | Unix seconds in UTC, never a string | 1340805096 on question 11227809 |
| score vs view_count | Net votes vs page views; unrelated scales | Question 11227809: score 27546, view_count 1997358 |
| accepted_answer_id | The answer id, or null if nothing is accepted | 11227902 on question 11227809 |
| is_accepted | Present on answer items only | true on answer 11227902, whose score 35296 exceeds the question's |
| body | Rendered HTML, not Markdown | "<pre class=\"lang-cpp prettyprint-override\"><code>..." |
| title | HTML-entity escaped | "What does the "yield" keyword do in Python?" |
| closed_reason | A human-readable phrase, not a code | "exact duplicate" on question 1725517 |
| tags | Flat array of lowercase strings | ["java", "c++", "performance"] |
| site | A Stack Exchange slug, not a hostname | stackoverflow, serverfault, askubuntu, math |
| pagesize | Clamped to 100, never rejected | pagesize=500 returned 100 records |
Every response carries an `attribution` string reading "Stack Exchange API; content license CC BY-SA, preserve item link and author attribution." Each item also carries its own content_license: CC BY-SA 4.0 on recent posts and CC BY-SA 3.0 on older ones, both seen in measured responses. If you republish any of this, keep the item's link and author with it.
Real request and response JSON
Captured from the indexed primary action, search, on .
{
"method": "POST",
"url": "https://api.reefapi.com/stackoverflow/v1/search",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"q": "async await"
}
}{
"ok": true,
"meta": {
"api": "stackoverflow",
"endpoint": "search",
"mode": "live",
"latency_ms": 1560.7,
"record_count": 100,
"bytes": 193719,
"cache_hit": false,
"method": "official_stackexchange_api_v2_3",
"has_more": true,
"page": 1,
"pagesize": 100,
"quota_remaining": 299,
"next_page": 2
},
"data": {
"items": [
{
"tags": [
"javascript",
"node.js",
"promise"
],
"owner": {
"account_id": 4326760,
"reputation": 55019,
"user_id": 3533365,
"user_type": "registered",
"accept_rate": 100,
"profile_image": "https://i.sstatic.net/9nmc0DfK.jpg?s=256",
"display_name": "Saad",
"link": "https://stackoverflow.com/users/3533365/saad"
},
"is_answered": true,
"view_count": 2478838,
"protected_date": 1534441280,
"accepted_answer_id": 37576787,
"answer_count": 35,
"score": 3352,
"last_activity_date": 1738027633,
"creation_date": 1464807358,
"last_edit_date": 1615551571,
"question_id": 37576685,
"content_license": "CC BY-SA 4.0",
"link": "https://stackoverflow.com/questions/37576685/using-async-await-with-a-foreach-loop",
"title": "Using async/await with a forEach loop",
"body": "<p>Are there any issues with using <code>async</code>/<code>await</code> in a <code>forEach</code> loop? I'm trying to loop through an array of files and <code>await</code> on the contents of each file.</p>\n<pre><code>import fs from 'fs-promise'\n\nasync function printFiles () {\n const files = await getFilePaths() // Assume this works fine\n\n files.forEach(async (file) => {\n const contents = await fs.readFile(file, 'utf8')\n console.log(contents)\n })\n}\n\nprintFiles()\n</code></pre>\n<p>This code does work, but could something go wrong with this? I had someone tell me that you're not suppo",
"id": 37576685,
"type": "question",
"author": {
"user_id": 3533365,
"display_name": "Saad",
"link": "https://stackoverflow.com/users/3533365/saad",
"reputation": 55019,
"user_type": "registered",
"profile_image": "https://i.sstatic.net/9nmc0DfK.jpg?s=256"
}
},
{
"tags": [
"c#",
".net",
"asynchronous"
],
"owner": {
"account_id": 368977,
"reputation": 33646,
"user_id": 716092,
"user_type": "registered",
"accept_rate": 61,
"profile_image": "https://i.sstatic.net/kcc7I.png?s=256",
"display_name": "Dan Dinu",
"link": "https://stackoverflow.com/users/716092/dan-dinu"
},
"is_answered": true,
"view_count": 1315855,
"protected_date": 1534778591,
"accepted_answer_id": 19985988,
"answer_count": 26,
"score": 1430,
"last_activity_date": 1766067366,
"creation_date": 1358846998,
"last_edit_date": 1538165531,
"question_id": 14455293,
"content_license": "CC BY-SA 4.0",
"link": "https://stackoverflow.com/questions/14455293/how-and-when-to-use-async-and-await",
"title": "How and when to use ‘async’ and ‘await’",
"body": "<p>From my understanding one of the main things that <a href=\"https://learn.microsoft.com/en-us/dotnet/csharp/async\" rel=\"noreferrer\"><code>async</code> and <code>await</code></a> do is to make code easy to write and read - but is using them equal to spawning background threads to perform long duration logic?</p>\n\n<p>I'm currently trying out the most basic example. I've added some comments inline. Can you clarify it for me?</p>\n\n<pre><code>// I don't understand why this method must be marked as `async`.\nprivate async void button1_Click(object sender, EventArgs e)\n{\n Task<int> access =",
"id": 14455293,
"type": "question",
"author": {
"user_id": 716092,
"display_name": "Dan Dinu",
"link": "https://stackoverflow.com/users/716092/dan-dinu",
"reputation": 33646,
"user_type": "registered",
"profile_image": "https://i.sstatic.net/kcc7I.png?s=256"
}
},
{
"tags": [
"javascript",
"node.js",
"asynchronous"
],
"owner": {
"account_id": 459794,
"reputation": 13964,
"user_id": 860478,
"user_type": "registered",
"accept_rate": 79,
"profile_image": "https://i.sstatic.net/iBpsT.png?s=256",
"display_name": "Victor Marchuk",
"link": "https://stackoverflow.com/users/860478/victor-marchuk"
},
"is_answered": true,
"view_count": 602853,
"protected_date": 1565948528,
"accepted_answer_id": 35612484,
"answer_count": 12,
"score": 923,
"last_activity_date": 1685968622,
"creation_date": 1456345726,
"last_edit_date": 1608858445,
"question_id": 35612428,
"content_license": "CC BY-SA 4.0",
"link": "https://stackoverflow.com/questions/35612428/call-async-await-functions-in-parallel",
"title": "Call async/await functions in parallel",
"body": "<p>As far as I understand, in ES7/ES2016 putting multiple <code>await</code>'s in code will work similar to chaining <code>.then()</code> with promises, meaning that they will execute one after the other rather than in parallel. So, for example, we have this code:</p>\n<pre><code>await someCall();\nawait anotherCall();\n</code></pre>\n<p>Do I understand it correctly that <code>anotherCall()</code> will be called only when <code>someCall()</code> is completed? What is the most elegant way of calling them in parallel?</p>\n<p>I want to use it in Node, so maybe there's a solution with async library?</",
"id": 35612428,
"type": "question",
"author": {
"user_id": 860478,
"display_name": "Victor Marchuk",
"link": "https://stackoverflow.com/users/860478/victor-marchuk",
"reputation": 13964,
"user_type": "registered",
"profile_image": "https://i.sstatic.net/iBpsT.png?s=256"
}
}
],
"site": "stackoverflow",
"attribution": "Stack Exchange API; content license CC BY-SA, preserve item link and author attribution."
}
}What the Stack Overflow API does
| Action | Description | Concrete use case | Key params |
|---|---|---|---|
| questions | Paginated questions by sort/tag; returns score, tags, body, owner/link attribution. | Platform and DevOps teams call questions to get paginated questions by sort/tag;. | site, sort, tag, tags, page, ... |
| question | Single question by id plus paginated answers. | Security and supply-chain teams call question to get single question by id plus paginated answers.. | id, site, page, pagesize, filter |
| answers | Answer details by id/ids, or recent answers when no id is supplied. | Developer-tool builders call answers to get answer details by id/ids, or recent answers when no id is supplied.. | id, ids, site, sort, page, ... |
| user | User profile by id/ids. | AI-agent developers call user to get user profile by id/ids.. | id, site |
| user_questions | Paginated questions for a user. | Platform and DevOps teams call user_questions to get paginated questions for a user.. | id, site, page, pagesize, sort, ... |
| user_answers | Paginated answers for a user. | Security and supply-chain teams call user_answers to get paginated answers for a user.. | id, site, page, pagesize, sort, ... |
| user_tags | Paginated tag activity for a user. | Developer-tool builders call user_tags to get paginated tag activity for a user.. | id, site, page, pagesize, sort |
| user_badges | Paginated badges for a user. | AI-agent developers call user_badges to get paginated badges for a user.. | id, site, page, pagesize, sort |
| search | Advanced full-text/tag search, paginated. | Platform and DevOps teams call search to get advanced full-text/tag search, paginated.. | q, site, tags, tagged, sort, ... |
| tags | Paginated Stack Exchange tags. | Security and supply-chain teams call tags to get paginated Stack Exchange tags.. | site, sort, page, pagesize |
| tag_questions | Paginated questions for a tag. | Developer-tool builders call tag_questions to get paginated questions for a tag.. | tag, site, sort, page, pagesize, ... |
| tag_info | Tag info by tag name. | AI-agent developers call tag_info to get tag info by tag name.. | tag, site |
| comments | Paginated comments for post id/ids. | Platform and DevOps teams call comments to get paginated comments for post id/ids.. | id, site, page, pagesize, sort, ... |
| answer_comments | Comments left on one or more answers, by answer id. | Security and supply-chain teams call answer_comments to get comments left on one or more answers, by answer id.. | ids, site, page, pagesize, order, ... |
| answer_questions | The questions that the given answers belong to, by answer id. | Developer-tool builders call answer_questions to get the questions that the given answers belong to, by answer id.. | ids, site, page, pagesize, order, ... |
| badges | All badges on the site, ranked bronze/silver/gold. | AI-agent developers call badges to get all badges on the site, ranked bronze/silver/gold.. | site, page, pagesize, order, sort |
| badge | Badge details by badge id. | Platform and DevOps teams call badge to get badge details by badge id.. | ids, site, page, pagesize, order, ... |
| badge_name | Named badges (the ones with a fixed name, e.g. 'Nice Answer'). | Security and supply-chain teams call badge_name to get named badges (the ones with a fixed name, e.g. | site, page, pagesize, order, sort |
| badge_recipients | Recently awarded badges across the site, with the users who earned them. | Developer-tool builders call badge_recipients to get recently awarded badges across the site, with the users who earned them.. | site, page, pagesize, order, sort |
| badge_recipients_by_ids | Recent recipients of specific badges, by badge id. | AI-agent developers call badge_recipients_by_ids to get recent recipients of specific badges, by badge id.. | ids, site, page, pagesize, order, ... |
| badge_tags | Tag-based badges (badges earned for activity within a tag). | Platform and DevOps teams call badge_tags to get tag-based badges (badges earned for activity within a tag).. | site, page, pagesize, order, sort |
| collectives | All Stack Overflow Collectives (curated communities like 'Google Cloud'). | Security and supply-chain teams call collectives to get all Stack Overflow Collectives (curated communities like 'Google Cloud').. | site, page, pagesize, order |
| collective | Details for a Collective by its slug. | Developer-tool builders call collective to get details for a Collective by its slug.. | slugs, site, page, pagesize, order |
| collective_questions | Questions associated with a Collective. | AI-agent developers call collective_questions to get questions associated with a Collective.. | slugs, site, page, pagesize, order, ... |
| collective_answers | Answers associated with a Collective. | Platform and DevOps teams call collective_answers to get answers associated with a Collective.. | slugs, site, page, pagesize, order, ... |
| collective_tags | Tags that belong to a Collective. | Security and supply-chain teams call collective_tags to get tags that belong to a Collective.. | slugs, site, page, pagesize, order, ... |
| collective_users | Members of a Collective, by reputation. | Developer-tool builders call collective_users to get members of a Collective, by reputation.. | slugs, site, page, pagesize, order, ... |
| comments_all | Recent comments across the whole site. | AI-agent developers call comments_all to get recent comments across the whole site.. | site, page, pagesize, order, sort |
| comment | Comment details by comment id. | Platform and DevOps teams call comment to get comment details by comment id.. | ids, site, page, pagesize, order, ... |
| info | Site statistics: total questions, answers, users, badges, API revision. | Security and supply-chain teams call info to get site statistics. | site |
| posts | Recent posts (questions and answers together) across the site. | Developer-tool builders call posts to get recent posts (questions and answers together) across the site.. | site, page, pagesize, order, sort, ... |
| post | Post details by id, whether it is a question or an answer. | AI-agent developers call post to get post details by id, whether it is a question or an answer.. | ids, site, page, pagesize, order, ... |
| post_comments | Comments on a post (question or answer), by post id. | Platform and DevOps teams call post_comments to get comments on a post (question or answer), by post id.. | ids, site, page, pagesize, order, ... |
| post_revisions | Edit history (revisions) of a post, by post id. | Security and supply-chain teams call post_revisions to get edit history (revisions) of a post, by post id.. | ids, site, page, pagesize, order |
| post_suggested_edits | Suggested edits submitted for a post, by post id. | Developer-tool builders call post_suggested_edits to get suggested edits submitted for a post, by post id.. | ids, site, page, pagesize, order |
| privileges | The site privilege ladder (what each reputation level unlocks). | AI-agent developers call privileges to get the site privilege ladder (what each reputation level unlocks).. | site, page, pagesize, order |
| question_answers | All answers to one or more questions, by question id. | Platform and DevOps teams call question_answers to get all answers to one or more questions, by question id.. | ids, site, page, pagesize, order, ... |
| question_comments | Comments on a question, by question id. | Security and supply-chain teams call question_comments to get comments on a question, by question id.. | ids, site, page, pagesize, order, ... |
| question_linked | Questions that link to the given question(s). | Developer-tool builders call question_linked to get questions that link to the given question(s).. | ids, site, page, pagesize, order, ... |
| question_related | Questions Stack Overflow considers related to the given question(s). | AI-agent developers call question_related to get questions Stack Overflow considers related to the given question(s).. | ids, site, page, pagesize, order, ... |
| question_timeline | Full event timeline of a question (edits, answers, comments, votes, close/reopen). | Platform and DevOps teams call question_timeline to get full event timeline of a question (edits, answers, comments, votes, close/reopen).. | ids, site, page, pagesize, order |
| questions_featured | Featured (bountied) questions on the site. | Security and supply-chain teams call questions_featured to get featured (bountied) questions on the site.. | site, page, pagesize, order, sort, ... |
| questions_no_answers | Questions with zero answers (no answers at all). | Developer-tool builders call questions_no_answers to get questions with zero answers (no answers at all).. | site, page, pagesize, order, sort, ... |
| questions_unanswered | Questions the community considers unanswered (no accepted/upvoted answer). | AI-agent developers call questions_unanswered to get questions the community considers unanswered (no accepted/upvoted answer).. | site, page, pagesize, order, sort, ... |
| revisions | Revision details by revision guid. | Platform and DevOps teams call revisions to get revision details by revision guid.. | ids, site, page, pagesize, order |
| search_simple | Title-only question search — find questions whose title contains given text. | Security and supply-chain teams call search_simple to get title-only question search. | intitle, tag, site, page, pagesize, ... |
| similar | Find questions similar to a title (duplicate detection). | Developer-tool builders call similar to find questions similar to a title (duplicate detection).. | title, tag, site, page, pagesize, ... |
| search_excerpts | Full-text search returning highlighted match excerpts for questions and answers. | AI-agent developers call search_excerpts to get full-text search returning highlighted match excerpts for questions and answers.. | q, tag, site, page, pagesize, ... |
| suggested_edits | Recent suggested edits across the site. | Platform and DevOps teams call suggested_edits to get recent suggested edits across the site.. | site, page, pagesize, order, sort |
| suggested_edit | Suggested-edit details by id. | Security and supply-chain teams call suggested_edit to get suggested-edit details by id.. | ids, site, page, pagesize, order, ... |
| tags_moderator_only | Tags only moderators can apply. | Developer-tool builders call tags_moderator_only to get tags only moderators can apply.. | site, page, pagesize, order, sort |
| tags_required | Tags that must be present on every question (where the site requires them). | AI-agent developers call tags_required to get tags that must be present on every question (where the site requires them).. | site, page, pagesize, order, sort |
| tag_synonyms | All tag synonyms on the site (e.g. 'js' → 'javascript'). | Platform and DevOps teams call tag_synonyms to get all tag synonyms on the site (e.g. | site, page, pagesize, order, sort |
| tag_faq | The frequently-asked (FAQ) questions for a tag. | Security and supply-chain teams call tag_faq to get the frequently-asked (FAQ) questions for a tag.. | tags, site, page, pagesize, order, ... |
| tag_related | Tags that commonly appear together with the given tag. | Developer-tool builders call tag_related to get tags that commonly appear together with the given tag.. | tags, site, page, pagesize, order, ... |
| tag_synonyms_by_tags | Synonyms that map to a specific tag. | AI-agent developers call tag_synonyms_by_tags to get synonyms that map to a specific tag.. | tags, site, page, pagesize, order, ... |
| tag_top_answerers | Top answerers in a tag (the experts), all-time or last month. | Platform and DevOps teams call tag_top_answerers to get top answerers in a tag (the experts), all-time or last month.. | tag, site, page, pagesize, order, ... |
| tag_top_askers | Top askers in a tag, all-time or last month. | Security and supply-chain teams call tag_top_askers to get top askers in a tag, all-time or last month.. | tag, site, page, pagesize, order, ... |
| tag_wikis | The wiki/excerpt body that describes a tag. | Developer-tool builders call tag_wikis to get the wiki/excerpt body that describes a tag.. | tags, site, page, pagesize, order |
| users | Site users, by reputation (the leaderboard). | AI-agent developers call users to get site users, by reputation (the leaderboard).. | site, page, pagesize, order, sort |
| user_comments | Comments written by a user. | Platform and DevOps teams call user_comments to get comments written by a user.. | ids, site, page, pagesize, order, ... |
| user_comments_to_user | Comments a user directed at one specific other user. | Security and supply-chain teams call user_comments_to_user to get comments a user directed at one specific other user.. | ids, toid, site, page, pagesize, ... |
| user_favorites | Questions a user bookmarked (favorited). | Developer-tool builders call user_favorites to get questions a user bookmarked (favorited).. | ids, site, page, pagesize, order, ... |
| user_mentioned | Comments that @-mention a user. | AI-agent developers call user_mentioned to get comments that @-mention a user.. | ids, site, page, pagesize, order, ... |
| user_network_activity | A user's activity across the entire Stack Exchange network (all sites). | Platform and DevOps teams call user_network_activity to get a user's activity across the entire Stack Exchange network (all sites).. | id, page, pagesize, order |
| user_posts | All posts (questions and answers) authored by a user. | Security and supply-chain teams call user_posts to get all posts (questions and answers) authored by a user.. | ids, site, page, pagesize, order, ... |
| user_privileges | The privileges a user has unlocked at their reputation level. | Developer-tool builders call user_privileges to get the privileges a user has unlocked at their reputation level.. | id, site, page, pagesize, order |
| user_questions_featured | A user's questions that currently carry a bounty (featured). | AI-agent developers call user_questions_featured to get a user's questions that currently carry a bounty (featured).. | ids, site, page, pagesize, order, ... |
| user_questions_no_answers | A user's questions that have no answers. | Platform and DevOps teams call user_questions_no_answers to get a user's questions that have no answers.. | ids, site, page, pagesize, order, ... |
| user_questions_unaccepted | A user's questions that have answers but none accepted. | Security and supply-chain teams call user_questions_unaccepted to get a user's questions that have answers but none accepted.. | ids, site, page, pagesize, order, ... |
| user_questions_unanswered | A user's questions the community considers unanswered. | Developer-tool builders call user_questions_unanswered to get a user's questions the community considers unanswered.. | ids, site, page, pagesize, order, ... |
| user_reputation | A user's reputation changes (the rep events feed). | AI-agent developers call user_reputation to get a user's reputation changes (the rep events feed).. | ids, site, page, pagesize, order |
| user_reputation_history | Public reputation history of a user (each gain/loss event). | Platform and DevOps teams call user_reputation_history to get public reputation history of a user (each gain/loss event).. | ids, site, page, pagesize, order |
| user_suggested_edits | Suggested edits a user has submitted. | Security and supply-chain teams call user_suggested_edits to get suggested edits a user has submitted.. | ids, site, page, pagesize, order, ... |
| user_top_answers_in_tags | A user's highest-scoring answers within specific tags. | Developer-tool builders call user_top_answers_in_tags to get a user's highest-scoring answers within specific tags.. | id, tags, site, page, pagesize, ... |
| user_top_questions_in_tags | A user's highest-scoring questions within specific tags. | AI-agent developers call user_top_questions_in_tags to get a user's highest-scoring questions within specific tags.. | id, tags, site, page, pagesize, ... |
| user_timeline | A user's activity timeline (posts, comments, badges, rep events). | Platform and DevOps teams call user_timeline to get a user's activity timeline (posts, comments, badges, rep events).. | ids, site, page, pagesize, order |
| user_top_answer_tags | The tags a user is strongest in by answer score. | Security and supply-chain teams call user_top_answer_tags to get the tags a user is strongest in by answer score.. | id, site, page, pagesize, order |
| user_top_question_tags | The tags a user is strongest in by question score. | Developer-tool builders call user_top_question_tags to get the tags a user is strongest in by question score.. | id, site, page, pagesize, order |
| user_top_tags | A user's top tags overall (combined question + answer activity). | AI-agent developers call user_top_tags to get a user's top tags overall (combined question + answer activity).. | id, site, page, pagesize, order |
| moderators | All moderators on the site. | Platform and DevOps teams call moderators to get all moderators on the site.. | site, page, pagesize, order, sort |
| elected_moderators | Moderators who were elected (excludes appointed/employee moderators). | Security and supply-chain teams call elected_moderators to get moderators who were elected (excludes appointed/employee moderators).. | site, page, pagesize, order, sort |
| errors | The catalog of Stack Exchange API error codes and their meanings. | Developer-tool builders call errors to get the catalog of Stack Exchange API error codes and their meanings.. | page, pagesize, order |
| error | Simulate one Stack Exchange API error by its id (returns the error as if it occurred). | AI-agent developers call error to get simulate one Stack Exchange API error by its id (returns the error as if it occurred).. | id, page, pagesize, order |
| sites | Every site in the Stack Exchange network (Stack Overflow, Server Fault, Super User, etc.). | Platform and DevOps teams call sites to get every site in the Stack Exchange network (Stack Overflow, Server Fault, Super User, etc.).. | page, pagesize, order, sort |
| associated_users | A user's accounts across all Stack Exchange sites (network accounts). | Security and supply-chain teams call associated_users to get a user's accounts across all Stack Exchange sites (network accounts).. | ids, page, pagesize, order |
| merge_history | Account-merge history for a user id. | Developer-tool builders call merge_history to get account-merge history for a user id.. | ids, page, pagesize, order |
Call search from your stack
curl -X POST https://api.reefapi.com/stackoverflow/v1/search \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"q":"async await"}'import requests
r = requests.post(
"https://api.reefapi.com/stackoverflow/v1/search",
headers={"x-api-key": REEF_KEY},
json={
"q": "async await"
},
)
print(r.json()["data"])const res = await fetch("https://api.reefapi.com/stackoverflow/v1/search", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"q": "async await"
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.stackoverflow.search with {"q":"async await"}.Who uses this API and why
- Community-analytics tools call questions and tags to track activity and trends in a technology.
- Developer-research products use search and answers to mine solutions for a knowledge base.
- Talent tools use user, user_answers and user_badges to gauge a developer's reputation and expertise.
Questions developers ask before integrating
Is this scraping the site or calling the official API?
The official one. Every response passes through quota_remaining, which read 299 on measured calls. That is Stack Exchange's own per-day request budget, and it means you get fields a page scrape could not give you, such as content_license, account_id and accept_rate.
Are post bodies Markdown or HTML?
HTML, as rendered on the site. A measured fetch of question 11227809 returned a body starting "<p>In this C++ code, sorting the data..." with the code inside <pre class="lang-cpp prettyprint-override"><code> blocks. There is no Markdown variant. The body appears at all only because the default filter is `withbody`; without it you get metadata and no prose.
Why are titles full of " and '?
Because Stack Exchange returns titles HTML-escaped and this API does not silently unescape them. Measured titles include "What does the "yield" keyword do in Python?" and "What's your most controversial programming opinion?". Run titles through an HTML entity decoder before display or your users will see the entities. Bodies need no such step because they are already HTML and render correctly as-is.
Why does every item have both owner and author, and both question_id and id?
The upstream fields are preserved and normalized aliases are added beside them, so nothing is lost and consumers can use one consistent shape. `owner` is Stack Exchange's original object; `author` mirrors it with the useful subset of user_id, display_name, link, reputation, user_type and profile_image. Likewise `id` and `type` sit next to question_id or answer_id, with type reading "question" or "answer" so you can tell which kind of row you have. Pick one convention and stay on it.
How do I tell whether a question is closed or a duplicate?
Read closed_date and closed_reason together; both are null on open questions. A measured search hit, question 1725517, returned closed_date 1360584615 with closed_reason "exact duplicate", while its neighbors in the same result set returned null for both. closed_reason is a phrase written for people rather than an enum, so match on it loosely if you branch on it at all.
Can I query sites other than Stack Overflow?
Yes, through the `site` parameter, using the Stack Exchange slug rather than the hostname. Verified live: serverfault, askubuntu and math all returned questions, with math's item links pointing at math.stackexchange.com. An unknown slug is rejected cleanly instead of silently falling back to Stack Overflow - site="notasite" returned INVALID_PARAM with "No site found for name `notasite`" and detail.stackexchange_error_name "bad_parameter".
I asked for 200 results per page and got 100. Why no error?
pagesize is clamped rather than rejected: a measured request with pagesize=500 returned exactly 100 records and reported meta.pagesize 100. Page forward instead, using meta.has_more and meta.next_page, both returned on questions, search, answers and the user list actions. Every page you request draws against the same quota_remaining budget.
Why does the question action's meta use prefixed keys?
Because that action returns two paginated things in one response and each needs its own cursor. A measured call on question 11227809 returned question_has_more, question_page, question_pagesize and question_quota_remaining for the question itself, plus answers_has_more, answers_page, answers_pagesize, answers_quota_remaining and answers_next_page for the answer list. Page the answers with the answers_* keys; the question_* set will not move.
Should I stick with the default filter?
Yes, unless you have a filter id you have verified against this endpoint. The default is `withbody`, which returns the standard field set plus rendered bodies - a measured question came back with 19 fields. An arbitrary Stack Exchange filter id did not degrade gracefully in testing: one returned ok:false with an empty object rather than a reduced field set. Ask for withbody and drop the fields you do not need on your own side.
What is the Stack Overflow API?
Stack Overflow API is a ReefAPI endpoint group for stack overflow It returns live JSON through POST requests under /stackoverflow/v1.
Is the Stack Overflow API free to try?
Yes. ReefAPI starts with 1,000 free credits, no card required. Stack Overflow calls use the same shared credit balance as every other ReefAPI engine.
Do I need a Stack Overflow login or account?
No login to Stack Overflow is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the Stack Overflow data?
The page example is captured from a live questions call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the Stack Overflow API use?
Stack Overflow actions currently cost 1-2 credits per successful call. Failed or blocked calls are free, and all APIs draw from one credit pool.