Docs
Sign inStart free

Search API

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.

POST /v1/search/query$0.001 / querysynchronousopen as text

Build Search into your product

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.

Get a key

01Quickstart

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.

submit · cURL
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"}'

02Authentication

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 header
Authorization: Bearer $STELQ_KEY

03Parameters

FieldTypeNotes
queryrequiredstringThe search query. Or send queries (an array of strings) for a batched multi-query search.
limitintegerResults to return, 1–50 (default 10). Values over 50 are clamped — an X-Result-Limit-Applied header reports the value used.
search_modeenumOne of auto, web, news, academic (default auto).
freshness_daysintegerOnly results from the last N days. Omit or 0 for no recency filter.
preferred_domainsstring[]Bias results toward these domains.
excluded_domainsstring[]Drop results from these domains.
request body · JSON
{
  "query": "best ai search infra 2026",
  "limit": 10,
  "search_mode": "auto"
}

04Response

A successful call returns JSON with the result inline.

200 · OK
{
  "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"
    }
  ]
}

05Errors

StatusMeaning
400Invalid request — a field is missing or malformed (the body says which).
401Missing or invalid API key.
402Insufficient balance — top up credits to continue.
429Rate limited — back off and retry after the Retry-After header.
502Upstream temporarily unavailable — safe to retry; not charged.

06Rate limits

Up to 50 requests/second per key. 429 with a Retry-After header when exceeded.