API reference
Extract
Extract rows from a file or text, as one JSON response or a stream of server-sent events.
Extract data from text or file (JSON response)
POST/v1/projects/{project_id}/extract
Requiresextract:write
Path parameters
project_idstringRequired
Request body
multipart/form-dataapplication/x-www-form-urlencoded
columnsstringoptionalfilestringoptionalinstructionstringoptionalUp to 1000000 characters.
schemastringoptionalstrictnessstringoptional- Allowed values
strictbalancedflexible
textstringoptionalUp to 1000000 characters.
Returns
200application/json
batch_idstringoptionalconfidencenumberRequirednullablecreditsintegerRequiredAt least 0.
duration_msnumberRequirednullablefail_countnumberRequiredfile_typestringoptionalnullable- Allowed values
text_pdfscannedimagetextdocumentunknown
filesarray of objectsRequiredconfidencenumberoptionalnullableerroranyoptionalnullablefile_nameanyoptionalnullablerowsnumberoptionalnullablestatusstringoptional
resultobjectoptionalstatusstringRequiredsuccess_countnumberRequiredtable_idstringRequiredtotal_rowsnumberRequired
Errors
- 402
api_request_limit_exceededcredit_limit_exceededfeature_not_availablefile_count_plan_limitfile_size_plan_limittable_plan_limit - 404
not_found - 422
extraction_unprocessableunprocessable_entity - 500
captcha_unavailableextraction_failedinternal_server_error - 503
extraction_unavailableservice_unavailable
curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/extract' \ -H 'Authorization: ApiKey {your_api_key}' \ -F 'columns=string' \ -F 'file=@./document.pdf' \ -F 'instruction=string' \ -F 'schema=string' \ -F 'strictness=strict' \ -F 'text=string'{ "batch_id": "string", "confidence": 0, "credits": 0, "duration_ms": 0, "fail_count": 0, "file_type": "text_pdf", "files": [ { "confidence": 0, "error": null, "file_name": null, "rows": 0, "status": "string" } ], "result": {}, "status": "string", "success_count": 0, "table_id": "string", "total_rows": 0}Extract data from text or file (SSE stream)
POST/v1/projects/{project_id}/extract-stream
Requiresextract:write
Path parameters
project_idstringRequired
Request body
multipart/form-dataapplication/x-www-form-urlencoded
columnsstringoptionalfilestringoptionalinstructionstringoptionalUp to 1000000 characters.
schemastringoptionalstrictnessstringoptional- Allowed values
strictbalancedflexible
textstringoptionalUp to 1000000 characters.
Returns
200text/event-stream
Errors
- 402
api_request_limit_exceededcredit_limit_exceededfeature_not_availablefile_count_plan_limitfile_size_plan_limittable_plan_limit - 404
not_found - 422
extraction_unprocessableunprocessable_entity - 500
captcha_unavailableextraction_failedinternal_server_error - 503
extraction_unavailableservice_unavailable
curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/extract-stream' \ -H 'Authorization: ApiKey {your_api_key}' \ -F 'columns=string' \ -F 'file=@./document.pdf' \ -F 'instruction=string' \ -F 'schema=string' \ -F 'strictness=strict' \ -F 'text=string'stringExtract into table (JSON response)
POST/v1/projects/{project_id}/tables/{table_id}/extract
Requiresextract:write
Path parameters
project_idstringRequiredtable_idstringRequired
Request body
multipart/form-dataapplication/x-www-form-urlencoded
filestringoptionaltextstringoptionalUp to 1000000 characters.
Returns
200application/json
batch_idstringoptionalconfidencenumberRequirednullablecreditsintegerRequiredAt least 0.
duration_msnumberRequirednullablefail_countnumberRequiredfile_typestringoptionalnullable- Allowed values
text_pdfscannedimagetextdocumentunknown
filesarray of objectsRequiredconfidencenumberoptionalnullableerroranyoptionalnullablefile_nameanyoptionalnullablerowsnumberoptionalnullablestatusstringoptional
resultobjectoptionalstatusstringRequiredsuccess_countnumberRequiredtable_idstringRequiredtotal_rowsnumberRequired
Errors
- 402
api_request_limit_exceededcredit_limit_exceededfeature_not_availablefile_count_plan_limitfile_size_plan_limitrow_plan_limit - 404
not_foundtable_not_found - 410
table_soft_deleted - 422
extraction_unprocessableunprocessable_entity - 500
captcha_unavailableextraction_failedinternal_server_error - 503
extraction_unavailableservice_unavailable
curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/extract' \ -H 'Authorization: ApiKey {your_api_key}' \ -F 'file=@./document.pdf' \ -F 'text=string'{ "batch_id": "string", "confidence": 0, "credits": 0, "duration_ms": 0, "fail_count": 0, "file_type": "text_pdf", "files": [ { "confidence": 0, "error": null, "file_name": null, "rows": 0, "status": "string" } ], "result": {}, "status": "string", "success_count": 0, "table_id": "string", "total_rows": 0}Extract into table (SSE stream)
POST/v1/projects/{project_id}/tables/{table_id}/extract-stream
Requiresextract:write
Path parameters
project_idstringRequiredtable_idstringRequired
Request body
multipart/form-dataapplication/x-www-form-urlencoded
filestringoptionaltextstringoptionalUp to 1000000 characters.
Returns
200text/event-stream
Errors
- 402
api_request_limit_exceededcredit_limit_exceededfeature_not_availablefile_count_plan_limitfile_size_plan_limitrow_plan_limit - 404
not_foundtable_not_found - 410
table_soft_deleted - 422
extraction_unprocessableunprocessable_entity - 500
captcha_unavailableextraction_failedinternal_server_error - 503
extraction_unavailableservice_unavailable
curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/extract-stream' \ -H 'Authorization: ApiKey {your_api_key}' \ -F 'file=@./document.pdf' \ -F 'text=string'string