/api/v1/e/{extractor_id}
Get detailed information about a specific extractor including its configuration, pricing, and edit permissions.
Request
Headers
string
required
Bearer token authentication. Example:
Bearer YOUR_API_KEYPath Parameters
string
required
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
string
Unique identifier (UUID) for the extractor
string
Display name of the extractor
string
URL-friendly identifier used in API paths (e.g.,
invoice-extractor)string
Description of what the extractor does and what documents it’s designed for
string
Pricing model:
PER_PAGE or PER_DOCUMENTinteger
Number 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);

