Skip to main content

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​

Indexed document text and a continuation cursor, if more chunks remain.