API basics
Typemo has two HTTP APIs: the management API for collections, documents and settings, and the search API that answers searches. This page lists what they share and where they differ. To write data, start with Push over the API or Index your build.
Base URLs
Section titled “Base URLs”| API | Base URL | What it serves |
|---|---|---|
| Management | https://api.typemo.com/v1 | Collections, documents, synonyms, stopwords, custom results, boost rules, knowledge, analytics. |
| Search | https://search.typemo.com/v1 | Search, suggestions and analytics events. See Search API. |
| MCP | https://api.typemo.com/mcp | AI agents. See Connect an AI agent. |
Every endpoint, with its request and response schemas, is in the
API reference. Its OpenAPI document is at
https://api.typemo.com/v1/openapi.json.
Regions
Section titled “Regions”A project’s search runs in one region, chosen when the project is created. Project settings shows it as Search region. Moving a project to another region takes a migration by Typemo. The management API has one address for every region.
search.typemo.com reaches every region. When your project runs in another region than the one that
answers, the request gets a 307 redirect to your region’s address.
| Caller | What to do |
|---|---|
Your server, a script, curl | Follow the redirect. Most HTTP clients do; curl needs -L. |
| A browser | Call your region’s address directly. searchUrl in https://search.typemo.com/init/{key} names it. |
A browser sends Origin: null after a cross-site redirect, and no
allowed domains list admits it. The widget reads
searchUrl for this reason.
Authentication
Section titled “Authentication”Every request carries an API key from API keys. Keys start with sq_.
| How you send it | Management API | Search API | MCP |
|---|---|---|---|
X-API-Key: sq_… header | Yes | Yes | Yes |
Authorization: Bearer sq_… header | Yes | Yes | Yes |
?key=sq_… query parameter | No | Read only keys; a Write & Read key gets 401 | No: a Read only key goes at the end of the path |
| A sign-in (OAuth access token) | Yes | No | Yes |
When a request carries more than one, X-API-Key wins, then the Authorization header, then
?key=.
Key types
Section titled “Key types”| Key | It can | Where it belongs |
|---|---|---|
| Read only | Search, read suggestions, send analytics events, read synonyms, stopwords, custom results, boost rules and knowledge. | Browsers, apps, the widget: anywhere. |
| Write & Read | All of that, plus push and delete documents, change merchandising, read analytics, and call the AI assistant from a server. | Your server only. |
A key can also be limited to one collection; any other collection refuses it. Project settings and collection settings are never editable with a key. API keys has the full table.
A request from a browser carries an Origin header. The search API answers it only when the site is
on the project’s allowed domains. A request without an
Origin, from your server, needs the key alone.
Errors
Section titled “Errors”Every error has the same shape. param names the input at fault, when there is one:
{ "error": { "code": "BAD_REQUEST", "message": "sort: Expected \"field:asc\" or \"field:desc\"", "param": "sort" }}| Status | code | When |
|---|---|---|
400 | BAD_REQUEST | An input is missing, has the wrong type, or names a field the collection doesn’t have. |
400 | VALIDATION_FAILED | A document push holds an invalid document. Nothing is indexed, and report lists each document’s problem. |
401 | UNAUTHORIZED | No key, an unknown or revoked key, a Read only key on a write, or a Write & Read key in a URL. On the search API, also a key that can’t reach the collection. |
403 | FORBIDDEN | The browser’s site is not on the allowed domains, an IP or country rule blocks the caller, or a plan limit is reached. |
404 | NOT_FOUND | The collection or document doesn’t exist. On the management API, also a collection the key can’t reach. |
409 | CONFLICT | A sync or another import is writing to the collection. Retry shortly. |
413 | PAYLOAD_TOO_LARGE | A snapshot is over 50 MB unzipped. |
429 | RATE_LIMITED | Over the rate limit. Retry-After says how many seconds to wait. |
503 | SERVICE_UNAVAILABLE | The project’s search is unavailable. |
Rate limits
Section titled “Rate limits”The two APIs count differently and name their headers differently.
| API | What is counted | Headers |
|---|---|---|
| Search | Requests per minute from one IP address, per collection | X-RateLimit-Limit, X-RateLimit-Reset; on a 429, Retry-After |
| Management | Requests per caller (key, user or IP), per endpoint | RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset; on a 429, Retry-After |
X-RateLimit-Reset and RateLimit-Reset are Unix times in seconds. The search limit is the same for
every project, and a cached answer counts like any other: see
Rate limiting.
The management endpoints that write documents have their own limits:
| Endpoint | Limit |
|---|---|
POST /collections/{id}/documents (push) | 100 a minute |
POST /collections/{id}/documents/delete | 100 a minute |
GET /collections/{id}/documents/{documentId} | 200 a minute |
DELETE /collections/{id}/documents/{documentId} | 200 a minute |
PUT /collections/{id}/documents (replace every document) | 15 every 10 minutes |
POST /collections/{id}/source/sync | 5 every 10 minutes |
Paging
Section titled “Paging”| API | Parameters | Response |
|---|---|---|
| Management | page from 1, default 1; perPage 1–100, default 20 | { "data": [...], "page", "perPage", "total" } |
| Search | page from 1, default 1; perPage 1–100, default 10 | found is the total; hits holds the page |
Analytics lists add a meta object to the management shape.
Next: Search API to query a collection, or the TypeScript SDK to call both APIs from one client.