Skip to content

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

  • columnsstringoptional
  • filestringoptional
  • instructionstringoptional

    Up to 1000000 characters.

  • schemastringoptional
  • strictnessstringoptional
    Allowed values
    strictbalancedflexible
  • textstringoptional

    Up to 1000000 characters.

Returns

200application/json

  • batch_idstringoptional
  • confidencenumberRequirednullable
  • creditsintegerRequired

    At least 0.

  • duration_msnumberRequirednullable
  • fail_countnumberRequired
  • file_typestringoptionalnullable
    Allowed values
    text_pdfscannedimagetextdocumentunknown
  • filesarray of objectsRequired
  • resultobjectoptional
  • statusstringRequired
  • success_countnumberRequired
  • table_idstringRequired
  • total_rowsnumberRequired

Errors

  • 402api_request_limit_exceededcredit_limit_exceededfeature_not_availablefile_count_plan_limitfile_size_plan_limittable_plan_limit
  • 404not_found
  • 422extraction_unprocessableunprocessable_entity
  • 500captcha_unavailableextraction_failedinternal_server_error
  • 503extraction_unavailableservice_unavailable
Errors every endpoint can return
Requestbash
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'
Responsejson
{  "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

  • columnsstringoptional
  • filestringoptional
  • instructionstringoptional

    Up to 1000000 characters.

  • schemastringoptional
  • strictnessstringoptional
    Allowed values
    strictbalancedflexible
  • textstringoptional

    Up to 1000000 characters.

Returns

200text/event-stream

Errors

  • 402api_request_limit_exceededcredit_limit_exceededfeature_not_availablefile_count_plan_limitfile_size_plan_limittable_plan_limit
  • 404not_found
  • 422extraction_unprocessableunprocessable_entity
  • 500captcha_unavailableextraction_failedinternal_server_error
  • 503extraction_unavailableservice_unavailable
Errors every endpoint can return
Requestbash
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'
Responsetext
string

Extract into table (JSON response)

POST/v1/projects/{project_id}/tables/{table_id}/extract

Requiresextract:write

Path parameters

  • project_idstringRequired
  • table_idstringRequired

Request body

multipart/form-dataapplication/x-www-form-urlencoded

  • filestringoptional
  • textstringoptional

    Up to 1000000 characters.

Returns

200application/json

  • batch_idstringoptional
  • confidencenumberRequirednullable
  • creditsintegerRequired

    At least 0.

  • duration_msnumberRequirednullable
  • fail_countnumberRequired
  • file_typestringoptionalnullable
    Allowed values
    text_pdfscannedimagetextdocumentunknown
  • filesarray of objectsRequired
  • resultobjectoptional
  • statusstringRequired
  • success_countnumberRequired
  • table_idstringRequired
  • total_rowsnumberRequired

Errors

  • 402api_request_limit_exceededcredit_limit_exceededfeature_not_availablefile_count_plan_limitfile_size_plan_limitrow_plan_limit
  • 404not_foundtable_not_found
  • 410table_soft_deleted
  • 422extraction_unprocessableunprocessable_entity
  • 500captcha_unavailableextraction_failedinternal_server_error
  • 503extraction_unavailableservice_unavailable
Errors every endpoint can return
Requestbash
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'
Responsejson
{  "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_idstringRequired
  • table_idstringRequired

Request body

multipart/form-dataapplication/x-www-form-urlencoded

  • filestringoptional
  • textstringoptional

    Up to 1000000 characters.

Returns

200text/event-stream

Errors

  • 402api_request_limit_exceededcredit_limit_exceededfeature_not_availablefile_count_plan_limitfile_size_plan_limitrow_plan_limit
  • 404not_foundtable_not_found
  • 410table_soft_deleted
  • 422extraction_unprocessableunprocessable_entity
  • 500captcha_unavailableextraction_failedinternal_server_error
  • 503extraction_unavailableservice_unavailable
Errors every endpoint can return
Requestbash
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'
Responsetext
string