pdfedge
API reference › Extract

Read a PDF: text per page, markdown for LLMs, form fields with their options, and document facts

POST/v1/extract

POST/v1/extract

Read a PDF: text per page, markdown for LLMs, form fields with their options, and document facts

Pick what to read with include. Pages with no text layer (scans) are listed in ocr_needed instead of coming back as silent empty strings; OCR is not offered yet. Use include fields before POST /v1/fill to learn a form's field names. Nothing is stored.

REQUEST BODY · APPLICATION/JSON · REQUIRED
{
  "file": "https://example.com/contracts/acme-msa.pdf",
  "include": [
    "markdown",
    "meta"
  ]
}
In the full reference
REQUEST
curl -X POST "https://api.pdfedge.com/v1/extract" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "file": "https://example.com/contracts/acme-msa.pdf",
  "include": [
    "markdown",
    "meta"
  ]
}'
RESPONSE
200OK
{
  "object": "extraction",
  "source": "fil_8kq2wzm4tnb7hdc3vrex",
  "pages": 2,
  "text": [
    {
      "page": 1,
      "text": "Master Services Agreement\nBetween Acme Inc. and …"
    },
    {
      "page": 2,
      "text": ""
    }
  ],
  "ocr_needed": [
    2
  ],
  "meta": {
    "title": "Master Services Agreement",
    "author": "Acme Legal",
    "pages": 2,
    "page_sizes": [
      {
        "page": 1,
        "width": 612,
        "height": 792,
        "rotation": 0
      }
    ],
    "pdf_version": "1.7",
    "encrypted": false,
    "form": false,
    "xfa": false,
    "tagged": true
  },
  "units": 1
}
404No such file on this account, or it has expired
{
  "error": "string",
  "message": "string",
  "param": "string"
}
Try it — sign in first
Runs on a sandbox key: 200 requests a month. Your real key is for production.