Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

parserdata/parserdata-curl-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

curl Parserdata API

Parserdata + cURL: Document Data Extraction

Overview

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.


Official ParserData pages


Prerequisites

  • A Parserdata API key
  • curl installed
  • A document (PDF, image) or a publicly accessible file URL

Authentication

All requests require the X-API-Key header:

-H "X-API-Key: YOUR_API_KEY"

Example 1: Prompt-based extraction (file upload)

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'

Example 2: Schema-based extraction (JSON + file_url)

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"
 }
 }'

Examples

You can also run the examples from the examples/ folder:

  • examples/prompt-based-file-upload.sh
  • examples/schema-based-file-url.sh

License

MIT


Need help or a custom setup?

This repository is a reference example.

If you need help tailoring it to your workflow, or want advice on a more advanced Parserdata API integration (custom schemas, scale, or production use), reach out to us: support@parserdata.com

About

Parserdata API cURL examples for document data extraction

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /