Integrate the public search API
Create a key under Settings → API keys. Copy it immediately: only its prefix and keyed hash remain afterward.
Request
curl --request POST \
'https://search.example.com/api/v1/search/v1/<project-public-id>/products' \
--header 'Authorization: Bearer <search-key>' \
--header 'Content-Type: application/json' \
--data '{
"q": "keyboard",
"filter": [{"field":"in_stock","operator":"eq","value":true}],
"sort": [{"field":"price","direction":"asc"}],
"facets": ["category"],
"page": 1,
"perPage": 10
}'
The endpoint is POST /api/v1/search/v1/:projectPublicId/:indexSlug.
Response contract
The response contains hits, found, page, perPage, facets, and requestMs. Each hit contains id, the allowed document fields, and highlights.
Bounds
- Query length: 512 characters.
- Page size: 100 records.
- Result window: 10,000 records.
- Filter, sort, and facet fields must have matching collection capabilities.
- Unknown properties and raw Typesense parameters are rejected.
- Invalid/revoked keys return
401; rate limiting returns429andRetry-After.
Treat browser-side keys as revocable public credentials. Never use the Typesense administrative key in a browser or mobile client.