This repository contains production-ready cURL examples for extracting structured data from documents using the Parserdata API.
The examples demonstrate both prompt-based and schema-based extraction workflows.
No SDKs required.
- A Parserdata API key
- curl installed
- A document (PDF, image) or a publicly accessible file URL
All requests require the X-API-Key header:
-H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.parserdata.com/v1/extract" \
-H "X-API-Key: YOUR_API_KEY" \
-F 'prompt=Extract invoice number, date, supplier, total amount.' \
-F 'file=@invoice.pdf'
curl --location "https://api.parserdata.com/v1/extract" \
--header "X-API-Key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"file_url": "https://example.com/invoice.pdf",
"schema": {
"invoice_number": "string",
"date": "date",
"supplier_name": "string",
"total_amount": "number",
"line_items": "table"
}
}'
You can also run the examples from the examples/ folder:
examples/prompt-based-file-upload.shexamples/schema-based-file-url.sh
MIT