File Search API
Captain File Search retrieves source chunks from indexed files. Use v3 for new applications. It has cleaner response fields, explicit include controls, document inspection, chunk metadata, and graph relations.
v2 remains available for existing clients. It keeps search_results and content so older code does not break.
Query With v3
See the v3 Query endpoint for the full request and response schema.
Response Shape
v3 returns results, and each result uses text for chunk text.
Use Advanced Search & Relations for metadata filters, chunk custom_metadata, region data, relations, and relation-aware queries.
Documents and Chunks
Use document and chunk endpoints when your application needs stable source objects outside the search response:
- Get Document: inspect a document and its chunks.
- List Chunks: page through chunks in a document.
- Get Chunk: fetch one chunk by ID.
These endpoints are useful for citations, review flows, and source-grounded UI state.
v2 Compatibility
Existing v2 clients should continue using v2 Query. v2 keeps the old field names:
Do not document v3 behavior as v2 behavior. v2 does not return v3 fields such as results, text, custom_metadata, relations, or related_chunks.