Integrate PDFData's powerful document extraction capabilities directly into your applications
The PDFData API enables you to programmatically upload, process, and retrieve data extracted from PDF documents. Whether you're building a document management system, automating invoice processing, or extracting data from resumes, our API provides a simple and powerful interface to integrate AI-powered PDF data extraction into your workflow.
RESTful API with clear endpoints and responses
Extract data from PDFs in seconds
API key authentication with rate limiting
The PDFData API uses API keys to authenticate requests. You can obtain your API key from your dashboard after signing up.
Include your API key in the Authorization header of your requests:
Authorization: Bearer YOUR_API_KEY
To ensure fair usage and system stability, the PDFData API enforces rate limiting:
Each API key is limited to 100 requests per minute. If you exceed this limit, you will receive a 429 Too Many Requests response.
Retrieve a list of all documents associated with your account.
{
"Items": [
{
"ID": "a90b7e0f-4a9f-489a-8e3e-e235e2afae90",
"UserID": "63400612-0c2e-44d3-94e2-95f2b406eeb9",
"Filename": "receipt_demo.pdf",
"Type": "receipt",
"Pages": 1,
"Size": 14700,
"ExtractedData": {
"Taxes": "$1.12",
"Subtotal": "$19.00",
"Line_Items": [
{
"Quantity": 1,
"Item_Name": "Subscription",
"Total_Price": "$19.00",
"Price_Per_Unit": "$19.00"
}
],
"Store_Name": "Example, LLC",
"Receipt_Date": "March 25, 2024",
"Total_Amount": "$20.12",
"Store_Address": "123 Fake Street, New York City, NY 10012",
"Payment_Method": "ACH super long super long super long super long super long"
},
"Status": 2,
"Metadata": null,
"UploadDate": "2025-11-14T22:34:10Z"
},
{
"ID": "6708ffc4-8e5f-47ab-8c5d-1b16f156acca",
"UserID": "63400612-0c2e-44d3-94e2-95f2b406eeb9",
"Filename": "receipt-875996645.pdf",
"Type": "receipt",
"Pages": 1,
"Size": 42100,
"ExtractedData": {
"Line_Items": [],
"Store_Name": "Not Provided",
"Total_Amount": "USD$156.74",
"Store_Address": "Not Provided",
"Payment_Method": "VISA",
"Receipt_Date_Time": "09/26/2025 09:31:30"
},
"Status": 2,
"Metadata": null,
"UploadDate": "2025-11-14T22:30:17Z"
}
]
}
Upload a new PDF document for processing and data extraction.
| Parameter | Type | Required | Description |
|---|---|---|---|
pdf |
File | Yes | The PDF file to upload |
doc_type |
String | Yes | Document type (e.g., "receipt", "invoice", "resume") |
fields |
String | No | Comma-separated list of fields to extract (optional) |
{
"ID": "a90b7e0f-4a9f-489a-8e3e-e235e2afae90",
"UserID": "63400612-0c2e-44d3-94e2-95f2b406eeb9",
"Filename": "receipt_demo.pdf",
"Type": "receipt",
"Size": 14700,
"Pages": 0,
"Status": 2,
"ExtractedData": {
"Taxes": "$1.12",
"Subtotal": "$19.00",
"Line_Items": [
{
"Quantity": 1,
"Item_Name": "Subscription",
"Total_Price": "$19.00",
"Price_Per_Unit": "$19.00"
}
],
"Store_Name": "Example, LLC",
"Receipt_Date": "March 25, 2024",
"Total_Amount": "$20.12",
"Store_Address": "123 Fake Street, New York City, NY 10012",
"Payment_Method": "ACH super long super long super long super long super long"
},
"UploadDate": "2025-11-14T22:34:10Z"
}
Retrieve a specific document by its unique ID.
| Parameter | Type | Description |
|---|---|---|
id |
UUID | The unique identifier of the document |
{
"ID": "a90b7e0f-4a9f-489a-8e3e-e235e2afae90",
"UserID": "63400612-0c2e-44d3-94e2-95f2b406eeb9",
"Filename": "receipt_demo.pdf",
"Type": "receipt",
"Size": 14700,
"Pages": 0,
"Status": 2,
"ExtractedData": {
"Taxes": "$1.12",
"Subtotal": "$19.00",
"Line_Items": [
{
"Quantity": 1,
"Item_Name": "Subscription",
"Total_Price": "$19.00",
"Price_Per_Unit": "$19.00"
}
],
"Store_Name": "Example, LLC",
"Receipt_Date": "March 25, 2024",
"Total_Amount": "$20.12",
"Store_Address": "123 Fake Street, New York City, NY 10012",
"Payment_Method": "ACH super long super long super long super long super long"
},
"UploadDate": "2025-11-14T22:34:10Z"
}
The document object contains the following fields:
| Field | Type | Description |
|---|---|---|
ID |
UUID | Unique document identifier |
UserID |
UUID | User identifier who uploaded the document |
Filename |
String | Original filename of the uploaded document |
Type |
String | Document type (e.g., receipt, invoice, resume) |
Size |
Integer | File size in bytes |
Pages |
Integer | Number of pages in the document |
Status |
Integer | Processing status (1: processing, 2: completed, 3: failed) |
ExtractedData |
Object | Extracted data from the document (structure varies by document type) |
Metadata |
Object | Additional metadata (optional) |
UploadDate |
DateTime | ISO 8601 formatted upload timestamp |
Below are examples of how to upload a document using the PDFData API in various programming languages:
curl -L 'http://localhost:8084/v1/documents' \
-H 'Authorization: Bearer 7f8495ed9dbe4fe20d906a97c599906ad340d77c0b5f4d1eb0ba1ebc5137' \
-F 'pdf=@"/C:/Users/timka/Downloads/receipt_demo.pdf"' \
-F 'doc_type="receipt"' \
-F 'fields=""'
<?php
$apiKey = '7f8495ed9dbe4fe20d906a97c599906ad340d77c0b5f4d1eb0ba1ebc5137';
$apiUrl = 'http://localhost:8084/v1/documents';
$filePath = '/path/to/receipt_demo.pdf';
$ch = curl_init();
$postFields = [
'pdf' => new CURLFile($filePath),
'doc_type' => 'receipt',
'fields' => ''
];
curl_setopt_array($ch, [
CURLOPT_URL => $apiUrl,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $postFields,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey
]
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($response === false) {
echo 'Error: ' . curl_error($ch);
} else {
echo "HTTP Code: $httpCode\n";
echo "Response: $response\n";
}
curl_close($ch);
?>
const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');
const apiKey = '7f8495ed9dbe4fe20d906a97c599906ad340d77c0b5f4d1eb0ba1ebc5137';
const apiUrl = 'http://localhost:8084/v1/documents';
const filePath = '/path/to/receipt_demo.pdf';
const formData = new FormData();
formData.append('pdf', fs.createReadStream(filePath));
formData.append('doc_type', 'receipt');
formData.append('fields', '');
axios.post(apiUrl, formData, {
headers: {
'Authorization': `Bearer ${apiKey}`,
...formData.getHeaders()
}
})
.then(response => {
console.log('Status:', response.status);
console.log('Response:', response.data);
})
.catch(error => {
console.error('Error:', error.message);
if (error.response) {
console.error('Response:', error.response.data);
}
});
package main
import (
"bytes"
"fmt"
"io"
"mime/multipart"
"net/http"
"os"
)
func main() {
apiKey := "7f8495ed9dbe4fe20d906a97c599906ad340d77c0b5f4d1eb0ba1ebc5137"
apiURL := "http://localhost:8084/v1/documents"
filePath := "/path/to/receipt_demo.pdf"
// Open the file
file, err := os.Open(filePath)
if err != nil {
fmt.Println("Error opening file:", err)
return
}
defer file.Close()
// Create a buffer to write our multipart form data
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
// Add the PDF file
part, err := writer.CreateFormFile("pdf", filePath)
if err != nil {
fmt.Println("Error creating form file:", err)
return
}
_, err = io.Copy(part, file)
if err != nil {
fmt.Println("Error copying file:", err)
return
}
// Add other form fields
writer.WriteField("doc_type", "receipt")
writer.WriteField("fields", "")
// Close the writer
err = writer.Close()
if err != nil {
fmt.Println("Error closing writer:", err)
return
}
// Create the request
req, err := http.NewRequest("POST", apiURL, body)
if err != nil {
fmt.Println("Error creating request:", err)
return
}
// Set headers
req.Header.Set("Authorization", "Bearer "+apiKey)
req.Header.Set("Content-Type", writer.FormDataContentType())
// Send the request
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error sending request:", err)
return
}
defer resp.Body.Close()
// Read the response
respBody, err := io.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response:", err)
return
}
fmt.Println("Status:", resp.Status)
fmt.Println("Response:", string(respBody))
}
Sign up now to get your API key and start extracting data from PDFs programmatically.