List Extractions
curl --request GET \
--url https://api.example.com/v1/projects/{project_id}/extract/results \
--header 'x-api-key: <api-key>' \
--header 'x-selected-account-id: <api-key>'import requests
url = "https://api.example.com/v1/projects/{project_id}/extract/results"
headers = {
"x-api-key": "<api-key>",
"x-selected-account-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-selected-account-id': '<api-key>'}
};
fetch('https://api.example.com/v1/projects/{project_id}/extract/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/projects/{project_id}/extract/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-selected-account-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/projects/{project_id}/extract/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-selected-account-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/projects/{project_id}/extract/results")
.header("x-api-key", "<api-key>")
.header("x-selected-account-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_id}/extract/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-selected-account-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"project_id": "<string>",
"source_id": "<string>",
"result": {
"data": {
"invoice_id": {
"citations": [
{
"bbox": {
"height": 0.2058080808080808,
"left": 0.07761437908496732,
"top": 0.42045454545454547,
"width": 0.8415032679738562
},
"content": "INV-2023-001",
"page": 1
}
],
"confidence": 0.95,
"value": "INV-2023-001"
},
"total_amount": {
"citations": [
{
"bbox": {
"height": 0.2058080808080808,
"left": 0.07761437908496732,
"top": 0.42045454545454547,
"width": 0.8415032679738562
},
"content": "119.99",
"page": 1
}
],
"confidence": 0.95,
"value": 119.99
}
}
},
"parameters": {
"model": "<string>",
"extraction_schema": {},
"model_kwargs": {},
"system_prompt": "<string>",
"user_prompt": "<string>",
"generate_citations": true,
"generate_confidence": true,
"use_agentic": false,
"agentic_tools": {},
"execute_dependent_subtask_tool_hints": false,
"agent_settings": {
"use_agentic": false,
"planning_model": "<string>",
"acting_model": "<string>",
"reflection_model": "<string>",
"max_turns": 2,
"max_context_tokens": 100000,
"max_reasoning_hops": 123,
"max_waves": 123,
"max_validation_fix_attempts": 2,
"decompose_prompt_template": "<string>",
"decompose_rules": "<string>",
"search_rules": "<string>",
"extraction_rules": "<string>"
}
},
"created_at": "2023-11-07T05:31:56Z",
"object": "extraction",
"processing_time_ms": 123
}
],
"total_count": 123,
"next_token": "<string>",
"prev_token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Extract
List Extractions
List all extractions for a project with token-based pagination and filtering.
Only SUCCEEDED extraction jobs are returned. Filter by ids, created_at, completed_at, or source_id.
Args: project_id: Project ID that the extractions belong to filter_params: Filter parameters (ids, created_at, completed_at, source_id) pagination_params: Pagination parameters (page_size, continuation_token, sort_by, sort_order)
Returns: PaginatedItems or list of ExtractionEntity instances
Raises: HTTPException: If project not found
GET
/
v1
/
projects
/
{project_id}
/
extract
/
results
List Extractions
curl --request GET \
--url https://api.example.com/v1/projects/{project_id}/extract/results \
--header 'x-api-key: <api-key>' \
--header 'x-selected-account-id: <api-key>'import requests
url = "https://api.example.com/v1/projects/{project_id}/extract/results"
headers = {
"x-api-key": "<api-key>",
"x-selected-account-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-selected-account-id': '<api-key>'}
};
fetch('https://api.example.com/v1/projects/{project_id}/extract/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/projects/{project_id}/extract/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-selected-account-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/projects/{project_id}/extract/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-selected-account-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/projects/{project_id}/extract/results")
.header("x-api-key", "<api-key>")
.header("x-selected-account-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_id}/extract/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-selected-account-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"project_id": "<string>",
"source_id": "<string>",
"result": {
"data": {
"invoice_id": {
"citations": [
{
"bbox": {
"height": 0.2058080808080808,
"left": 0.07761437908496732,
"top": 0.42045454545454547,
"width": 0.8415032679738562
},
"content": "INV-2023-001",
"page": 1
}
],
"confidence": 0.95,
"value": "INV-2023-001"
},
"total_amount": {
"citations": [
{
"bbox": {
"height": 0.2058080808080808,
"left": 0.07761437908496732,
"top": 0.42045454545454547,
"width": 0.8415032679738562
},
"content": "119.99",
"page": 1
}
],
"confidence": 0.95,
"value": 119.99
}
}
},
"parameters": {
"model": "<string>",
"extraction_schema": {},
"model_kwargs": {},
"system_prompt": "<string>",
"user_prompt": "<string>",
"generate_citations": true,
"generate_confidence": true,
"use_agentic": false,
"agentic_tools": {},
"execute_dependent_subtask_tool_hints": false,
"agent_settings": {
"use_agentic": false,
"planning_model": "<string>",
"acting_model": "<string>",
"reflection_model": "<string>",
"max_turns": 2,
"max_context_tokens": 100000,
"max_reasoning_hops": 123,
"max_waves": 123,
"max_validation_fix_attempts": 2,
"decompose_prompt_template": "<string>",
"decompose_rules": "<string>",
"search_rules": "<string>",
"extraction_rules": "<string>"
}
},
"created_at": "2023-11-07T05:31:56Z",
"object": "extraction",
"processing_time_ms": 123
}
],
"total_count": 123,
"next_token": "<string>",
"prev_token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Query Parameters
Sort order (asc or desc) Enum for project sort fields. Note that only non-nullable fields can be sorted by (for details, see: https://github.com/djrobstep/sqlakeyset?tab=readme-ov-file#limitations ).
Available options:
asc, desc