Stack Exchange
DeveloperUSapi.stackexchange.com
Questions, answers and tags across Stack Overflow and every Stack Exchange site.
Capabilities (17)
GET /v1/data/stackexchange/answer1 creditReturns a single answer with its score, is_accepted flag, parent question id, owner and timestamps.
GET /v1/data/stackexchange/answers1 creditReturns every answer on the question with score, is_accepted, owner and timestamps.
GET /v1/data/stackexchange/comments1 creditReturns the comments posted directly on the question, with body, score, owner and creation date.
GET /v1/data/stackexchange/linked1 creditReturns questions whose body contains a link to the given question.
GET /v1/data/stackexchange/question1 creditReturns the question's title, tags, score, view count, answer count, accepted answer id, owner and timestamps.
GET /v1/data/stackexchange/related1 creditReturns questions the site's own similarity engine considers related to the given question.
GET /v1/data/stackexchange/search1 creditReturns questions matching a free-text query, optionally narrowed by tag, answered state and score.
GET /v1/data/stackexchange/similar1 creditReturns questions whose titles are similar to the supplied text, the same duplicate-detection search the ask page runs.
GET /v1/data/stackexchange/sites1 creditReturns every site in the Stack Exchange network with its api_site_parameter, name, URL, launch date and icons.
GET /v1/data/stackexchange/tag-info1 creditReturns the tag's total question count and its moderator-only, required and has_synonyms flags.
GET /v1/data/stackexchange/tags1 creditReturns Stack Overflow tags with their question counts, ordered by popularity, name or activity.
GET /v1/data/stackexchange/tag-top-answerers1 creditReturns the users with the highest answer score in the tag over the chosen period, with their score and post counts.
GET /v1/data/stackexchange/top-questions1 creditReturns a page of Stack Overflow questions ordered by votes, activity or creation date, optionally restricted to a tag.
GET /v1/data/stackexchange/user1 creditReturns the user's reputation, badge counts, display name, location, account age, profile image and link.
GET /v1/data/stackexchange/user-answers1 creditReturns the answers a user has posted, with score, accepted state and parent question id.
GET /v1/data/stackexchange/user-questions1 creditReturns the questions a user has asked, with tags, score, answer count and timestamps.
GET /v1/data/stackexchange/user-top-tags1 creditReturns the tags the user answers in, each with their answer count, answer score, question count and question score in that tag.
Response example
The shape of data from stackexchange/answer (Answer by ID). A sample, not live data.
| owner | is_accepted | score | last_activity_date | last_edit_date | creation_date | answer_id | question_id |
|---|---|---|---|---|---|---|---|
| {"account_id":559988,"reputation":473503,"user_id":922184,"user_type":"registered","profile_image":"https://i.sstatic.net/h7WDB.jpg?s=256","display_name":"Mysticial","link":"https://stackoverflow.com/users/922184/mysticial"} | true | 35296 | 1709573833 | 1709573833 | 1340805402 | 11227902 | 11227809 |
1 more column in JSON.
Ask with this source
A prompt for your agent that names this source and how to call it through the crw MCP.
Answer by ID
Use Stack Exchange (stackexchange) from fastCRW Pergamon, capability "Answer by ID" (answer). You have an answer id, for example from a permalink ending in #<id>, and want that answer alone. Example options: id=11227902, filter=withbody. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "stackexchange" and capability "answer". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>
Answers to a question
Use Stack Exchange (stackexchange) from fastCRW Pergamon, capability "Answers to a question" (answers). You have a question id and want the actual answers, for example to read the accepted solution. Example options: id=11227809, filter=withbody, sort=votes. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "stackexchange" and capability "answers". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>
Comments on a question
Use Stack Exchange (stackexchange) from fastCRW Pergamon, capability "Comments on a question" (comments). The answers did not settle it and you need the clarifications and caveats people left in the comment thread. Example options: id=11227809, sort=votes. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "stackexchange" and capability "comments". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>
Questions linking to this one
Use Stack Exchange (stackexchange) from fastCRW Pergamon, capability "Questions linking to this one" (linked). You want to see where a canonical question is cited from, to gauge its reach or find adjacent problems. Example options: id=11227809, sort=votes. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "stackexchange" and capability "linked". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>
Licence
Content is CC BY-SA (4.0 for posts after 2018-05-02); the Stack Exchange API terms require attribution and a visible link back.
https://stackoverflow.com/help/licensingAttribution
Display this wherever you show the data. It arrives on every response as provenance.attribution_text.
Source: Stack Exchange, CC BY-SA
Cache: up to 3600s
