Get indexed document text
GET/api/v2/projects/:slug/documents/:document_id/
Read a document's complete indexed text without contacting the original
source site. First search with source_types=all and copy a result's
document_id. This returns text chunks in reading order with available
page or worksheet references, not a live page or an original binary file.
Responses contain up to limit chunks (default 20, maximum 20). When
next_cursor is not null, repeat the request using that cursor and the
same document_id and limit. Continue until next_cursor is null.
References and cursors are scoped to the project and its active index.
After an index refresh or a 404, search again for a current reference.
Existing project access, allowed-domain, trial and interaction-limit checks apply. Each successful read counts as a search interaction and does not create a chat. Older repository or OpenAPI indexes and older uploaded files with backticks in their names may require a recrawl (409).
Required permission: search (private projects only).
Request
Responses
- 200
- 400
- 403
- 404
- 409
- 500
Indexed document text and a continuation cursor, if more chunks remain.
Invalid cursor, changed pagination limit, or invalid query parameters. Parameter validation errors are keyed by field name.
Project access, permission, domain, trial or interaction-limit check failed.
Project or document unavailable, including stale references and references from another project. Search again for a current document ID.
Recrawl this source to enable complete document retrieval, then search again.
Document retrieval is temporarily unavailable. Retry later.