Skip to content

Introduction

The DataParse API provides a single endpoint for extracting structured data from documents and images using AI-powered parsing.

https://api.datapar.se

All API requests require authentication using an API key in the x-api-key header.

x-api-key: YOUR_API_KEY
  • Images: JPEG, PNG, WebP, GIF
  • Documents: PDF

Send a JSON object with a schema defining the data structure you want to extract and the files to process:

{
"schema": {
"type": "object",
"properties": {
"field_name": {
"type": "string",
"description": "Description of what this field represents"
}
}
},
"contents": [
{
"filename": "document.pdf",
"mimeType": "application/pdf",
"data": "base64_encoded_data"
}
]
}

Returns extracted data as JSON matching your provided schema:

{
"field_name": "extracted_value"
}
Terminal window
curl -X POST https://api.datapar.se/v1/ \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schema": {
"type": "object",
"properties": {
"vendor_name": {
"type": "string",
"description": "Name of the company or person who issued the invoice"
},
"total_amount": {
"type": "number",
"description": "Final amount due including all taxes and fees"
}
}
},
"contents": [{
"mimeType": "application/pdf",
"data": "base64_encoded_file_data"
}]
}'