{"operation":"questions/get","version":"1.0.1","status":"pilot","title":"Get a question","summary":"One Stack Overflow question, whole: its text, every answer and every comment, the votes, views, tags, authors, and why it is closed when it is.","use_when":"You have a Stack Overflow question (its link, its short link, an answer's link under it, or its id) and need all of it: its text in HTML and in Markdown, every answer (the accepted one says so, however many: 105 of 105 on the longest question read on 2026-12-02) and every comment of both, with their scores, dates, authors and licence, why and by whom it is closed and the question it repeats, its bounty, a moderator's notice, where it was migrated from. To find questions by words, tags, author, dates or state (answered, closed), use stackoverflow/questions/search, which gives each one just as whole.","categories":["Developers"],"icon":"question","source":"stackoverflow","input":{"type":"object","required":["question"],"additionalProperties":false,"properties":{"question":{"type":["string","integer"],"description":"The question: its id (11227809), its page (https://stackoverflow.com/questions/11227809/...), its short link (https://stackoverflow.com/q/11227809), or the link of one of its answers (https://stackoverflow.com/a/11227902, whose question is found first).","examples":["https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-processing-an-unsorted-array",11227809]}}},"record":{"type":"object","additionalProperties":false,"required":["object","id","ids","url","share_url","title","tags","body_html","body_markdown","score","upvote_count","downvote_count","favorite_count","view_count","answer_count","comment_count","is_answered","accepted_answer_id","close_vote_count","reopen_vote_count","delete_vote_count","created_at","last_activity_at","last_edited_at","owner","last_editor","closed","locked_at","protected_at","community_owned_at","bounty","notice","migrated_from","migrated_to","content_license","answers","comments","source_url","observed_at"],"$defs":{"user":{"type":["object","null"],"description":"A user as a post shows them; null when the post has none. A deleted user keeps a name, the type `does_not_exist` and no id; the Community user, which owns what nobody does, is -1.","additionalProperties":false,"required":["id","account_id","name","url","avatar_url","type","reputation","accept_rate","badges"],"properties":{"id":{"type":["integer","null"],"description":"The user's id on Stack Overflow."},"account_id":{"type":["integer","null"],"description":"Their network account's id, the same on every Stack Exchange site."},"name":{"type":["string","null"],"description":"Their display name, as written."},"url":{"type":["string","null"],"description":"Their profile on Stack Overflow."},"avatar_url":{"type":["string","null"]},"type":{"type":["string","null"],"description":"registered, unregistered, moderator, team_admin or does_not_exist (deleted)."},"reputation":{"type":["integer","null"]},"accept_rate":{"type":["integer","null"],"description":"The share of their questions' answers they accepted, in percent, when Stack Overflow shows it."},"badges":{"type":["object","null"],"additionalProperties":false,"required":["gold","silver","bronze"],"properties":{"gold":{"type":["integer","null"]},"silver":{"type":["integer","null"]},"bronze":{"type":["integer","null"]}}}}},"comment":{"type":"object","additionalProperties":false,"required":["id","url","body_html","body_markdown","score","is_edited","created_at","owner","reply_to_user","content_license"],"properties":{"id":{"type":"integer"},"url":{"type":["string","null"]},"body_html":{"type":["string","null"],"description":"The comment as the page shows it, in HTML."},"body_markdown":{"type":["string","null"],"description":"The comment as its author wrote it, in Markdown."},"score":{"type":["integer","null"],"description":"Its upvotes (comments have no downvotes)."},"is_edited":{"type":["boolean","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"owner":{"$ref":"#/$defs/user"},"reply_to_user":{"$ref":"#/$defs/user","description":"The user the comment answers (@name), when it answers one."},"content_license":{"type":["string","null"],"description":"CC BY-SA 4.0, 3.0 or 2.5, by the date it was written."}}},"collective":{"type":["object","null"],"description":"A collective of Stack Overflow: a company's or a technology's space on the site (Google Cloud, Microsoft Azure).","additionalProperties":false,"required":["name","slug","url","description","external_links"],"properties":{"name":{"type":["string","null"]},"slug":{"type":["string","null"]},"url":{"type":["string","null"]},"description":{"type":["string","null"]},"external_links":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","url"],"properties":{"type":{"type":["string","null"],"description":"website, twitter, github, facebook, instagram, support or linkedin."},"url":{"type":["string","null"]}}}}}},"migration":{"type":["object","null"],"additionalProperties":false,"required":["question_id","site","migrated_at"],"properties":{"question_id":{"type":["integer","null"],"description":"The question's id on the other site."},"site":{"type":["object","null"],"additionalProperties":false,"required":["name","url","api_site_parameter"],"properties":{"name":{"type":["string","null"],"description":"Unix & Linux, Super User..."},"url":{"type":["string","null"]},"api_site_parameter":{"type":["string","null"],"description":"The site's name in the Stack Exchange API (unix, superuser)."}}},"migrated_at":{"type":["string","null"],"format":"date-time"}}}},"properties":{"object":{"const":"question"},"id":{"type":"integer","description":"The question's id on Stack Overflow, as in its address."},"ids":{"type":"object","additionalProperties":false,"required":["question_id"],"properties":{"question_id":{"type":"integer"}}},"url":{"type":["string","null"],"description":"The question's page."},"share_url":{"type":["string","null"],"description":"Its short link (stackoverflow.com/q/<id>)."},"title":{"type":["string","null"],"description":"As written, not HTML-escaped."},"tags":{"type":"array","items":{"type":"string"}},"body_html":{"type":["string","null"],"description":"The question as the page shows it, in HTML."},"body_markdown":{"type":["string","null"],"description":"The question as its author wrote it, in Markdown."},"score":{"type":["integer","null"],"description":"Upvotes less downvotes."},"upvote_count":{"type":["integer","null"]},"downvote_count":{"type":["integer","null"]},"favorite_count":{"type":["integer","null"],"description":"What the API counts as the question's favorites. Stack Overflow's saves are private, and this count is 0 on nearly every question however popular (273 of 274 read on 02/12/2026): not a measure of interest."},"view_count":{"type":["integer","null"]},"answer_count":{"type":["integer","null"]},"comment_count":{"type":["integer","null"]},"is_answered":{"type":["boolean","null"],"description":"Whether it has an accepted answer or an answer scored above 0."},"accepted_answer_id":{"type":["integer","null"],"description":"The accepted answer's id, among `answers`."},"close_vote_count":{"type":["integer","null"],"description":"Votes to close it, cast and pending."},"reopen_vote_count":{"type":["integer","null"],"description":"Votes to reopen it, cast and pending."},"delete_vote_count":{"type":["integer","null"],"description":"Votes to delete it, cast and pending."},"created_at":{"type":["string","null"],"format":"date-time"},"last_activity_at":{"type":["string","null"],"format":"date-time","description":"Its last answer, comment or edit."},"last_edited_at":{"type":["string","null"],"format":"date-time"},"owner":{"$ref":"#/$defs/user","description":"Who asked it."},"last_editor":{"$ref":"#/$defs/user","description":"Who edited it last."},"closed":{"type":["object","null"],"description":"Why and by whom the question is closed; null while it is open.","additionalProperties":false,"required":["closed_at","reason","description_html","by_users","original_questions"],"properties":{"closed_at":{"type":["string","null"],"format":"date-time"},"reason":{"type":["string","null"],"description":"Duplicate, Opinion-based, Needs details or clarity..."},"description_html":{"type":["string","null"],"description":"The reason's own words, as the page shows them."},"by_users":{"type":"array","items":{"$ref":"#/$defs/user"},"description":"Who voted to close it."},"original_questions":{"type":"array","description":"The questions it repeats, for a duplicate.","items":{"type":"object","additionalProperties":false,"required":["id","url","title","answer_count","accepted_answer_id"],"properties":{"id":{"type":["integer","null"]},"url":{"type":["string","null"]},"title":{"type":["string","null"]},"answer_count":{"type":["integer","null"]},"accepted_answer_id":{"type":["integer","null"]}}}}}},"locked_at":{"type":["string","null"],"format":"date-time","description":"When a moderator locked it: no votes, answers or edits since."},"protected_at":{"type":["string","null"],"format":"date-time","description":"Since when only users with reputation may answer it."},"community_owned_at":{"type":["string","null"],"format":"date-time","description":"Since when it is a community wiki."},"bounty":{"type":["object","null"],"description":"An open bounty on the question; null when there is none.","additionalProperties":false,"required":["amount","closes_at","user"],"properties":{"amount":{"type":["integer","null"],"description":"Reputation offered."},"closes_at":{"type":["string","null"],"format":"date-time"},"user":{"$ref":"#/$defs/user","description":"Who offered it."}}},"notice":{"type":["object","null"],"description":"A moderator's notice on the question (a lock's reason, a call for better answers); null when there is none.","additionalProperties":false,"required":["body_html","created_at","owner_user_id"],"properties":{"body_html":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"owner_user_id":{"type":["integer","null"],"description":"The id of the user who set it."}}},"migrated_from":{"$ref":"#/$defs/migration","description":"Where the question was moved from, when it came from another Stack Exchange site."},"migrated_to":{"$ref":"#/$defs/migration","description":"Where it was moved to, when Stack Overflow sent it to another site."},"content_license":{"type":["string","null"],"description":"The question's licence (CC BY-SA 4.0), when the API says it: on few questions (1 of 153 on 02/12), where its answers and comments always do."},"answers":{"type":"array","description":"Every answer, whole, in the API's order.","items":{"type":"object","additionalProperties":false,"required":["id","url","share_url","body_html","body_markdown","score","upvote_count","downvote_count","is_accepted","created_at","last_activity_at","last_edited_at","locked_at","community_owned_at","owner","last_editor","bounty_awarded","recommended_by","posted_by_collectives","content_license","comment_count","comments"],"properties":{"id":{"type":"integer"},"url":{"type":["string","null"]},"share_url":{"type":["string","null"],"description":"Its short link (stackoverflow.com/a/<id>)."},"body_html":{"type":["string","null"]},"body_markdown":{"type":["string","null"]},"score":{"type":["integer","null"]},"upvote_count":{"type":["integer","null"]},"downvote_count":{"type":["integer","null"]},"is_accepted":{"type":["boolean","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"last_activity_at":{"type":["string","null"],"format":"date-time"},"last_edited_at":{"type":["string","null"],"format":"date-time"},"locked_at":{"type":["string","null"],"format":"date-time"},"community_owned_at":{"type":["string","null"],"format":"date-time"},"owner":{"$ref":"#/$defs/user"},"last_editor":{"$ref":"#/$defs/user"},"bounty_awarded":{"type":["object","null"],"description":"The bounty the answer won; null when it won none.","additionalProperties":false,"required":["amount","users"],"properties":{"amount":{"type":["integer","null"],"description":"Reputation won."},"users":{"type":"array","items":{"$ref":"#/$defs/user"},"description":"Who awarded it."}}},"recommended_by":{"type":"array","description":"The collectives that recommend the answer, and since when.","items":{"type":"object","additionalProperties":false,"required":["collective","recommended_at"],"properties":{"collective":{"$ref":"#/$defs/collective"},"recommended_at":{"type":["string","null"],"format":"date-time"}}}},"posted_by_collectives":{"type":"array","items":{"$ref":"#/$defs/collective"},"description":"The collectives the answer was posted for."},"content_license":{"type":["string","null"]},"comment_count":{"type":["integer","null"]},"comments":{"type":"array","items":{"$ref":"#/$defs/comment"}}}}},"comments":{"type":"array","items":{"$ref":"#/$defs/comment"},"description":"The question's own comments."},"source_url":{"type":"string","description":"The API call the question was read from."},"observed_at":{"type":"string","format":"date-time"}}},"price":{"credits_per_call":1,"description":"1 credit a call, one question whole with its answers and comments. A question gone and a failed call are free.","free":["failed"]},"deadline":{"default_s":30,"max_s":60},"errors":[{"code":"invalid_question","status":422,"detail":true,"message":"The value is neither a Stack Overflow question's id nor its link (or an answer's link)."},{"code":"question_gone","status":404,"message":"Stack Overflow has no such question, or no such answer, any more (deleted), or never had. Not charged."},{"code":"ip_blocked","status":503,"retryable":true,"retry_after":60,"message":"Stack Overflow's API refused the IPs tried for today. Retry later; failed calls are free."},{"code":"site_unavailable","status":503,"retryable":true,"message":"Stack Overflow's API did not answer properly; retry later (not charged)."},{"code":"unexpected_answer","status":424,"retryable":false,"message":"Stack Overflow's API answered in a shape we do not read yet; we are told and fix it (not charged)."}],"examples":[{"request":{"question":"https://stackoverflow.com/questions/10000001/how-do-i-set-a-timeout-on-an-httpx-request"},"records":[{"object":"question","id":10000001,"ids":{"question_id":10000001},"url":"https://stackoverflow.com/questions/10000001/how-do-i-set-a-timeout-on-an-httpx-request","share_url":"https://stackoverflow.com/q/10000001","title":"How do I set a timeout on an httpx request?","tags":["python","httpx"],"body_html":"<p>My request hangs forever when the server does not answer. How do I set a timeout?</p>\n","body_markdown":"My request hangs forever when the server does not answer. How do I set a timeout?","score":42,"upvote_count":43,"downvote_count":1,"favorite_count":0,"view_count":51200,"answer_count":1,"comment_count":1,"is_answered":true,"accepted_answer_id":10000002,"close_vote_count":0,"reopen_vote_count":0,"delete_vote_count":0,"created_at":"2024-03-14T09:26:53Z","last_activity_at":"2025-06-02T17:40:11Z","last_edited_at":"2024-03-14T10:02:31Z","owner":{"id":1000001,"account_id":2000001,"name":"Jane Doe","url":"https://stackoverflow.com/users/1000001/jane-doe","avatar_url":"https://www.gravatar.com/avatar/00000000000000000000000000000000?s=256&d=identicon&r=PG","type":"registered","reputation":1234,"accept_rate":80,"badges":{"gold":0,"silver":5,"bronze":12}},"last_editor":null,"closed":null,"locked_at":null,"protected_at":null,"community_owned_at":null,"bounty":null,"notice":null,"migrated_from":null,"migrated_to":null,"content_license":null,"answers":[{"id":10000002,"url":"https://stackoverflow.com/questions/10000001/how-do-i-set-a-timeout-on-an-httpx-request/10000002#10000002","share_url":"https://stackoverflow.com/a/10000002","body_html":"<p>Pass <code>timeout=10.0</code> to the client.</p>\n","body_markdown":"Pass `timeout=10.0` to the client.","score":57,"upvote_count":57,"downvote_count":0,"is_accepted":true,"created_at":"2024-03-14T09:41:07Z","last_activity_at":"2024-03-14T09:41:07Z","last_edited_at":null,"locked_at":null,"community_owned_at":null,"owner":{"id":1000003,"account_id":2000003,"name":"John Smith","url":"https://stackoverflow.com/users/1000003/john-smith","avatar_url":null,"type":"registered","reputation":48210,"accept_rate":null,"badges":{"gold":12,"silver":80,"bronze":120}},"last_editor":null,"bounty_awarded":null,"recommended_by":[],"posted_by_collectives":[],"content_license":"CC BY-SA 4.0","comment_count":0,"comments":[]}],"comments":[{"id":130000001,"url":"https://stackoverflow.com/questions/10000001/how-do-i-set-a-timeout-on-an-httpx-request#comment130000001_10000001","body_html":"Which version of httpx do you use?","body_markdown":"Which version of httpx do you use?","score":2,"is_edited":false,"created_at":"2024-03-14T09:30:12Z","owner":null,"reply_to_user":null,"content_license":"CC BY-SA 4.0"}],"source_url":"https://api.stackexchange.com/2.3/questions/10000001?site=stackoverflow&order=desc&sort=activity&filter=tvdphAWpCmQIKKbhPRIUXwhmqHNHrzzUDek3PwM4rHR","observed_at":"2026-12-02T12:00:00Z"}]}],"health":{"canaries":[{"from":"stackoverflow/questions/search","into":"question","min_records":1},{"question":"https://stackoverflow.com/q/11227809","min_records":1}],"required_fields":["id","url","title","tags","body_html","body_markdown","score","view_count","created_at"]},"changelog":[{"version":"1.0.1","date":"2026-12-02","notes":"Description only: says what stackoverflow/questions/search finds questions by."},{"version":"1.0.0","date":"2026-12-02","notes":"First version: one Stack Overflow question whole, from its id, its link, its short link or an answer's link: its text in HTML and Markdown, every answer and every comment, their votes, dates, authors and licences, why it is closed and what it repeats, its bounty, notice and migration."}],"object":"operation","id":"stackoverflow/questions/get","site":{"title":"Stack Overflow","domain":"stackoverflow.com","color":"#F48024"}}