ParsePrime API Documentation

Extract tables from PDFs and images into structured CSV data.

Base URL: https://api.parseprime.com

Introduction

The ParsePrime API lets you extract tables from PDF documents and images (PNG, JPG, WEBP) into downloadable CSV files. Upload a file, poll for results, and download your structured data.

Credits System

ParsePrime uses a credit-based system. Each page costs 6 credits. New accounts receive 20 free credits on signup. Purchase additional credit packages when needed.

Rate Limiting

Most endpoints are rate-limited. When exceeded, you'll receive a 429 response with {"error": "Too many requests. Please try again later."}

Authentication

Most endpoints require a JWT Bearer token. Include it in the Authorization header:

Authorization: Bearer eyJhbGciOi...

Obtain tokens via the Login endpoint. Refresh expired tokens via Refresh Token. API keys can also be used for programmatic access (requires credits).

Data Handling & Privacy

ParsePrime processes data in accordance with the EU General Data Protection Regulation (GDPR). The data controller is TAGonSoft SRL, Iași, Romania.

File Processing & Retention

Account Data

Sub-processors

Your Rights (GDPR)

You have the right to access, correct, delete, restrict, or port your personal data. To exercise these rights, contact [email protected]. We respond within 30 days.

For the full privacy policy, visit parseprime.com/privacy.html.

Security

Auth

POST /api/register Create a new account
Public

Creates a new user account and initializes a credit balance with 20 free signup credits.

Request Body
{
  "email": "[email protected]",
  "password": "securepass123"
}
FieldTypeDescription
emailstring requiredValid email address
passwordstring requiredMinimum 8 characters
Response (201 Created)
{
  "message": "Account created successfully.",
  "user": {
    "email": "[email protected]"
  },
  "token": "eyJhbGciOiJSUzI1NiIs...",
  "refresh_token": "abc123def456...",
  "expires_in": 3600
}
Errors
  • 400 Registration failed. Please check your input.
  • 409 An account with this email already exists.
  • 429 Too many requests.
cURL Example
curl -X POST https://api.parseprime.com/api/register \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","password":"securepass123"}'
POST /api/login Get JWT tokens
Public
Request Body
{
  "email": "[email protected]",
  "password": "securepass123"
}
Response (200 OK)
{
  "token": "eyJhbGciOiJSUzI1NiIs...",
  "refresh_token": "abc123def456...",
  "expires_in": 3600
}
Errors
  • 401 Invalid credentials.
  • 429 Too many requests.
cURL Example
curl -X POST https://api.parseprime.com/api/login \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","password":"securepass123"}'
POST /api/token/refresh Refresh an expired JWT
Public

Refresh tokens are single-use. The old token is revoked and a new pair is issued.

Request Body
{
  "refresh_token": "abc123def456..."
}
Response (200 OK)
{
  "token": "eyJhbGciOiJSUzI1NiIs...",
  "refresh_token": "new_refresh_token...",
  "expires_in": 3600
}
Errors
  • 401 Invalid or expired refresh token.
cURL Example
curl -X POST https://api.parseprime.com/api/token/refresh \
  -H "Content-Type: application/json" \
  -d '{"refresh_token":"abc123def456..."}'
POST /api/logout Invalidate refresh token
Requires Auth
Request Body
{
  "refresh_token": "abc123def456..."
}
Response (200 OK)
{
  "message": "Logged out successfully."
}
cURL Example
curl -X POST https://api.parseprime.com/api/logout \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"refresh_token":"abc123def456..."}'

Extraction

POST /api/extract Upload files for table extraction
Requires Auth

Upload a single file as file or multiple files as files[] (max 10, requires credits). Accepted formats: PDF, PNG, JPG, WEBP. File content is validated against magic bytes. Credits are checked before processing: each page costs 6 credits.

Request (multipart/form-data)
FieldTypeDescription
filefileSingle file upload
files[]file[]Batch upload (max 10, requires credits)
Response (202 Accepted)
{
  "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "pending",
  "total_files": 1,
  "poll_url": "/api/extract/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Errors
  • 400 No file uploaded / Unsupported file type / File content does not match declared type / Max 10 files per batch
  • 403 Batch upload requires credits / Not enough credits
  • 429 Too many requests.
cURL Example (single file)
curl -X POST https://api.parseprime.com/api/extract \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "[email protected]"
cURL Example (batch)
curl -X POST https://api.parseprime.com/api/extract \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "files[][email protected]" \
  -F "files[][email protected]"
GET /api/extract/{jobId} Poll extraction job status
Requires Auth

Returns the current status of an extraction job. You can only access your own jobs.

ParameterTypeDescription
jobIdstring (UUID) requiredThe job ID from the extract response
Response (200 OK)
{
  "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "done",
  "total_files": 1,
  "completed_files": 1,
  "results": [
    {
      "file": "document.pdf",
      "status": "completed",
      "tables_found": 2,
      "downloads": [
        {
          "table_id": "uuid",
          "table_name": "Table 1",
          "download_url": "/api/download/uuid?sig=...&exp=..."
        }
      ],
      "error": null
    }
  ]
}
Job Statuses
StatusDescription
pendingJob created, waiting to be processed
processingCurrently extracting tables
doneAll files processed successfully
failedProcessing failed
Errors
  • 400 Invalid job ID.
  • 404 Job not found.
cURL Example
curl https://api.parseprime.com/api/extract/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer YOUR_TOKEN"
GET /api/download/{uuid} Download extracted CSV
Signed URL

Download links are signed and time-limited. Use the URLs from the job results directly.

ParameterTypeDescription
uuidstring (UUID) requiredFile identifier
sigstring (query) requiredHMAC signature
expinteger (query) requiredExpiration timestamp
Response (200 OK)

Binary CSV file with Content-Disposition: attachment and Content-Type: text/csv

Errors
  • 400 Invalid download link.
  • 403 Invalid signature.
  • 404 File not found or has been cleaned up.