API Documentation

Parse 1040 documents programmatically with our simple REST API.

Authentication
All API requests require an API key

Include your API key in the Authorization header:

curl -X POST https://1040parser.com/api/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf"

Get your API key from the Dashboard.

POST /api/extract
Parse a 1040 document and extract structured data

Request

Content-Type: multipart/form-data

ParameterTypeDescription
fileFilePDF, PNG, JPG, or WebP (max 4.5MB)

Example Request

curl -X POST https://1040parser.com/api/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@1040-return.pdf"

Example Response

{
  "success": true,
  "docType": "1040",
  "siteName": "1040 Parser",
  "data": {
    "tax_year": 2025,
    "filing_status": "single",
    "taxpayer_name": "John Smith",
    "wages": 85000,
    "interest_income": 1250,
    "dividend_income": 3500,
    "total_income": 89750,
    "adjusted_gross_income": 87250,
    "taxable_income": 73050,
    "total_tax": 11892,
    "payments": 14500,
    "refund_amount": 2608
  },
  "confidence": 0.95,
  "processingTimeMs": 2340
}
POST /api/extract/batch
Parse multiple documents at once

Request

Content-Type: multipart/form-data

ParameterTypeDescription
filesFile[]Multiple files (max 20) or a ZIP archive (max 100 files)

Example Response

{
  "success": true,
  "docType": "1040",
  "totalFiles": 5,
  "successful": 4,
  "failed": 1,
  "results": [
    {
      "filename": "1040-return.pdf",
      "success": true,
      "data": {
        "...": "..."
      },
      "confidence": 0.95,
      "processingTimeMs": 2100
    },
    {
      "filename": "corrupted.pdf",
      "success": false,
      "error": "Could not parse PDF"
    }
  ],
  "totalProcessingTimeMs": 8500
}

Batch processing runs files in parallel (10 at a time) for faster throughput. ZIP files are automatically extracted.

Response Codes
CodeDescription
200Success - document parsed
400Bad request - invalid file or missing parameters
401Unauthorized - invalid or missing API key
402Payment required - no credits remaining
429Rate limit exceeded - wait and retry
500Server error - extraction failed
Rate Limits
  • Demo (unauthenticated): 5 requests per minute
  • Authenticated users: 60 requests per minute
  • Enterprise: Contact us for higher limits

Rate limit headers are included in responses: X-RateLimit-Remaining and Retry-After

Ready to get started?