Search Stack Overflow and StackExchange sites via x402 micropayment for $0.005 per query.
What it does
The Scout Stack Overflow endpoint (`/scout/stackoverflow`) lets AI agents and applications search Stack Overflow and other StackExchange sites for Q&A content, paying $0.005 per call in USDC on Base via the x402 protocol. It returns questions with scores, answer counts, view counts, tags, and whether an accepted answer exists.
The endpoint accepts a required query string parameter `q` along with optional parameters for pagination (`per_page`, 1–50, default 10), sort order (`relevance`, `votes`, `activity`, `creation`), and target StackExchange site (defaults to `stackoverflow` but can be changed to any StackExchange community). This is one endpoint within the broader Scout multi-source intelligence API, which covers 19+ platforms including GitHub, Hacker News, arXiv, npm, PyPI, Reddit, X/Twitter, and more.
Payment is handled via the x402 protocol — the endpoint returns HTTP 402 with a payment challenge that x402-compatible clients resolve automatically. Alternative access methods include a broker API (with a free API key providing $0.05 credit), an MCP server at mcp.hugen.tokyo, and a Python SDK (`pip install x402-pay`) for one-line access without wallet integration.
Capabilities
Use cases
- —AI agents looking up programming solutions and best practices from Stack Overflow
- —Automated research pipelines that need community-vetted answers to technical questions
- —Building developer tools that surface relevant Q&A alongside code suggestions
- —Comparing community sentiment and solutions across StackExchange sites for a given topic
- —Feeding Stack Overflow context into LLM prompts for grounded code generation
Fit
Best for
- —AI agents needing pay-per-query access to Stack Overflow without API key management
- —Multi-source research workflows that combine SO results with other Scout endpoints
- —Quick programmatic lookups of highly-voted answers on specific programming topics
Not for
- —Bulk data extraction or archival of Stack Overflow content
- —Use cases requiring full answer body text (endpoint returns question metadata, not full answers)
- —Free-tier usage — every call costs $0.005 in USDC
Quick start
pip install x402-pay
import x402_pay
result = x402_pay.get(
'https://scout.hugen.tokyo/scout/stackoverflow?q=async+await&sort=votes&per_page=5'
)
print(result.json())Example
Request
{
"url": "https://scout.hugen.tokyo/scout/stackoverflow?q=async+await&sort=votes&per_page=5&site=stackoverflow",
"method": "GET"
}Response
{
"count": 1,
"query": "async await",
"source": "stackoverflow",
"results": [
{
"score": 1250,
"title": "How to use async/await in JavaScript",
"answers": 8,
"accepted": true
}
]
}Endpoint
Quality
Full OpenAPI schema with clear parameter definitions and a live 402 challenge confirming the endpoint works. The sample response in the challenge is minimal (only one result shown) and no dedicated docs page exists, but the schema and pricing are well-documented. Response body schema is inferred from the challenge sample rather than formally specified.
Warnings
- —No dedicated documentation page found (/docs, /api, /pricing all return 404)
- —Response schema is inferred from the x402 challenge sample — actual response fields may differ
- —Full answer body text availability is unconfirmed; the sample only shows question-level metadata
Citations
- —Endpoint searches Stack Overflow and other StackExchange sites for Q&A, returning questions with score, answers, views, and tagshttps://scout.hugen.tokyo
- —Payment required is $0.005 USDC per call via x402 on Basehttps://scout.hugen.tokyo/scout/stackoverflow
- —Scout API covers 19+ platforms including Reddit, Hacker News, GitHub, Stack Overflow, arXiv, npm, PyPI, X/Twitter, YouTube, and morehttps://scout.hugen.tokyo
- —Alternative access via broker API, MCP server, and Python SDK (x402-pay)https://scout.hugen.tokyo/scout/stackoverflow