API reference
The Shoof AI API is a JSON API over HTTPS. Every endpoint belongs to an app, under:
https://api.shoofai.co/v1/apps/{appId}Authentication
Section titled “Authentication”Send an API key in the x-shoof-api-key header:
curl https://api.shoofai.co/v1/apps/my-store/search \ -H "x-shoof-api-key: shf_pub_…" \ -H "content-type: application/json" \ -d '{ "q": "jacket" }'Authorization: Bearer shf_pub_… works too. For clients that can’t set headers
(EventSource, navigator.sendBeacon), search endpoints also take the key in
an apiKey query parameter. Admin keys are never accepted there.
| Endpoints | Accept |
|---|---|
| Search, autocomplete, facet value search, answers, recommendations, events, config | Search, secured and admin keys |
| Records, reindex, status, settings, synonyms, rules | Admin keys only |
A missing or unknown key, or a key for another app, gets 401 unauthorized. A
search key on an admin endpoint gets 403 forbidden. See API keys.
Requests and responses
Section titled “Requests and responses”- Bodies are JSON (
content-type: application/json). An empty body is the same as{}. - Unknown fields are ignored. Fields with the wrong type, or out of range, get a
400 bad_requestthat lists each problem. - Dates are ISO 8601 strings in UTC, such as
2026-10-19T08:00:00Z. - Search endpoints answer any origin (CORS), so browsers can call them directly.
Errors
Section titled “Errors”Errors have a status code and a body like this:
{ "error": { "code": "bad_request", "message": "Invalid request", "details": [{ "path": "hitsPerPage", "message": "Must be 100 or less" }] }}code is stable and meant for your code; message is for people and may
change. See Errors for every code.
Rate limits
Section titled “Rate limits”Limits are per minute, per app:
| Who | Limit |
|---|---|
| Each visitor (by IP address) on search endpoints | 600 requests |
| All admin-key requests to the app, together | 300 requests |
Each visitor also has two limits that stop a script from spending the
workspace’s monthly quota in minutes: 10 AI answers a minute and 60 an hour,
and 600 searches an hour that count toward the quota (typing, paging and
filtering one search counts once). A server searching with an admin key and
x-shoof-client-ip gets them for each visitor it names.
Over the limit, requests get 429 rate_limited until the next minute starts.
Servers that search for visitors with the admin key should name each visitor in
x-shoof-client-ip, so they get a visitor’s limit instead of sharing the admin
one; see Searching from your server.
To stay well within the admin limit when indexing, send records in batches of a few hundred rather than one at a time.
Size limits
Section titled “Size limits”| Request | Limit |
|---|---|
| A search or answer | 64 KB |
| A multi-search | 256 KB, up to 10 searches |
| An events batch | 128 KB, up to 100 events |
| A records batch | 10 MB, up to 500 upserts and 1,000 deletes |
| Settings | 256 KB |
| Rules | 1 MB |
| Synonyms | 2 MB |
Bigger bodies get 413 payload_too_large.
Versioning
Section titled “Versioning”The API is versioned in the path (/v1). Write clients that ignore response
fields they don’t know, so new fields don’t break them.
Client libraries
Section titled “Client libraries”- JavaScript and TypeScript:
@shoof/js-client. - WordPress: the Shoof AI Search plugin.
- Anything else: the OpenAPI spec generates clients for most languages.