Skip to main content
Get Extractor
curl --request GET \
  --url https://api.doctly.ai/api/v1/e/{extractor_id} \
  --header 'Authorization: Bearer <token>'
{
  "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
}
Get detailed information about a specific extractor including its configuration, pricing, and edit permissions.

Request

Headers

Authorization
string
required
Bearer token authentication. Example: Bearer YOUR_API_KEY

Path Parameters

extractor_id
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"

Response

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
}

Using the Extractor

Once you have the extractor details, use the slug 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())

Authorizations

Authorization
string
header
required

API key authentication using Bearer token

Path Parameters

extractor_id
string<uuid>
required

Extractor ID

Response

Extractor details

id
string<uuid>
required
name
string
required
slug
string
required
cost_type
enum<string>
required
Available options:
PER_PAGE,
PER_DOCUMENT
cost_credits
integer
required
description
string | null