# 2s.io Stack Overflow Search

> 2s.io Stack Overflow Search is a paid API for AI agents from 2s.io, paid per call via x402, $0.0036/call, status unknown (last checked 2026-09-16).

Search Stack Overflow questions by keyword and return ranked results with metadata including title, score, answer count, tags, and view count.

## Facts

- Endpoint: GET https://2s.io/api/dev/stackoverflow-search
- Price: $0.0036/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-stack-overflow-search-6fa54aaf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_z1MquIjVUOFhcAGe-JE-3

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-io-stack-overflow-search-6fa54aaf
```

Example prompt: Search Stack Overflow for the top 10 questions about async await deadlock in C#, sorted by votes, and show me the titles, scores, and whether they've been answered.

## When to prefer this

Use this endpoint when a coding agent needs to surface authoritative, community-vetted Q&A from Stack Overflow — especially for error messages, API usage questions, or language-specific patterns. Prefer this over general web search when the query is programming-specific and you want structured metadata (score, answer count, tags) rather than raw HTML. It requires no API key and charges only per call.

## Known failure modes

- Empty results if the query is too obscure or misspelled
- Rate limiting or quota exhaustion returning an error
- Query string too short (under 2 characters) or too long (over 200 characters) causing validation failure
- Network timeout if Stack Overflow upstream is slow
- Payment failure via x402 protocol if USDC balance is insufficient

## How this service works

Search Stack Overflow questions (keyless). Each result: title, link, score, answer count, answered flag, view count, tags, creation date, and question id. Sort by relevance, votes, activity, or creation. For coding agents that need authoritative Q&A on errors, APIs, and language features.

## Output

A list of up to 30 Stack Overflow questions, each containing: title, direct link, community score, answer count, answered flag, view count, associated tags, creation date, and question ID — ready for an agent to surface relevant threads or drill into specific answers.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "maxLength": 200,
       "minLength": 2,
       "description": "Search query, e.g. \"async await deadlock c#\"."
      },
      "sort": {
       "enum": [
        "relevance",
        "votes",
        "activity",
        "creation"
       ],
       "type": "string",
       "description": "Default relevance."
      },
      "limit": {
       "type": "integer",
       "maximum": 30,
       "minimum": 1
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-stack-overflow-search-6fa54aaf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
