Skip to main content
POST
/
extract
Start table extraction
curl --request POST \
  --url https://apigcp.trynia.ai/v2/extract \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "json_schema": {},
  "url": "<string>",
  "source_id": "<string>",
  "page_range": "<string>"
}
'
{
  "id": "<string>",
  "status": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "progress": 0,
  "url": "<string>",
  "source_display_name": "<string>",
  "page_range": "<string>",
  "records": [
    {}
  ],
  "record_count": 0,
  "page_count": 0,
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Body

application/json
json_schema
Json Schema · object
required

JSON Schema defining the structure of records to extract

url
string | null

URL of the PDF to extract from

source_id
string | null

Source ID of an already-indexed document

page_range
string | null

Page range to extract from (e.g. "1-10", "5,8,12")

Response

Successful Response

id
string
required

Extraction job ID

status
string
required

Job status: queued, processing, completed, failed

created_at
string
required
updated_at
string
required
progress
integer
default:0

Processing progress percentage (0-100)

url
string | null
source_display_name
string | null
page_range
string | null
records
Records · object[]

Extracted records conforming to the provided schema

record_count
integer
default:0
page_count
integer
default:0
error
string | null