Stack Overflow Questions API
A page of questions sorted by creation, votes, activity or hot, filtered by tag or date.
GET /v1/stack-overflow/questions1 credit Failed requests are free
About this endpoint
GET /v1/stack-overflow/questions returns up to 100 questions per page. Each row has id, url, title, tags, score, votes.up and votes.down, viewCount, answerCount, commentCount, favoriteCount, isAnswered, acceptedAnswerId and the creation, activity and edit times.
Add include=body for bodyHtml and bodyMarkdown; with it, limit is at most 25. Sort by creation to page without a ceiling. votes, activity, hot, week and month return up to 2,500 rows per list (625 with include=body), then stop and set limitReached to true. Rows with equal scores can repeat or skip on those sorts. tagged takes up to five tags and keeps only questions that carry all of them. hot, week and month take no date range, unanswered, relatedTo or linkedTo.
Stack Overflow Questions API FAQ
How do I get the next page?
Read page.hasMore and send page.nextCursor back as cursor, with the same filters. A cursor is tied to the filters it was issued for; change a filter and start again without one.
How many credits does a page cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.
How do I list questions under one tag?
Set tagged to the tag name, for example tagged=python. Several tags are comma-separated and a question must carry all of them. Combine it with sort and a creation date range.
Why did a list stop at 2,500 rows?
Lists sorted by anything other than creation stop at 2,500 rows (625 with include=body). limitReached is true when that happened. Switch to sort=creation and page with the cursor to go deeper. Rows with equal scores can repeat or skip on the other sorts.
Other Stack Overflow endpoints
- QuestionGET /v1/stack-overflow/questions/{questionId}
- Questions by idGET /v1/stack-overflow/questions/batch
- SearchGET /v1/stack-overflow/questions/search
- Similar titlesGET /v1/stack-overflow/questions/title-search
- AnswersGET /v1/stack-overflow/questions/{questionId}/answers
- CommentsGET /v1/stack-overflow/posts/{postId}/comments
- Comments by postGET /v1/stack-overflow/posts/comments
- RevisionsGET /v1/stack-overflow/posts/{postId}/revisions