Stack Overflow: Get a question
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.
curl https://api.lobstr.io/v2/run \ -H "Authorization: Bearer $LOBSTR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "source": "stackoverflow", "operation": "questions/get", "options": { "question": "https://stackoverflow.com/questions/10000001/how-do-i-set-a-timeout-on-an-httpx-request" } }'
An example answer, from the contract. Run it on your own input with your API key.
{ "object": "run", "id": "run_6wsgkng3tqnk4kf4mievj6kk5q", "livemode": true, "source": "stackoverflow", "operation": "questions/get", "version": "1.0.1", "schema_url": "https://api.lobstr.io/v2/catalog/stackoverflow/questions/get", "options": { "question": "https://stackoverflow.com/questions/10000001/how-do-i-set-a-timeout-on-an-httpx-request" }, "fields": null, "status": "succeeded", "count": 1, "has_more": false, "next": null, "cost": { "credits": 1 }, "results": [ { "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" } ] }
47 fields per question
Every call returns them for each record, in the results of its JSON answer.
Get a question
47 fields- object
- text
- question
- id
- number
- The question's id on Stack Overflow, as in its address.
- 10,000,001
- ids.question_id
- number
- 10,000,001
- url
- link
- The question's page.
- stackoverflow.com/questions/10000001/how-do-i-set-a-timeout-on-an-httpx-request
What it costs
Billed by the call: 1 credit. Pick how many calls a month.
1 credit a call
Calls a month
100
Built to run
Every call counts; a day is green at 95% successful.
- Successful calls
- 100.00%
- Median call
- 2.2 s
A call fails when the site does not answer or we cannot read its answer; a wrong input is not counted.
Frequently asked questions
What people ask before calling stackoverflow/questions/get.
Get a question
When do I use it?
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.
What do I give it?
question(required): 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).
What does it return?
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. Every record has the same fields, empty ones included: they are all listed above.
Can I run it on a list?
Yes: call it once per item, or run it as a batch, on a list and every day if you like, from the button at the top of this page.
Pricing
What does a call cost?
1 credit a call, one question whole with its answers and comments. A question gone and a failed call are free.
When is a call free?
- a call that fails
Errors
What can go wrong?
invalid_question(422): The value is neither a Stack Overflow question's id nor its link (or an answer's link).question_gone(404): Stack Overflow has no such question, or no such answer, any more (deleted), or never had. Not charged.ip_blocked(503, retry): Stack Overflow's API refused the IPs tried for today. Retry later; failed calls are free.site_unavailable(503, retry): Stack Overflow's API did not answer properly; retry later (not charged).unexpected_answer(424): Stack Overflow's API answered in a shape we do not read yet; we are told and fix it (not charged).
How long can a call take?
30 seconds at most by default, up to 60 with timeout_s. A call past it answers timeout (408), is not charged, and can be sent again.
API and agents
Can my AI agent run it?
Yes: connect the lobstr.io MCP server (https://api.lobstr.io/v2/mcp, your API key as a Bearer token); its run_operation tool runs stackoverflow/questions/get. Its page for agents, in Markdown: stackoverflow/questions/get.md.
Where is its full description?
The contract, as JSON: https://api.lobstr.io/v2/catalog/stackoverflow/questions/get: every option, every field, the price and the errors. This page is drawn from it.
Ready to call it?
An API key in a minute, then the call above, from your code or your agent.