Projects

Get indexed document text

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).

Each successful pagination request counts separately toward your team's interaction allowance. With extra usage enabled, interactions beyond that allowance cost $0.05 each. See extra usage.

Required permission: search (private projects only).

get/api/v2/projects/{slug}/documents/{document_id}/

Request

  • Base URL: https://app.biel.ai
  • URL: https://app.biel.ai/api/v2/projects/{slug}/documents/{document_id}/
  • Auth: one of:
    • API key in header Authorization
    • none

Path parameters

slugstring required

Project slug identifier.

document_idstring required

Opaque document reference returned by an all-content search. URL-encode it as a path segment.

Query parameters

cursorstring

Copy next_cursor from the previous response. Omit for the first request.

limitinteger

Number of chunks per response. Keep the same value when continuing with a cursor.

urlstring

Origin URL from which the read was initiated, required when allowed domains are configured.

Response

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

document_idstring required

The document reference supplied in the request.

titlestring required

Indexed document title or filename.

source_type'page' | 'file' | 'repository' | 'openapi' required
urlstring uri nullable required

Source page URL, or null for file, repository and OpenAPI sources.

file_pathstring required

Repository-relative file path when available, otherwise blank.

total_chunksinteger required

Total indexed chunks in the document, across all response pages.

next_cursorstring nullable required

Opaque continuation cursor. Repeat with the same document_id and limit until this value is null.

Changes

No recorded changes to this operation across all 1 revision of this API.