const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.factify.com/v1/documents/{document_id}/content', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"version_id": "ver_01h2xcejqtf2nbrexx3vqjhp41",
"source_type": "pdf",
"document": {},
"spreadsheet": {},
"layout": {}
}Get extracted content
Returns the extracted text and structured content for the
document’s current version. Returns 409 Conflict while
ingestion is still in progress; poll getDocument and check
processing_status == "ready" before fetching content.
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.factify.com/v1/documents/{document_id}/content', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"version_id": "ver_01h2xcejqtf2nbrexx3vqjhp41",
"source_type": "pdf",
"document": {},
"spreadsheet": {},
"layout": {}
}Documentation Index
Fetch the complete documentation index at: https://developers.factify.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Bearer authentication using a factapi-issued API key
(ffy_<env>_<base32_uuid><base62_random>). Cookie-based
sessions are accepted automatically by user-facing endpoints
but are not surfaced as an OpenAPI auth scheme.
Path Parameters
Document ID
"doc_01h2xcejqtf2nbrexx3vqjhp41"
Response
OK
Extracted text and structured content for a document version. The
document, spreadsheet, and layout fields are mutually exclusive
— exactly one is populated based on source_type. Only available
once the version reaches ready status.
ID of the version this content was extracted from.
"ver_01h2xcejqtf2nbrexx3vqjhp41"
Origin format of the version, controls which content field is
populated. pdf/docx/markdown populate document;
xlsx/csv populate spreadsheet.
"pdf"
Document-format content (PDF/DOCX/Markdown). Free-form structured object — schema depends on the extractor version.
Spreadsheet-format content (XLSX/CSV). Free-form structured object — schema depends on the extractor version.
Optional per-page layout metadata (bounding boxes, reading order). Present when the extractor produced layout output.