element_id, element_type, text, markdown, html, img_base64 (optional), position, page_number, bounding_box, page_layout, and more.
Endpoint overview
HTTP Method
GET
Endpoint URL
Authentication
This endpoint requires authentication using an API token. Include your API token as a Bearer token in theAuthorization header.
Learn how to create and manage API tokens in the API Tokens guide.
Request format
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer YOUR_API_TOKEN | Yes |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file_id | string | Yes | Unique identifier of the source |
page | integer | No | 1-based page number. Use with page_size to enable pagination |
page_size | integer | No | Number of elements per page (1–100). Use with page |
suppress_img_base64 | boolean | No | When true, img_base64 is omitted from each element (reduces payload size) |
type | string | No | Filter by element type (e.g. NarrativeText, Title, Table) |
page_numbers | list of integers | No | Restrict to specific page numbers (repeat param for multiple: ?page_numbers=1&page_numbers=2) |
elementsToRemove | list of strings | No | Element types to exclude (repeat param for multiple) |
page and page_size are omitted, all elements are returned (no pagination). When only one is provided, pagination is not applied.
Response format
Success response (200 OK)
Paginated response with items asBuildStatusElement (same shape as elements in Get build status):
Pagination fields
| Field | Type | Description |
|---|---|---|
items | array | Elements in the current page (or all elements if pagination not used) |
total | integer | Total number of elements (matching filters) |
page | integer | null | Current page (1-based), or null when no pagination |
page_size | integer | null | Elements per page, or null when no pagination |
total_pages | integer | null | Total pages, or null when no pagination |
Element fields (BuildStatusElement)
| Field | Type | Description |
|---|---|---|
element_id | string | null | Unique identifier for the element |
element_type | string | null | Type: e.g. Title, NarrativeText, Table, Image |
text | string | Plain text content |
markdown | string | null | Markdown representation when available |
html | string | null | HTML representation when available |
img_base64 | string | null | Base64-encoded image data (omitted when suppress_img_base64=true) |
position | integer | null | Order/position within the document |
page_number | integer | null | Page number (1-based) where the element appears |
bounding_box | object | null | Bounding box (e.g. left, top, width, height) when available |
page_layout | object | null | Page dimensions (width, height) when available |
page_annotation | string | null | Annotation/summary for the page |
page_keywords | array | null | Keywords extracted for the page |
page_topics | array | null | Topics extracted for the page |
metadata | object | Additional metadata |
Element types
| Type | Description |
|---|---|
Title | Document and section titles |
NarrativeText | Main body paragraphs |
ListItem | Bullet or numbered list items |
Table | Data tables |
TableRow | Rows within tables |
Image | Pictures or graphics |
Header | Header content |
Footer | Footer content |
Formula | Mathematical formulas |
FigureCaption | Captions for figures |
PageNumber | Page numbering |
CodeSnippet | Code segments |
Link | Hyperlinks |
UncategorizedText | Text that doesn’t fit other categories |
Code examples
JavaScript/Node.js
Python
cURL
Error responses
| Status code | Description |
|---|---|
400 | Invalid input (e.g. missing file_id) |
404 | Source file not found |
500 | Internal server error while loading elements |
Best practices
- Use
file_id: Obtain it from List sources or Get build status after ingestion. - Reduce payload: Set
suppress_img_base64=truewhen you don’t need image data. - Filter server-side: Use
type,page_numbers, andelementsToRemoveto limit results. - Pagination: Use
pageandpage_size(max 100) for large documents to avoid large responses.
Next steps
Get build status
Poll build status and optionally get elements for an async ingestion
List sources
List all sources and their
file_idsUpload sources
Ingest files, URLs, GitHub, or YouTube (async)
Reprocess source
Re-process a source with a different partition method (async)

