Stack Overflow Questions Batch API
Up to 100 question ids per request, one entry per distinct id, in the order you sent them.
GET /v1/stack-overflow/questions/batch1 credit per question id Up to 100 ids per request Max 100 credits An id that is not a question is still charged Failed requests are free
About this endpoint
GET /v1/stack-overflow/questions/batch?ids=11227809,11 answers one entry for every distinct id, in the order first asked. Each entry has id, its own lookupStatus and question, which is null for a miss. A mix of existing and missing ids is a normal 200 response.
Add include=answers or include=comments to fill the nested parts; with either part on, a request takes at most 10 ids. The batch charges 1 credit per distinct id, including an id that is not a question, and repeats in the id list are dropped before billing. Missing answers are visible through answersComplete, so a short list is not mistaken for a question with only a few answers.
Stack Overflow Questions Batch API FAQ
How many ids can one batch take?
1 to 100 ids, comma-separated. With include=answers or include=comments the ceiling is 10 ids because the nested parts have no size limit.
How is a batch billed?
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.
Does the order of entries match the ids?
Yes. data.questions has one entry per distinct requested id in the order first asked, and each entry repeats the id it is for.
What happens when one id is missing?
Its entry has lookupStatus not_found and question null, while the other entries still carry their questions. The response stays HTTP 200.
Other Stack Overflow endpoints
- QuestionGET /v1/stack-overflow/questions/{questionId}
- QuestionsGET /v1/stack-overflow/questions
- 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