Api Endpoint

Extract data from a document

Extract data from a document. Extract named fields from a document as JSON: give a PDF, Word, Excel or PowerPoint file, a scan or a photo (PNG, JPEG, WebP) by URL or in a POST body (up to 10 MB; images 3 MB) and the field names you want, such as invoice_number, total, due_date. An AI model reads the file, scans by OCR, and returns one JSON object, with null where a value is not stated. Use to turn invoices, receipts, orders and contracts into rows.

Open interactive test console

Offering

Provider
agent-data-tools.revmesh2074.workers.dev
Method
GET
Offering type
Api Endpoint
Transport type
http
Category
Other
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://agent-data-tools.revmesh2074.workers.dev/document/extract
MIME type
application/json
First seen
2026-11-16T17:21:36.500Z
Last seen
Tags
invoice-parser, document-extraction, pdf-to-json, invoice-ocr, data-extraction

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.03 USDC
Atomic price: 30000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Payment option 2
0.03 USDC
Atomic price: 30000 · Network: eip155:137 · Asset: USDC · Scheme: exact
Payment option 3
0.03 USDC
Atomic price: 30000 · Network: eip155:42161 · Asset: USDC · Scheme: exact
Payment option 4
0.03 USDC
Atomic price: 30000 · Network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "30000",
    "payTo": "0x6293ded2684F1A76E26bEcef87c137D691Fbf800"
  },
  {
    "scheme": "exact",
    "network": "eip155:137",
    "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
    "amount": "30000",
    "payTo": "0x6293ded2684F1A76E26bEcef87c137D691Fbf800"
  },
  {
    "scheme": "exact",
    "network": "eip155:42161",
    "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
    "amount": "30000",
    "payTo": "0x6293ded2684F1A76E26bEcef87c137D691Fbf800"
  },
  {
    "scheme": "exact",
    "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
    "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": "30000",
    "payTo": "82wfSCZhCmZA7zwqqt6Q3FG8nqYBwUvbThP6M97fa9Q6"
  }
]

Observed health

Status
Healthy
Latest latency
206 ms
Average latency
156 ms
HTTP status
402
Last checked
Reachability
100% over 5 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "http"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET"
      ]
    },
    "queryParams": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "Absolute public http(s) URL of the file (or send the file in a POST body instead). With no input at all (no URL) this reads the public sample invoice PDF in the example and the answer says so.",
          "examples": [
            "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/coolblue1.pdf"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated field names to extract (1-30). For rows, give the row keys in brackets: line_items[description,quantity,amount]. Or one word, invoice or receipt, for the usual fields of that document with its line items",
          "examples": [
            "invoice"
          ]
        }
      },
      "required": [
        "url",
        "fields"
      ]
    }
  },
  "required": [
    "type",
    "method"
  ],
  "additionalProperties": false
}

Output schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string"
    },
    "example": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "data": {
          "type": "object",
          "properties": {
            "supplier_name": {
              "type": "string"
            },
            "supplier_vat_number": {
              "type": "string"
            },
            "supplier_address": {
              "type": "string"
            },
            "customer_name": {
              "type": "string"
            },
            "customer_vat_number": {},
            "invoice_number": {
              "type": "string"
            },
            "invoice_date": {
              "type": "string"
            },
            "due_date": {},
            "currency": {
              "type": "string"
            },
            "subtotal": {
              "type": "number"
            },
            "tax_amount": {
              "type": "number"
            },
            "total": {
              "type": "number"
            },
            "iban": {
              "type": "string"
            },
            "payment_reference": {},
            "line_items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "number"
                  },
                  "unit_price": {
                    "type": "number"
                  },
                  "amount": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "missing": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "model": {
          "type": "string"
        },
        "charsRead": {
          "type": "number"
        },
        "truncated": {
          "type": "boolean"
        }
      }
    }
  },
  "required": [
    "type"
  ]
}