x402

PDF Data Extraction (x402)

Extract structured data from any PDF document. Accepts a URL or base64-encoded PDF. Works on contracts, reports, forms — any document type. Returns JSON based on your extraction instructions.

post/x402/v2/pdf-extract

Request

  • Base URL: https://api.strale.io
  • URL: https://api.strale.io/x402/v2/pdf-extract
  • Auth: none required

Request body

urlstring

URL to a PDF file

base64string

Base64-encoded PDF

extractstring

What data to extract (natural language)

Response

Success

dataobject
source_urlstring

Example response

{
  "data": {
    "pages": 1,
    "title": "Dummy PDF file",
    "content": [
      {
        "page": 1,
        "text": "Dummy PDF file"
      }
    ],
    "document_type": "PDF",
    "extracted_data": {
      "body_content": "No additional content found",
      "main_heading": "Dummy PDF file"
    }
  },
  "source_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
}

Changes

No recorded changes to this operation across all 1 revision of this API.