Factify API is currently in Beta.
import { Factify } from "@factify/sdk";
const factify = new Factify({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await factify.versions.getRecord({
versionId: "ver_01h2abcd1234efgh5678jkmnpt",
});
console.log(result);
}
run();{
"document": {
"layout": {
"bindings": [
{
"table": {
"column_widths_mm": [
123
]
},
"fragments": [
{
"bounding_box": {
"height": 123,
"width": 123,
"x": 123,
"y": 123
},
"page_number": 123,
"rotation_degrees": 123
}
],
"path": {
"segments": [
{
"block": 123
}
]
}
}
],
"defaults": {
"dimensions": {
"height_mm": 123,
"width_mm": 123
},
"margins": {
"bottom_mm": 123,
"left_mm": 123,
"right_mm": 123,
"top_mm": 123
}
},
"extracted_at": "2023-11-07T05:31:56Z",
"pages": [
{
"dimensions": {
"height_mm": 123,
"width_mm": 123
},
"page_number": 123
}
],
"record_id": "<string>",
"source": {
"attributes": {},
"ingested_at": "2023-11-07T05:31:56Z",
"remote_id": "<string>",
"source_id": "<string>"
}
},
"record": {
"blocks": [
{
"code_block": {
"code": "<string>",
"language": "<string>"
},
"attributes": {},
"id": "<string>"
}
],
"id": "<string>",
"metadata": {
"attributes": {},
"extracted_at": "2023-11-07T05:31:56Z",
"language": "<string>",
"title": "<string>"
},
"source": {
"attributes": {},
"ingested_at": "2023-11-07T05:31:56Z",
"remote_id": "<string>",
"source_id": "<string>"
}
}
},
"id": "019d3b1b-c4a7-7376-b6f9-229f44354d27",
"source_format": "<string>"
}Retrieves the processed content record for a given version. The content oneof is populated based on source_format: document formats (pdf, docx, markdown) populate the document field; spreadsheet formats (xlsx, csv) populate the spreadsheet field.
import { Factify } from "@factify/sdk";
const factify = new Factify({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await factify.versions.getRecord({
versionId: "ver_01h2abcd1234efgh5678jkmnpt",
});
console.log(result);
}
run();{
"document": {
"layout": {
"bindings": [
{
"table": {
"column_widths_mm": [
123
]
},
"fragments": [
{
"bounding_box": {
"height": 123,
"width": 123,
"x": 123,
"y": 123
},
"page_number": 123,
"rotation_degrees": 123
}
],
"path": {
"segments": [
{
"block": 123
}
]
}
}
],
"defaults": {
"dimensions": {
"height_mm": 123,
"width_mm": 123
},
"margins": {
"bottom_mm": 123,
"left_mm": 123,
"right_mm": 123,
"top_mm": 123
}
},
"extracted_at": "2023-11-07T05:31:56Z",
"pages": [
{
"dimensions": {
"height_mm": 123,
"width_mm": 123
},
"page_number": 123
}
],
"record_id": "<string>",
"source": {
"attributes": {},
"ingested_at": "2023-11-07T05:31:56Z",
"remote_id": "<string>",
"source_id": "<string>"
}
},
"record": {
"blocks": [
{
"code_block": {
"code": "<string>",
"language": "<string>"
},
"attributes": {},
"id": "<string>"
}
],
"id": "<string>",
"metadata": {
"attributes": {},
"extracted_at": "2023-11-07T05:31:56Z",
"language": "<string>",
"title": "<string>"
},
"source": {
"attributes": {},
"ingested_at": "2023-11-07T05:31:56Z",
"remote_id": "<string>",
"source_id": "<string>"
}
}
},
"id": "019d3b1b-c4a7-7376-b6f9-229f44354d27",
"source_format": "<string>"
}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.
Bearer authentication header of the form Bearer , where is your auth token.
Version ID to retrieve the record for. Pattern: ver_[0-9a-hjkmnp-tv-z]{26}
^ver_[0-9a-hjkmnp-tv-z]{26}$"ver_01h2abcd1234efgh5678jkmnpt"
Success
GetRecordResponse contains the processed content and layout for a version. The content oneof is populated based on source_format: