Skip to content

Last updated

Changelog

stackoverflow.com API

HealthyRead-only

Structured data from stackoverflow.com. Generated from stackoverflow.com.

Base URL
https://api.maviapi.com/v1/sites/stackoverflow
7
Endpoints
14 min ago
Last verified
100%
Uptime / 7d
GET/list_questions1 credit per call

List Questions

List Stack Overflow questions (like /questions).

Bearer auth. Pass your key as Authorization: Bearer <key> on every request.
stringOptionalin query

one of activity, votes, creation, hot, week, month

stringOptionalin query

semicolon-separated tags that all must be present, e.g. "python;pandas" (empty = any)

integerOptionalin query

1-based page number

integerOptionalin query

results per page, 1-100

itemsobject[]13 fields
question_idinteger
titlestring
linkstring
tagsstring[]
scoreinteger
view_countinteger
answer_countinteger
is_answeredboolean
accepted_answer_idinteger
creation_dateinteger
last_activity_dateinteger
closed_reasonnull
ownerobject4 fields
user_idinteger
display_namestring
reputationinteger
linkstring
has_moreboolean
quota_remaininginteger
paginationobject3 fields
countinteger
has_moreboolean
next_cursorstring
fetched_atstring
ageinteger
Try itLive
GET
https://api.maviapi.com/v1/sites/stackoverflow/list_questions?sort=activity&page=1&pagesize=30
Request
curl "https://api.maviapi.com/v1/sites/stackoverflow/list_questions?sort=activity&page=1&pagesize=30" \
-H "Authorization: Bearer $MAVI_KEY"
Example662 B
{
  "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.

How to connect
https://mcp.maviapi.com/mcp

Or 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 import

Paste 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_questions

    List Stack Overflow questions (like /questions).

    Parameters and response fields for GET /list_questions
    Request parameters
    NameType / locationRequiredDescription
    sortstring / queryNoone of activity, votes, creation, hot, week, month
    taggedstring / queryNosemicolon-separated tags that all must be present, e.g. "python;pandas" (empty = any)
    pageinteger / queryNo1-based page number
    pagesizeinteger / queryNoresults per page, 1-100
    Response fields
    FieldTypeDescription
    itemsobject[]
    items[].question_idinteger
    items[].titlestring
    items[].linkstring
    items[].tagsstring[]
    items[].scoreinteger
    items[].view_countinteger
    items[].answer_countinteger
    items[].is_answeredboolean
    items[].accepted_answer_idinteger
    items[].creation_dateinteger
    items[].last_activity_dateinteger
    items[].closed_reasonnull
    items[].ownerobject
    items[].owner.user_idinteger
    items[].owner.display_namestring
    items[].owner.reputationinteger
    items[].owner.linkstring
    has_moreboolean
    quota_remaininginteger
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • Get Question GET /get_question

    Get one question with its full HTML body and all of its answers (bodies included).

    Parameters and response fields for GET /get_question
    Request parameters
    NameType / locationRequiredDescription
    question_idinteger / queryNonumeric Stack Overflow question id (from the URL /questions/<id>/...)
    answer_sortstring / queryNoorder of answers: votes, activity or creation
    Response fields
    FieldTypeDescription
    question_idinteger
    titlestring
    linkstring
    tagsstring[]
    scoreinteger
    view_countinteger
    answer_countinteger
    is_answeredboolean
    accepted_answer_idinteger
    creation_dateinteger
    last_activity_dateinteger
    closed_reasonnull
    ownerobject
    owner.user_idinteger
    owner.display_namestring
    owner.reputationinteger
    owner.linkstring
    body_htmlstring
    answersobject[]
    answers[].answer_idinteger
    answers[].question_idinteger
    answers[].scoreinteger
    answers[].is_acceptedboolean
    answers[].creation_dateinteger
    answers[].last_activity_dateinteger
    answers[].ownerobject
    answers[].owner.user_idinteger
    answers[].owner.display_namestring
    answers[].owner.reputationinteger
    answers[].owner.linkstring
    answers[].body_htmlstring
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursornull
    fetched_atstring
    ageinteger
  • Search Questions GET /search_questions

    Full-text search of Stack Overflow questions (like the site search box).

    Parameters and response fields for GET /search_questions
    Request parameters
    NameType / locationRequiredDescription
    qstring / queryNofree-text query matched against title and body
    taggedstring / queryNosemicolon-separated tags all of which must be present (empty = any)
    acceptedstring / queryNo"true" only questions with an accepted answer, "false" only without, "" either
    sortstring / queryNoone of relevance, activity, votes, creation
    pageinteger / queryNo1-based page number
    pagesizeinteger / queryNoresults per page, 1-100
    Response fields
    FieldTypeDescription
    itemsobject[]
    items[].question_idinteger
    items[].titlestring
    items[].linkstring
    items[].tagsstring[]
    items[].scoreinteger
    items[].view_countinteger
    items[].answer_countinteger
    items[].is_answeredboolean
    items[].accepted_answer_idinteger
    items[].creation_dateinteger
    items[].last_activity_dateinteger
    items[].closed_reasonnull
    items[].ownerobject
    items[].owner.user_idinteger
    items[].owner.display_namestring
    items[].owner.reputationinteger
    items[].owner.linkstring
    has_moreboolean
    quota_remaininginteger
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • List Tags GET /list_tags

    List Stack Overflow tags (like /tags), with question counts.

    Parameters and response fields for GET /list_tags
    Request parameters
    NameType / locationRequiredDescription
    sortstring / queryNoone of popular, activity, name
    innamestring / queryNoonly tags whose name contains this substring (empty = all)
    pageinteger / queryNo1-based page number
    pagesizeinteger / queryNoresults per page, 1-100
    Response fields
    FieldTypeDescription
    itemsobject[]
    items[].namestring
    items[].countinteger
    items[].has_synonymsboolean
    items[].linkstring
    has_moreboolean
    quota_remaininginteger
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • Get Tag GET /get_tag

    Get 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
    NameType / locationRequiredDescription
    tagstring / queryNotag name, e.g. "python" or "c#"
    Response fields
    FieldTypeDescription
    namestring
    countinteger
    linkstring
    synonymsstring[]
    excerptstring
    wiki_body_htmlstring
    quota_remaininginteger
    fetched_atstring
    ageinteger
  • Get User GET /get_user

    Get 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
    NameType / locationRequiredDescription
    user_idinteger / queryNonumeric Stack Overflow user id (from the URL /users/<id>/...)
    Response fields
    FieldTypeDescription
    user_idinteger
    display_namestring
    reputationinteger
    badge_countsobject
    badge_counts.bronzeinteger
    badge_counts.silverinteger
    badge_counts.goldinteger
    locationstring
    website_urlstring
    linkstring
    profile_imagestring
    creation_dateinteger
    last_access_dateinteger
    user_typestring
    about_me_htmlstring
    question_countinteger
    answer_countinteger
    top_questionsobject[]
    top_questions[].question_idinteger
    top_questions[].titlestring
    top_questions[].linkstring
    top_questions[].tagsstring[]
    top_questions[].scoreinteger
    top_questions[].view_countinteger
    top_questions[].answer_countinteger
    top_questions[].is_answeredboolean
    top_questions[].accepted_answer_idinteger
    top_questions[].creation_dateinteger
    top_questions[].last_activity_dateinteger
    top_questions[].closed_reasonnull
    top_questions[].ownerobject
    top_questions[].owner.user_idinteger
    top_questions[].owner.display_namestring
    top_questions[].owner.reputationinteger
    top_questions[].owner.linkstring
    top_answersobject[]
    top_answers[].answer_idinteger
    top_answers[].question_idinteger
    top_answers[].scoreinteger
    top_answers[].is_acceptedboolean
    top_answers[].creation_dateinteger
    top_answers[].last_activity_dateinteger
    top_answers[].ownerobject
    top_answers[].owner.user_idinteger
    top_answers[].owner.display_namestring
    top_answers[].owner.reputationinteger
    top_answers[].owner.linkstring
    top_answers[].titlestring
    quota_remaininginteger
    fetched_atstring
    ageinteger
  • List Users GET /list_users

    List Stack Overflow users (like /users).

    Parameters and response fields for GET /list_users
    Request parameters
    NameType / locationRequiredDescription
    sortstring / queryNoone of reputation, creation, name, modified
    innamestring / queryNoonly users whose display name contains this text (empty = all)
    pageinteger / queryNo1-based page number
    pagesizeinteger / queryNoresults per page, 1-100
    Response fields
    FieldTypeDescription
    itemsobject[]
    items[].user_idinteger
    items[].display_namestring
    items[].reputationinteger
    items[].badge_countsobject
    items[].badge_counts.bronzeinteger
    items[].badge_counts.silverinteger
    items[].badge_counts.goldinteger
    items[].locationstring
    items[].website_urlstring
    items[].linkstring
    items[].profile_imagestring
    items[].creation_dateinteger
    items[].last_access_dateinteger
    items[].user_typestring
    has_moreboolean
    quota_remaininginteger
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger

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.

ListCSV columns
List QuestionsGET /list_questionsquestion_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_questionanswer_id, question_id, score, is_accepted, creation_date, last_activity_date, owner, body_html
Search QuestionsGET /search_questionsquestion_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_tagsname, count, has_synonyms, link
List UsersGET /list_usersuser_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
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.

  • 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…