PDF to JSON
POST /api/v1/documents/pdf-parser/jobs
Upload a PDF and get back structured JSON/CSV. Async: submit a job, then poll for the result.
Overview
Upload a PDF and get back structured JSON/CSV. Async: submit a job, then poll for the result.
POST /api/v1/documents/pdf-parser/jobs
Method: POST Path: /api/v1/documents/pdf-parser/jobs Category: Document Processing
Request Parameters
Endpoint Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
| file | file | Required | The PDF file to extract. |
| key_fields | string | Optional | Comma-separated list of fields to extract. |
Request Example
PDF to JSON Request Examples
curl -X POST "https://api.dataguru.cc/api/v1/documents/pdf-parser/jobs" \ -H "Authorization: Api-Key YOUR_API_KEY" \ -F "file=@/path/to/file.pdf" \ -F "key_fields=example"
Response Example
200 OK
Typical 200 OK JSON response structure with envelope metadata.
{ "...": "Fields returned by the data source", "_metadata": { "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e", "execution_time_ms": 842, "endpoint": "PDF to JSON", "mode": "live", "format": "json", "timestamp": "2026-01-01T12:00:00+00:00" } }
Asynchronous Requests
Long-running requests can be processed in the background. Add `?async=true` (or the `Prefer: respond-async` header) to receive a `job_id` immediately, then poll the job until its status is `COMPLETED`.
Async Workflow
curl -X POST "https://api.dataguru.cc/api/v1/documents/pdf-parser/jobs?async=true" \ -H "Authorization: Api-Key YOUR_API_KEY" # 202 Accepted { "success": true, "status": "SUBMITTED", "job_id": "0ca215ce-244f-4b28-b481-dc1b551983c8", "status_url": "/api/v1/jobs/0ca215ce-244f-4b28-b481-dc1b551983c8/" }
Pricing & Rate Limits
Endpoint Pricing
$0.02 / per request (USD)
Consumed per successful call: 1 request unit(s), 1 credit(s).
Endpoint Rate Limits
Common Errors
Common HTTP Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | A required parameter is missing or malformed. |
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 402 | INSUFFICIENT_BALANCE | Your balance cannot cover this request. |
| 403 | ENDPOINT_DISABLED | This endpoint is currently unavailable. |
| 405 | METHOD_NOT_ALLOWED | The endpoint was called with the wrong HTTP method. |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests. See the Retry-After header. |
| 502 | PROVIDER_ERROR | The upstream data source failed. Retry with exponential backoff. |
Interactive Test Console
Upload a document directly to test this parsing endpoint and view real-time polling results.