POST
/v1/extract
Extract structured data from a document. Supports PDF, images, and scanned documents.
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | File | Yes | The document to extract data from |
| schema | String | No | Schema ID or name to use for extraction |
| fields | Array | No | Specific fields to extract (overrides schema) |
| language | String | No | Document language hint (ISO 639-1) |
Headers
| Header | Value |
|---|---|
| Authorization | Bearer YOUR_API_KEY |
| Content-Type | multipart/form-data |
Example Request
curl -X POST https://api.parse.conversiontools.io/v1/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@invoice.pdf" \
-F "schema=invoice"Response
{
"success": true,
"id": "ext_abc123",
"data": {
"vendor_name": "Acme Corp",
"invoice_number": "INV-2024-001",
"date": "2024-01-15",
"items": [
{
"description": "Consulting Services",
"quantity": 10,
"unit_price": 150.00,
"amount": 1500.00
}
],
"subtotal": 1500.00,
"tax": 150.00,
"total": 1650.00,
"currency": "USD"
},
"pages_used": 1,
"confidence": 0.95
}Error Responses
401 Unauthorized
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}429 Rate Limited
{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Monthly page limit exceeded",
"limit": 100,
"used": 100
}
}