TextSearch/ api docs

Getting started

Every /api/v1/* endpoint requires an API key. Request one by contacting the operator. Pass it via either header:

Authorization: Bearer ts_live_<your-key>
# or
X-API-Key: ts_live_<your-key>

Public keys are scoped to search:read + pages:read. That covers full-text search and reading any archived page.

Rate limits

Each key has a per-minute and per-day request budget (configurable; defaults 60/min, 10 000/day). When exceeded, the API returns 429 with a Retry-After header.

Endpoints

GET/api/v1/searchscope: search:read

Full-text search across the indexed pages. Returns up to 50 hits per page.

curl "https://textsearch.net/api/v1/search?q=example&page=1&limit=20" \
  -H "Authorization: Bearer ts_live_..."

Query params: q (required), page, limit, domain (filter)

GET/api/v1/pages/:idscope: pages:read

Metadata for an indexed page.

curl "https://textsearch.net/api/v1/pages/<id>" -H "X-API-Key: ts_live_..."
GET/api/v1/pages/:id/textscope: pages:read

Extracted plain text of the archived page (decompressed from storage).

GET/api/v1/pages/:id/htmlscope: pages:read

The cached HTML at scrape time (decompressed).

GET/api/v1/pages/:id/screenshotscope: pages:read

AVIF screenshot of the page at scrape time.

Errors

Every error returns a JSON body with at least error:

{"error":"missing_api_key","message":"..."}
{"error":"missing_scope","required":["search:read"]}
{"error":"rate_limited","scope":"min"}   // also sets Retry-After
{"error":"key_revoked"}
{"error":"not_found"}