Retrieve document elements and partitions from your sources via the GraphorLM REST API
Header | Value | Required |
---|---|---|
Authorization | Bearer YOUR_API_TOKEN | ✅ Yes |
Content-Type | application/json | ✅ Yes |
Parameter | Type | Required | Description |
---|---|---|---|
file_name | string | ✅ Yes | Name of the source file to retrieve elements from |
page | integer | ❌ No | Page number for pagination (starts from 1) |
page_size | integer | ❌ No | Number of elements to return per page |
filter | object | ❌ No | Filter criteria to refine element selection |
Parameter | Type | Description |
---|---|---|
type | string | Filter by specific element type (e.g., “Title”, “NarrativeText”, “Table”) |
page_numbers | array[integer] | Filter elements from specific page numbers |
elementsToRemove | array[string] | Exclude specific element types from results |
Field | Type | Description |
---|---|---|
items | array | Array of document elements in the current page |
total | integer | Total number of elements matching the filter |
page | integer | Current page number |
page_size | integer | Number of elements per page |
total_pages | integer | Total number of pages available |
Field | Type | Description |
---|---|---|
id | string|null | Element identifier (may be null) |
page_content | string | Text content of the element |
type | string | Always “Document” for this endpoint |
metadata | object | Rich metadata about the element |
Field | Type | Description |
---|---|---|
coordinates | object | Pixel coordinates and layout information |
filename | string | Original filename of the source document |
languages | array[string] | Detected languages in the element |
last_modified | string | ISO timestamp of last modification |
page_number | integer | Page number where element appears |
filetype | string | MIME type of the source file |
text_as_html | string | HTML representation of the element |
element_type | string | Type classification of the element |
element_id | string | Unique identifier for the element |
position | integer | Sequential position within the document |
bounding_box | object | Rectangular bounds of the element |
page_layout | object | Overall page dimensions |
Title
NarrativeText
ListItem
Table
Image
CodeSnippet
Footer
UncategorizedText
Status Code | Error Type | Description |
---|---|---|
400 | Bad Request | Invalid request payload or parameters |
401 | Unauthorized | Invalid or missing API token |
404 | Not Found | Specified file not found in project |
500 | Internal Server Error | Server-side error processing request |
Invalid File Name (404)
Invalid API Token (401)
Invalid Request (400)
Server Error (500)
text_as_html
field for rich formatting and structure preservationSlow response times
Empty results
Missing expected elements
Incorrect coordinates
Memory issues with large documents