Skip to main content
POST
/
api
/
v1
/
extract
/
sync
cURL
curl -X POST https://app.okrapdf.com/api/v1/extract/sync \
  -H "Authorization: Bearer okra_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/invoice.pdf"}'
{
  "job_id": "<string>",
  "status": "completed",
  "filename": "<string>",
  "pages": 123,
  "results": {
    "tables": [
      {
        "page": 123,
        "table_index": 123,
        "markdown": "<string>",
        "headers": [
          "<string>"
        ],
        "row_count": 123,
        "confidence": 123
      }
    ],
    "text": [
      {
        "page": 123,
        "content": "<string>"
      }
    ],
    "entities": [
      {
        "type": "table",
        "page": 123,
        "title": "<string>"
      }
    ]
  }
}
Best for small documents (<10 pages). Waits up to 60 seconds for extraction to complete and returns results inline. If the document is still processing after 60s, returns 202 with a poll URL.For large documents (10+ pages), use the async endpoint instead — it returns immediately and supports webhook notifications.

Authorizations

Authorization
string
header
required

API key as Bearer token: Authorization: Bearer okra_xxx

Body

application/json
url
string<uri>

URL to fetch PDF from

file_base64
string

Base64-encoded PDF content

filename
string

Required when using file_base64

options
object

Response

Extraction completed

job_id
string
required
status
enum<string>
required
Available options:
completed
filename
string
required
pages
integer
required
results
object
required