Extraction Job

Create a new extraction job

post

Takes as input a list of documents urls and a schema for the response format, and returns a job id. The job will be processed in the background and the results will be available via the /job/{id} endpoint. You can call the GET /job/{id} endpoint to check the status of the job and the results.

Authorizations
Body
one_row_per_pagebooleanOptional

If true, one row will be created for each page of the documents

Responses
200

Job created successfully

application/json
post
POST /job HTTP/1.1
Host: 
X-Account-Id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 274

{
  "documents": [
    {
      "url": "https://document.pdf",
      "type": "pdf"
    },
    {
      "url": "https://website.com",
      "type": "url"
    }
  ],
  "extraction_schema": {
    "name": {
      "description": "The name of a company",
      "type": "string"
    },
    "revenue": {
      "description": "The revenue of a company",
      "type": "number",
      "format": "amount"
    }
  }
}
{
  "job_id": "123e4567-e89b-12d3-a456-426614174000"
}

Get job status and results

get
Authorizations
Path parameters
idstring · uuidRequired

Job ID

Query parameters
include_extractionsbooleanOptional

Include extraction results in response

Default: false
Responses
200

Job details retrieved successfully

application/json
get
GET /job/{id} HTTP/1.1
Host: 
X-Account-Id: YOUR_API_KEY
Accept: */*
{
  "status": "ready",
  "extractions": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "status": "ready",
      "result": {}
    }
  ]
}

Last updated