Stack Overflow Question Search API
Search Stack Overflow questions by tag via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Treg, pass parameters such as limit, sort, tag, and retrieve structured data including question title, source question URL, question score, answer count, and upstream answered flag to map developer pain points, prioritize support documentation, and build a source-linked research queue.
- Selected price
- $0.00015 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- 1Selected implementation · last 30 days
- Success rate · 30d
- 100.00%Selected implementation · last 30 days
Stack Overflow Question Search API
Prepare your request, then continue with your agent.
Selected price
$0.00015 / call
- Provider
- Pricing
On this page
Overview
Stack Overflow Question Search API
Send tag with a supported sort value and a limit of up to 100 questions. Each row includes the question URL, score, answer count and a question-text excerpt capped at 300 characters.
Quick Facts
| Fact | Value |
|---|---|
| Platform | stackoverflow |
| Access Methods | REST / OpenAny MCP |
| Pricing Model | Pay per call; see Selected price |
| Authentication | OpenAny API key |
| Core Inputs | tag; optional sort and limit |
| Selected Implementation | TREG |
| Available Providers | TREG |
| Returned Data | Question title; Source question URL; Question score; Answer count; Upstream answered flag; Question excerpt, up to 300 characters |
What You Can Build with the Stack Overflow Question Search API
- Map developer pain points: Group tagged questions by topic using titles and excerpts.
- Prioritize support documentation: Review highly scored questions to identify recurring explanations.
- Build a source-linked research queue: Keep question URLs and author metadata for later reading.
Pass returned records to a downstream Agent for organization, comparison or reporting; additional data retrieval is a separate operation.
Stack Overflow Question Search API Returned Data Fields & Response Coverage
text contains at most 300 characters of the question, and answers is a count rather than answer content. answered is an upstream indicator, not the accepted answer's text.
| Field | Meaning |
|---|---|
rows[].title |
Question title |
rows[].url |
Source question URL |
rows[].score |
Question score |
rows[].answers |
Answer count |
rows[].answered |
Upstream answered flag |
rows[].text |
Question excerpt, up to 300 characters |
Quick Start: Call the Stack Overflow Question Search API via REST
- Configure OPENANY_API_KEY securely in your local environment and select TREG.
- The example returns one Python-tagged question sorted by votes; replace tag, sort and limit as needed.
- Check Selected price before running the command; execution sends a real request under the current contract.
curl --request POST \
"https://api.openany.si/v1/agent-apis/treg/call/crawl4ai.stackoverflow.search.questions" \
--header "Authorization: Bearer ${OPENANY_API_KEY}" \
--header 'Content-Type: application/json' \
--data '{"limit":1,"sort":"votes","tag":"python"}'
Understanding Response Examples
| Example | Provenance and scope |
|---|---|
| Third-party reference · Testnet excerpt | Excerpt of a historical third-party testnet response, showing fields and structure. |
Use the documented request as a calling template; consult the public API contract and the actual response for fields and status.
Connect AI Agents via OpenAny MCP
Connect to https://mcp.openany.si, discover with search_apis, then read the current contract and api_version with get_api. Use run_api only after approval of inputs, price and call count; keep the key in secure client configuration.
Agent prompt: Find high-voted Python questions on Stack Overflow, limit ten. Read the TREG contract and current price, request execution approval, then return titles, scores, answer counts, source links and labeled question excerpts.
Pricing & Billing Rules
- No subscription; check the selected implementation’s contract and Selected price for the current amount and unit.
- Browsing, preparing inputs and viewing examples do not execute the API; curl and run_api do.
- Extra pages, retries and chained requests are separate executions; review their billing and spending limit first.
Frequently Asked Questions
Playground
Run sends a real API request. Charges follow the published API contract.
Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
tregCurrent Stack Overflow Question Search API · POST · View API reference | $0.00015 / call | 1 | 100.00%successP501.11s |
- Unit price
- $0.00015
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 3. Price update time: not supplied.
Total $0.015
API
- Method
- POST
- Endpoint
https://api.openany.si/v1/agent-apis/treg/call/crawl4ai.stackoverflow.search.questions- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
tag | JSON request bodybody | string | Yes | |
limit | JSON request bodybody | integer | No | default 20 minimum: 1 · maximum: 100 |
sort | JSON request bodybody | string | No | default activity enum: "activity", "votes", "creation", "hot", "week", "month" |
Required markers inside a nested object or variant apply when that object or variant is used.
Response structure
metaobjectblockedunknown[]elapsed_msintegerfrom_cachebooleanllm_callsintegerpages_fetchedintegerpartialbooleanwarningsstring[]
recipestringrowsobject[]answeredbooleananswersintegerauthorstringcreatedstringidintegerscoreintegertagsstring[]textstringtitlestringurlstringviewsinteger
usageobjectboxesstring[]cachestringenginestringlinesobject[]aboutstringboxesstring[]cachestringcallstringenginestringunitsintegerattemptsintegerproxystringurlstring
unitsinteger
versioninteger
Agent integration
Copy the resource contract without sharing an API key.
Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Third-party reference · Testnet 2026-11-04: success (abridged)
Historical third-party reference. It may differ from the current provider response; verify the original contract before use.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 1
Review these request fields before running. Keep the published provider and request method unchanged.
body- Questions on Stack Overflow with a tag, from the Stack Exchange API: title, link, score, answer count, views, whether an answer is accepted, time, tags, author, id and the first 300 characters of the question. `sort` is activity, votes, creation, hot, week or month; `limit` up to 100 in one call. Usage limits: Tag-based question discovery, not full answers. Up to 100 questions. Preserve source URLs, author attribution and the applicable CC BY-SA license. Draft retail price: USD 0.000150/successful call, equal to the TREG catalog rate; no markup.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/treg/call/crawl4ai.stackoverflow.search.questions' \ -X POST \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json' \ --data-raw '{ "limit": 1, "sort": "votes", "tag": "python" }'Check the response
Third-party response reference · Documented HTTP 200
Third-party response reference{ "meta": { "blocked": [], "elapsed_ms": 195, "from_cache": false, "llm_calls": 0, "pages_fetched": 1, "partial": false, "warnings": [ "module: stackoverflow-questions: [python] votes · 1 questions · API quota left 299" ] }, "recipe": "stackoverflow-questions", "rows": [ { "answered": true, "answers": 51, "author": "Alex. S.", "created": "2008-10-23T22:21:11Z", "id": 231767, "score": 13137, "tags": [ "python", "iterator", "generator", "yield" ], "text": "What functionality does the yield keyword in Python provide? For example, I'm trying to understand this code1: def _get_child_candidates(self, distance, min_dist, max_dist): if self._leftchild and distance - max_dist < self._median: yield self._leftchild if self._rightchild and distance + max_dis …", "title": "What does the \"yield\" keyword do in Python?", "url": "https://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do-in-python", "views": 3502969 } ], "usage": { "boxes": [ "gate", "recipe" ], "cache": "miss", "engine": "recipe", "lines": [ { "about": "the call", "boxes": [ "gate" ], "cache": "miss", "call": "recipes", "engine": "gate", "units": 1 }, { "attempts": 1, "cache": "api", "call": "scrape", "engine": "api", "proxy": "isp", "units": 1, "url": "https://api.stackexchange.com/…" } ], "units": 2 }, "version": 1 }