Get extraction results
curl --request GET \
--url https://api.tile.run/v1/extract/{extraction_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.tile.run/v1/extract/{extraction_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.tile.run/v1/extract/{extraction_id}', 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.tile.run/v1/extract/{extraction_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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.tile.run/v1/extract/{extraction_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.tile.run/v1/extract/{extraction_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tile.run/v1/extract/{extraction_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"extraction_id": "<string>",
"file_id": "<string>",
"status": "PENDING",
"created_at": "2023-11-07T05:31:56Z",
"schema_name": "<string>",
"schema_description": "<string>",
"extracted_data": {},
"processing_metadata": {
"credits_used": 123
}
}Endpoints
Get extraction results
Get the results of a schema extraction job by polling
GET
/
extract
/
{extraction_id}
Get extraction results
curl --request GET \
--url https://api.tile.run/v1/extract/{extraction_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.tile.run/v1/extract/{extraction_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.tile.run/v1/extract/{extraction_id}', 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.tile.run/v1/extract/{extraction_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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.tile.run/v1/extract/{extraction_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.tile.run/v1/extract/{extraction_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tile.run/v1/extract/{extraction_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"extraction_id": "<string>",
"file_id": "<string>",
"status": "PENDING",
"created_at": "2023-11-07T05:31:56Z",
"schema_name": "<string>",
"schema_description": "<string>",
"extracted_data": {},
"processing_metadata": {
"credits_used": 123
}
}Response structure
The response contains extracted data organized hierarchically. Each field inextracted_data can be either:
- A primitive field (like
invoice_number) - An object containing nested fields (like
customer) - An array of objects (like
line_items)
name: Field identifiervalue: Extracted contentconfidence: Accuracy score (0-1)field_type: Data type (string, number, date, phone, email)page_index: Page from which the value was extractedsource_context: Extraction context details
{
"schema_name": "string",
"schema_description": "string",
"extracted_data": {
"name": "Invoice",
"fields": {
"invoice_number": {
"name": "invoice_number",
"value": "INV-12322",
"field_type": "string",
"confidence": 0.95,
"source_context": "string",
"page_index": 1
},
"customer": {
"name": {
"name": "name",
"value": "Acme",
"field_type": "string",
"confidence": 0.95,
"source_context": "string",
"page_index": 1
},
"email": {
"name": "email",
"value": "acme@email.com",
"field_type": "email",
"confidence": 0.95,
"source_context": "string",
"page_index": 1
}
},
"line_items": [
{
"description": {
"name": "description",
"value": "Services for SEO",
"field_type": "string",
"confidence": 0.95,
"source_context": "string",
"page_index": 1
},
"amount": {
"name": "amount",
"value": 200,
"field_type": "number",
"confidence": 0.95,
"source_context": "string",
"page_index": 1
}
}
]
},
"field_type": "object"
}
}
Headers
Bearer token for authentication
Path Parameters
ID of the extraction job
Response
200 - application/json
Extraction results
ID of the extraction job
ID of the file being processed
Status of the extraction job
Available options:
PENDING, PROCESSING, COMPLETED, FAILED When the job was created
Name of the schema used for extraction
Description of the schema used for extraction
Object containing extracted data. See above for more information about the structure of this object.
Show child attributes
Show child attributes