Get Extractor
curl --request GET \
--url https://api.doctly.ai/api/v1/e/{extractor_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.doctly.ai/api/v1/e/{extractor_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.doctly.ai/api/v1/e/{extractor_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.doctly.ai/api/v1/e/{extractor_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: Bearer <token>"
],
]);
$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.doctly.ai/api/v1/e/{extractor_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.doctly.ai/api/v1/e/{extractor_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.doctly.ai/api/v1/e/{extractor_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "987fcdeb-a654-3210-9876-543210987654",
"name": "Invoice Extractor",
"slug": "invoice-extractor",
"description": "Extract invoice details including vendor information, line items, subtotals, taxes, and grand totals from PDF invoices.",
"cost_type": "PER_PAGE",
"cost_credits": 5
}
{
"detail": "Extractor not found or you do not have access to it."
}
{
"detail": [
{
"loc": ["path", "extractor_id"],
"msg": "value is not a valid uuid",
"type": "type_error.uuid"
}
]
}
Extractors
Get Extractor
Retrieve details of a specific extractor by ID.
Get Extractor
curl --request GET \
--url https://api.doctly.ai/api/v1/e/{extractor_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.doctly.ai/api/v1/e/{extractor_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.doctly.ai/api/v1/e/{extractor_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.doctly.ai/api/v1/e/{extractor_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: Bearer <token>"
],
]);
$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.doctly.ai/api/v1/e/{extractor_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.doctly.ai/api/v1/e/{extractor_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.doctly.ai/api/v1/e/{extractor_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "987fcdeb-a654-3210-9876-543210987654",
"name": "Invoice Extractor",
"slug": "invoice-extractor",
"description": "Extract invoice details including vendor information, line items, subtotals, taxes, and grand totals from PDF invoices.",
"cost_type": "PER_PAGE",
"cost_credits": 5
}
{
"detail": "Extractor not found or you do not have access to it."
}
{
"detail": [
{
"loc": ["path", "extractor_id"],
"msg": "value is not a valid uuid",
"type": "type_error.uuid"
}
]
}
Get detailed information about a specific extractor including its configuration, pricing, and edit permissions.
Request
Headers
Bearer token authentication. Example:
Bearer YOUR_API_KEYPath Parameters
The unique identifier (UUID) of the extractor
Example Request
curl https://api.doctly.ai/api/v1/e/987fcdeb-a654-3210-9876-543210987654 \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
extractor_id = "987fcdeb-a654-3210-9876-543210987654"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.get(
f"https://api.doctly.ai/api/v1/e/{extractor_id}",
headers=headers
)
extractor = response.json()
print(f"Name: {extractor['name']}")
print(f"Slug: {extractor['slug']}")
print(f"Cost: {extractor['cost_credits']} credits {extractor['cost_type'].lower()}")
const extractorId = '987fcdeb-a654-3210-9876-543210987654';
const response = await fetch(
`https://api.doctly.ai/api/v1/e/${extractorId}`,
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const extractor = await response.json();
console.log(`Name: ${extractor.name}`);
console.log(`Slug: ${extractor.slug}`);
Response
Show Extractor Object
Show Extractor Object
Unique identifier (UUID) for the extractor
Display name of the extractor
URL-friendly identifier used in API paths (e.g.,
invoice-extractor)Description of what the extractor does and what documents it’s designed for
Pricing model:
PER_PAGE or PER_DOCUMENTNumber of credits charged per page or per document
Example Responses
{
"id": "987fcdeb-a654-3210-9876-543210987654",
"name": "Invoice Extractor",
"slug": "invoice-extractor",
"description": "Extract invoice details including vendor information, line items, subtotals, taxes, and grand totals from PDF invoices.",
"cost_type": "PER_PAGE",
"cost_credits": 5
}
{
"detail": "Extractor not found or you do not have access to it."
}
{
"detail": [
{
"loc": ["path", "extractor_id"],
"msg": "value is not a valid uuid",
"type": "type_error.uuid"
}
]
}
Using the Extractor
Once you have the extractor details, use theslug to run it:
import requests
# Get extractor details
extractor_id = "987fcdeb-a654-3210-9876-543210987654"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
extractor = requests.get(
f"https://api.doctly.ai/api/v1/e/{extractor_id}",
headers=headers
).json()
# Run the extractor using its slug
slug = extractor["slug"]
with open("invoice.pdf", "rb") as f:
files = {"file": ("invoice.pdf", f, "application/pdf")}
response = requests.post(
f"https://api.doctly.ai/api/v1/e/{slug}",
headers=headers,
files=files
)
print(response.json())
const headers = { 'Authorization': 'Bearer YOUR_API_KEY' };
// Get extractor details
const extractorId = '987fcdeb-a654-3210-9876-543210987654';
const extractor = await fetch(
`https://api.doctly.ai/api/v1/e/${extractorId}`,
{ headers }
).then(r => r.json());
// Run the extractor using its slug
const formData = new FormData();
formData.append('file', fileInput.files[0]);
const result = await fetch(
`https://api.doctly.ai/api/v1/e/${extractor.slug}`,
{
method: 'POST',
headers,
body: formData
}
).then(r => r.json());
console.log(result);
Authorizations
API key authentication using Bearer token
Path Parameters
Extractor ID
⌘I

