InsightSocial API

Stack Overflow

Stack Overflow API reference: 23 endpoints for questions, answers, users, tags and search. Per-endpoint credit prices and cURL examples.

Questions, answers, comments, edit history, users, reputation, badges and tags on Stack Overflow and every other Stack Exchange site.

Base path: /v1/stackoverflow/...

Quickstart

cURL
curl "https://api.insightsocial.app/v1/stackoverflow/post/citation?post_id=11227902" \
  -H "x-api-key: $INSIGHTSOCIAL_API_KEY"

Endpoints

3 of these are metered: the price depends on how much the call reads. See Credits.

Every endpoint here is beta: it returns the platform's own structure under our naming rules (snake_case keys, string ids, ISO times where the platform gives a timestamp), not a schema-2 entity, and its fields may change. See Beta endpoints.

EndpointCreditsWhat it returnsKey parameters
/post/citation20Get a BibTeX, AMS and text citation for a Stack Overflow question or answer. Beta.post_id
/post/comments20List every comment on a Stack Overflow question or answer. Beta.post_id
/post/revisions20List the versions of a Stack Overflow post, with the text before and after each edit. Beta.post_id
/post/timeline20List everything that happened to a Stack Overflow post: edits, locks, answers, comments, votes and reviews. Beta.post_id
/posts/comments20–1260Get the comments on up to 100 Stack Overflow questions and answers in one call. Beta.ids
/question20Get a Stack Overflow question with its text, tags, votes, closed or locked state and, if asked, its answers and comments. Beta.question_id
/question/answers20List the answers to a Stack Overflow question by votes, activity or time, with their text and, if asked, their comments. Beta.question_id
/questions20List Stack Overflow questions by tag, time range, votes or activity, or the questions related to or linking to one. Beta.—
/questions/batch20–1260Get up to 100 Stack Overflow questions in one call, by id. Beta.ids
/questions/search20Search Stack Overflow questions and answers by words, title, body, tag, author or answer count, with snippets. Beta.—
/questions/title-search20Search Stack Overflow questions whose title is closest to a title. Beta.title
/sites20List the sites of the Stack Exchange network and the name each takes in the site parameter. Beta.—
/tag20Get a Stack Overflow tag with its description, synonyms, related tags and best answerers. Beta.tag
/tags20List Stack Overflow tags by popularity, activity or name, with question counts. Beta.—
/user20Get a Stack Overflow user's profile: reputation, badges, activity counts, location, website and profile text. Beta.member_id
/user/answers20List the answers a Stack Overflow user has given, by activity, votes or time. Beta.member_id
/user/badges20List the badges a Stack Overflow user has earned. Beta.member_id
/user/comments20List the comments a Stack Overflow user has written, by time or votes. Beta.member_id
/user/questions20List the questions a Stack Overflow user has asked, by activity, votes or time. Beta.member_id
/user/reputation20List the changes to a Stack Overflow user's reputation, newest first. Beta.member_id
/user/tags20List the tags a Stack Overflow user posts under, with question and answer counts and scores. Beta.member_id
/users/batch20–1260Get up to 100 Stack Overflow users in one call, by id. Beta.ids
/users/search20Search Stack Overflow users by name, reputation or when they joined. Beta.—

On this page