# 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.

Documentation: https://openany.si/market/apis/stackoverflow/search-stack-overflow-questions-by-tag/
API ID: 0e45d7ed-e94c-4166-b90a-14aef37a8f41
Provider: treg
Contract revision: 3
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/treg/call/crawl4ai.stackoverflow.search.questions
Page update time: 2026-12-03T01:54:36.854Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: application/json
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.00015 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T01:54:36.854Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "150",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Stack Overflow Question Search API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    },
    "body": {
      "additionalProperties": false,
      "properties": {
        "limit": {
          "description": "default 20",
          "maximum": 100,
          "minimum": 1,
          "type": "integer"
        },
        "sort": {
          "description": "default activity",
          "enum": [
            "activity",
            "votes",
            "creation",
            "hot",
            "week",
            "month"
          ],
          "type": "string"
        },
        "tag": {
          "description": "",
          "example": "rust",
          "type": "string"
        }
      },
      "required": [
        "tag"
      ],
      "type": "object",
      "description": "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.\nUsage limits: Tag-based question discovery, not full answers. Up to 100 questions. Preserve source URLs, author attribution and the applicable CC BY-SA license.\nDraft retail price: USD 0.000150/successful call, equal to the TREG catalog rate; no markup."
    }
  },
  "required": [
    "path",
    "query",
    "headers",
    "body"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "meta": {
      "type": "object",
      "properties": {
        "blocked": {
          "type": "array",
          "items": {}
        },
        "elapsed_ms": {
          "type": "integer"
        },
        "from_cache": {
          "type": "boolean"
        },
        "llm_calls": {
          "type": "integer"
        },
        "pages_fetched": {
          "type": "integer"
        },
        "partial": {
          "type": "boolean"
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "recipe": {
      "type": "string"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "answered": {
            "type": "boolean"
          },
          "answers": {
            "type": "integer"
          },
          "author": {
            "type": "string"
          },
          "created": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "score": {
            "type": "integer"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "text": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "views": {
            "type": "integer"
          }
        }
      }
    },
    "usage": {
      "type": "object",
      "properties": {
        "boxes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "cache": {
          "type": "string"
        },
        "engine": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "about": {
                "type": "string"
              },
              "boxes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "cache": {
                "type": "string"
              },
              "call": {
                "type": "string"
              },
              "engine": {
                "type": "string"
              },
              "units": {
                "type": "integer"
              },
              "attempts": {
                "type": "integer"
              },
              "proxy": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          }
        },
        "units": {
          "type": "integer"
        }
      }
    },
    "version": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Third-party reference · Testnet 2026-11-04: success (abridged)
```bash
curl \
  '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"
}'
```

## Response example
Historical third-party reference. It may differ from the current provider response; verify the original contract before use.
Third-party response reference · Documented HTTP 200
```json
{
  "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 &lt; 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
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
