curl --request POST \
--url https://extraction-api.nanonets.com/api/v2/extract/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "file://a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"extraction_config": {
"output_format": "json",
"json_options": [
"invoice_number",
"date",
"total",
"vendor"
]
}
}
'
{
"success": true,
"message": "<string>",
"record_id": "<string>",
"file_id": "<string>",
"config_id": "<string>",
"status": "completed",
"result": {
"content": "<string>",
"elements": [
{}
],
"overall_confidence": 50,
"page_confidence": {},
"confidence_source": "<string>"
},
"processing_time": 123,
"filename": "<string>",
"output_format": "<string>",
"file_size": 123
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Document Extraction
Synchronous Extraction
Extract structured data from a document synchronously as JSON or CSV.
Provide a file://<uuid> URI or public URL. Optionally specify fields to extract via json_options or reference a saved config.
Tip: You can save and reuse extraction settings by creating a config via Create Config. Pass the returned
config_idinstead of repeatingextraction_configeach time.
POST
/
api
/
v2
/
extract
/
sync
curl --request POST \
--url https://extraction-api.nanonets.com/api/v2/extract/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "file://a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"extraction_config": {
"output_format": "json",
"json_options": [
"invoice_number",
"date",
"total",
"vendor"
]
}
}
'
{
"success": true,
"message": "<string>",
"record_id": "<string>",
"file_id": "<string>",
"config_id": "<string>",
"status": "completed",
"result": {
"content": "<string>",
"elements": [
{}
],
"overall_confidence": 50,
"page_confidence": {},
"confidence_source": "<string>"
},
"processing_time": 123,
"filename": "<string>",
"output_format": "<string>",
"file_size": 123
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
API key as Bearer token: Authorization: Bearer YOUR_API_KEY
Body
application/json
Response
Extraction completed
Job ID for retrieving results
file://<uuid> reference
config://<uuid> reference
Available options:
completed, processing, failed Show child attributes
Show child attributes
Time in seconds
Size in bytes