Stack Overflow Tag API
One tag with its description, synonyms, related tags and best answerers.
GET /v1/stack-overflow/tags/{tag}1 credit Failed requests are free
About this endpoint
GET /v1/stack-overflow/tags/{tag} returns one tag. include picks which parts come back, each of which adds to the response time: wiki for excerpt, bodyHtml, excerptEditedAt and bodyEditedAt, synonyms for fromTag, toTag, appliedCount, createdAt and lastAppliedAt, related for the tags used together with it, and topAnswerers for the best answerers of all time with user, postCount and score. All four are on by default.
A synonym resolves to its canonical tag, so python3 comes back as python and py as python. A tag that nobody uses is not_found with tag null. Encode # and + in the path as c%23 and c%2B%2B. synonymsComplete is false when the tag has more synonyms than one response holds.
Stack Overflow Tag API FAQ
How do I get only the tag counts?
Set include= to a part list without the extras. The tag itself comes back with its name, questionCount, synonyms, moderator-only and required flags and last activity, and the other parts are null.
How many credits does a tag lookup 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.
What happens when I ask for a synonym?
The lookup follows it to the canonical tag. python3 resolves to python and py resolves to python, so the tag name in the response can differ from the one you sent.
Why is synonymsComplete false?
The tag has more than 100 synonyms and the list stops at the ceiling. The synonyms that came back are still in synonyms.
Other Stack Overflow endpoints
- QuestionGET /v1/stack-overflow/questions/{questionId}
- Questions by idGET /v1/stack-overflow/questions/batch
- 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