App Search
Captain App Search powers the search box inside an application or website: product search on a store, listing search on a marketplace, article search on a help center, or record search inside a SaaS product.
Captain File Search is a separate product for files and their contents. It uses collections, documents and chunks. App Search uses indexes and records.
Vocabulary
How a request finds its data
Each customer gets a dedicated deployment and a dedicated hostname, for example https://acme.captain.dev.
- The hostname selects the tenant.
- The path selects the index:
/v1/indexes/products/search. - The key grants access to that tenant’s indexes and operations.
Requests carry no tenant id, and there is no /tenants/... path. Two tenants may each have an index called products. A key issued for one tenant does not work against another tenant’s endpoint.
What Captain manages
Captain creates each tenant and its keys, and tunes ranking and index settings with the customer. The customer’s application creates indexes, keeps their records up to date, searches, and sends click and conversion events. Keys lists which key calls which operation.
Endpoint
Onboarding provides two things: the tenant endpoint, for example https://acme.captain.dev, and the keys for this tenant. The Quickstart creates a first index from there.
Every App Search route sits under that endpoint:
Keys
Captain issues every key at onboarding and keeps the admin key. Deleting indexes, changing ranking or index settings, and issuing or revoking keys go through Captain.
Which key calls which operation
A tenant’s keys work on every index in that tenant, including indexes created later. A key can also be limited to some indexes. A request for any other index returns 403, the same answer as for an index that does not exist.
Sending the key
Every endpoint takes its key the same way, as a bearer token in the Authorization header. Each endpoint’s reference page names the kind of key it needs.
curl
Python
TypeScript
A missing or unknown key returns 401. A key without access to the index or operation returns 403, and so does an index the key cannot see, whether or not that index exists.
Errors
Every error reply has the same shape: a machine code in error and a readable message.
Limits
Machine-readable guides
Each tenant publishes its own reference:
llms.txt is a short plain-text guide for coding assistants. Both reflect the version deployed on that tenant.