Last updated
Changelogstackoverflow.com API
HealthyRead-onlyStructured data from stackoverflow.com. Generated from stackoverflow.com.
/list_questions1 credit per callList Questions
List Stack Overflow questions (like /questions).
Authorization: Bearer <key> on every request.Parameters
one of activity, votes, creation, hot, week, month
semicolon-separated tags that all must be present, e.g. "python;pandas" (empty = any)
1-based page number
results per page, 1-100
Response fields
items
question_idtitlelinktagsscoreview_countanswer_countis_answeredaccepted_answer_idcreation_datelast_activity_dateclosed_reasonowner
user_iddisplay_namereputationlinkhas_morequota_remainingpagination
counthas_morenext_cursorfetched_atagecurl "https://api.maviapi.com/v1/sites/stackoverflow/list_questions?sort=activity&page=1&pagesize=30" \-H "Authorization: Bearer $MAVI_KEY"
{
"items": [
{
"question_id": 0,
"title": "string",
"link": "string",
"tags": [
"string"
],
"score": 0,
"view_count": 0,
"answer_count": 0,
"is_answered": false,
"accepted_answer_id": 0,
"creation_date": 0,
"last_activity_date": 0,
"closed_reason": null,
"owner": {
"user_id": 0,
"display_name": "string",
"reputation": 0,
"link": "string"
}
}
],
"has_more": false,
"quota_remaining": 0,
"pagination": {
"count": 0,
"has_more": false,
"next_cursor": "string"
},
"fetched_at": "string",
"age": 0
}Get all the data, no code
Collect every page of GET /list_questions into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.
Use stackoverflow.com API from Claude, ChatGPT and your coding tools
Add this URL as a custom connector and sign in to maviapi. Nothing to install.
https://mcp.maviapi.com/mcpOr run it locally, with each endpoint of stackoverflow.com API as its own tool:
claude mcp add maviapi -e MAVIAPI_TOOLS=stackoverflow -- npx -y '@maviapi/mcp'Import stackoverflow.com API into Postman and other tools
How to importPaste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.
- OpenAPI 3.1
https://api.maviapi.com/v1/apis/stackoverflow/openapi.json - Postman
https://api.maviapi.com/v1/apis/stackoverflow/postman.json
The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.
Build with the stackoverflow.com API
Choose a starting endpoint
- List Questions
GET /list_questionsList Stack Overflow questions (like /questions).
Parameters and response fields for GET /list_questions
Request parameters Name Type / location Required Description sort string / query No one of activity, votes, creation, hot, week, month tagged string / query No semicolon-separated tags that all must be present, e.g. "python;pandas" (empty = any) page integer / query No 1-based page number pagesize integer / query No results per page, 1-100 Response fields Field Type Description items object[] items[].question_id integer items[].title string items[].link string items[].tags string[] items[].score integer items[].view_count integer items[].answer_count integer items[].is_answered boolean items[].accepted_answer_id integer items[].creation_date integer items[].last_activity_date integer items[].closed_reason null items[].owner object items[].owner.user_id integer items[].owner.display_name string items[].owner.reputation integer items[].owner.link string has_more boolean quota_remaining integer pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - Get Question
GET /get_questionGet one question with its full HTML body and all of its answers (bodies included).
Parameters and response fields for GET /get_question
Request parameters Name Type / location Required Description question_id integer / query No numeric Stack Overflow question id (from the URL /questions/<id>/...) answer_sort string / query No order of answers: votes, activity or creation Response fields Field Type Description question_id integer title string link string tags string[] score integer view_count integer answer_count integer is_answered boolean accepted_answer_id integer creation_date integer last_activity_date integer closed_reason null owner object owner.user_id integer owner.display_name string owner.reputation integer owner.link string body_html string answers object[] answers[].answer_id integer answers[].question_id integer answers[].score integer answers[].is_accepted boolean answers[].creation_date integer answers[].last_activity_date integer answers[].owner object answers[].owner.user_id integer answers[].owner.display_name string answers[].owner.reputation integer answers[].owner.link string answers[].body_html string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Search Questions
GET /search_questionsFull-text search of Stack Overflow questions (like the site search box).
Parameters and response fields for GET /search_questions
Request parameters Name Type / location Required Description q string / query No free-text query matched against title and body tagged string / query No semicolon-separated tags all of which must be present (empty = any) accepted string / query No "true" only questions with an accepted answer, "false" only without, "" either sort string / query No one of relevance, activity, votes, creation page integer / query No 1-based page number pagesize integer / query No results per page, 1-100 Response fields Field Type Description items object[] items[].question_id integer items[].title string items[].link string items[].tags string[] items[].score integer items[].view_count integer items[].answer_count integer items[].is_answered boolean items[].accepted_answer_id integer items[].creation_date integer items[].last_activity_date integer items[].closed_reason null items[].owner object items[].owner.user_id integer items[].owner.display_name string items[].owner.reputation integer items[].owner.link string has_more boolean quota_remaining integer pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - List Tags
GET /list_tagsList Stack Overflow tags (like /tags), with question counts.
Parameters and response fields for GET /list_tags
Request parameters Name Type / location Required Description sort string / query No one of popular, activity, name inname string / query No only tags whose name contains this substring (empty = all) page integer / query No 1-based page number pagesize integer / query No results per page, 1-100 Response fields Field Type Description items object[] items[].name string items[].count integer items[].has_synonyms boolean items[].link string has_more boolean quota_remaining integer pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - Get Tag
GET /get_tagGet one tag: question count, synonyms and its tag-wiki excerpt and full wiki body (HTML).
Parameters and response fields for GET /get_tag
Request parameters Name Type / location Required Description tag string / query No tag name, e.g. "python" or "c#" Response fields Field Type Description name string count integer link string synonyms string[] excerpt string wiki_body_html string quota_remaining integer fetched_at string age integer - Get User
GET /get_userGet one user's profile (about-me HTML included) plus their top-voted questions and answers.
Parameters and response fields for GET /get_user
Request parameters Name Type / location Required Description user_id integer / query No numeric Stack Overflow user id (from the URL /users/<id>/...) Response fields Field Type Description user_id integer display_name string reputation integer badge_counts object badge_counts.bronze integer badge_counts.silver integer badge_counts.gold integer location string website_url string link string profile_image string creation_date integer last_access_date integer user_type string about_me_html string question_count integer answer_count integer top_questions object[] top_questions[].question_id integer top_questions[].title string top_questions[].link string top_questions[].tags string[] top_questions[].score integer top_questions[].view_count integer top_questions[].answer_count integer top_questions[].is_answered boolean top_questions[].accepted_answer_id integer top_questions[].creation_date integer top_questions[].last_activity_date integer top_questions[].closed_reason null top_questions[].owner object top_questions[].owner.user_id integer top_questions[].owner.display_name string top_questions[].owner.reputation integer top_questions[].owner.link string top_answers object[] top_answers[].answer_id integer top_answers[].question_id integer top_answers[].score integer top_answers[].is_accepted boolean top_answers[].creation_date integer top_answers[].last_activity_date integer top_answers[].owner object top_answers[].owner.user_id integer top_answers[].owner.display_name string top_answers[].owner.reputation integer top_answers[].owner.link string top_answers[].title string quota_remaining integer fetched_at string age integer - List Users
GET /list_usersList Stack Overflow users (like /users).
Parameters and response fields for GET /list_users
Request parameters Name Type / location Required Description sort string / query No one of reputation, creation, name, modified inname string / query No only users whose display name contains this text (empty = all) page integer / query No 1-based page number pagesize integer / query No results per page, 1-100 Response fields Field Type Description items object[] items[].user_id integer items[].display_name string items[].reputation integer items[].badge_counts object items[].badge_counts.bronze integer items[].badge_counts.silver integer items[].badge_counts.gold integer items[].location string items[].website_url string items[].link string items[].profile_image string items[].creation_date integer items[].last_access_date integer items[].user_type string has_more boolean quota_remaining integer pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer
Export stackoverflow.com data to CSV
Each list below downloads as a CSV file with one row per record. Collect it into a dataset with "Get all the data, no code" under the console above. The dataset reads the list page by page, and you download it as CSV, JSON or JSONL.
| List | CSV columns |
|---|---|
List QuestionsGET /list_questions | question_id, title, link, tags, score, view_count, answer_count, is_answered, accepted_answer_id, creation_date, last_activity_date, closed_reason, owner |
Get QuestionGET /get_question | answer_id, question_id, score, is_accepted, creation_date, last_activity_date, owner, body_html |
Search QuestionsGET /search_questions | question_id, title, link, tags, score, view_count, answer_count, is_answered, accepted_answer_id, creation_date, last_activity_date, closed_reason, owner |
List TagsGET /list_tags | name, count, has_synonyms, link |
List UsersGET /list_users | user_id, display_name, reputation, badge_counts, location, website_url, link, profile_image, creation_date, last_access_date, user_type |
A nested value (a list or an object) is written as JSON in one cell. How datasets and exports work
stackoverflow.com API questions
What you get, what it costs and how to call it.
Is there an official stackoverflow.com API?
This stackoverflow.com API is not official. It is an independent, hosted API from maviapi for the public data on stackoverflow.com, and it is not made, endorsed or supported by stackoverflow.com. Whether stackoverflow.com offers a developer API of its own is a question for stackoverflow.com. This one is ready to call with a maviapi key, and every endpoint and field it returns is documented on this page.
What data can I get from the stackoverflow.com API?
The stackoverflow.com API has 7 endpoints. Each returns JSON with the parameters and fields documented above:
- GET
/list_questions: List Stack Overflow questions (like /questions). - GET
/get_question: Get one question with its full HTML body and all of its answers (bodies included). - GET
/search_questions: Full-text search of Stack Overflow questions (like the site search box). - GET
/list_tags: List Stack Overflow tags (like /tags), with question counts. - GET
/get_tag: Get one tag: question count, synonyms and its tag-wiki excerpt and full wiki body (HTML). - GET
/get_user: Get one user's profile (about-me HTML included) plus their top-voted questions and answers. - GET
/list_users: List Stack Overflow users (like /users).
How much does the stackoverflow.com API cost?
Calls are paid in credits from your maviapi plan, and only successful calls are charged. Every endpoint of this API costs 1 credit per call. On the Basic plan ($19 a month for 25,000 credits), 1,000 calls cost about $0.76. Failed calls are free. The Free plan gives you 1,000 credits a month, with no credit card required. See plans and credit prices for everything after that.
How do I call the stackoverflow.com API?
Send an HTTPS request to the endpoint with your API key in the Authorization header. For example, GET /list_questions:
curl 'https://api.maviapi.com/v1/sites/stackoverflow/list_questions' \
-H "Authorization: Bearer $MAVI_KEY"Create a key on your API keys page, or try any endpoint first in the console above with the free test key.
What are the ways to get stackoverflow.com data as JSON?
Each way to get stackoverflow.com data as JSON fits a different need:
- Your own scraper: Full control and no vendor, but the parsing, the blocked requests and the repairs after every change on stackoverflow.com are yours. Better for a one-off pull from a page that rarely changes.
- Apify: A marketplace of Actors you run, where input, output and price are set by each Actor. Better when an Actor already returns what you need, or you want to host your own code. See maviapi vs Apify.
- RapidAPI: A hub of APIs added by many providers, called with one RapidAPI key and priced per API. Better when you already use the hub and one of its APIs covers what you need. Source: RapidAPI docs.
- maviapi: The stackoverflow.com API on this page: 7 documented endpoints, a published response schema and one key for the whole catalog. Better when this data is part of your product and you do not want to maintain a scraper.
What happens when stackoverflow.com changes its layout?
Your code does not change. maviapi keeps the stackoverflow.com API working when stackoverflow.com changes its pages, so you keep calling the same endpoints and get JSON in the shape documented here. See its current health on the status page and what changed in its changelog.
Will an update break my stackoverflow.com API integration?
No. An endpoint you use never changes shape: new fields, optional parameters and endpoints are added beside it, and a change that would break a call ships as a new endpoint. Ignore response fields you do not know, and follow the changelog for what is new.
Related APIs
- Tripadvisor API
Trip-planning data from Tripadvisor: geo search plus attractions, restaurants and hotels by location (geo_id), with…
- Eventbrite API
Events listed on Eventbrite for a city and date range: dates, venue with address and coordinates, image and summary…
- Songkick Concerts API
Upcoming concerts and music festivals in any city from Songkick, for a date window, with venues, performers, prices…