Live web search on every request — never cached, never stale. Send a query, get back ranked results with titles, URLs and snippets. Synchronous: one request, one response.
Copy one work order and paste it into Claude Code, Cursor, or any coding agent — it finds the right place in your codebase and wires STELQ Search in, so your users get grounded, cited answers at runtime. Every payload references $STELQ_KEY from your environment, never a live secret.
One request to POST /v1/search/query. Set $STELQ_KEY in your environment and run this as-is — it is generated from the live contract, not transcribed.
curl -X POST https://api.stelq.com/v1/search/query \
-H "Authorization: Bearer $STELQ_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"best ai search infra 2026","limit":10,"search_mode":"auto"}'Every request carries a bearer token in the Authorization header. Copied agent payloads reference the $STELQ_KEY environment variable, so set it in your agent's environment rather than pasting a live secret into a prompt or a chat log.
Authorization: Bearer $STELQ_KEY
| Field | Type | Notes |
|---|---|---|
| queryrequired | string | The search query. Or send queries (an array of strings) for a batched multi-query search. |
| limit | integer | Results to return, 1–50 (default 10). Values over 50 are clamped — an X-Result-Limit-Applied header reports the value used. |
| search_mode | enum | One of auto, web, news, academic (default auto). |
| freshness_days | integer | Only results from the last N days. Omit or 0 for no recency filter. |
| preferred_domains | string[] | Bias results toward these domains. |
| excluded_domains | string[] | Drop results from these domains. |
{
"query": "best ai search infra 2026",
"limit": 10,
"search_mode": "auto"
}A successful call returns JSON with the result inline.
{
"query": "best ai search infra 2026",
"count": 10,
"results": [
{
"title": "Building AI-native search in 2026",
"url": "https://example.com/ai-search",
"snippet": "An overview of live-index search infrastructure…",
"published": "2026-05-31"
}
]
}| Status | Meaning |
|---|---|
| 400 | Invalid request — a field is missing or malformed (the body says which). |
| 401 | Missing or invalid API key. |
| 402 | Insufficient balance — top up credits to continue. |
| 429 | Rate limited — back off and retry after the Retry-After header. |
| 502 | Upstream temporarily unavailable — safe to retry; not charged. |
Up to 50 requests/second per key. 429 with a Retry-After header when exceeded.