Skip to main content
List Documents
curl --request GET \
  --url https://api.doctly.ai/api/v1/documents \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "file_name": "quarterly-report.pdf",
      "file_size": 2097152,
      "page_count": 24,
      "status": "COMPLETED",
      "accuracy": "ultra",
      "extractor_id": null,
      "created_at": "2024-03-21T13:45:00Z"
    },
    {
      "id": "987fcdeb-a654-3210-9876-543210987654",
      "file_name": "invoice-march.pdf",
      "file_size": 524288,
      "page_count": 2,
      "status": "COMPLETED",
      "accuracy": null,
      "extractor_id": "abc12345-e89b-12d3-a456-426614174000",
      "created_at": "2024-03-20T09:30:00Z"
    },
    {
      "id": "456def78-e89b-12d3-a456-426614174000",
      "file_name": "contract.docx",
      "file_size": 1048576,
      "page_count": null,
      "status": "PROCESSING",
      "accuracy": "lite",
      "extractor_id": null,
      "created_at": "2024-03-21T14:00:00Z"
    }
  ],
  "count": 156
}
Retrieve all documents associated with your account. Results are paginated and can be filtered by date, filename, or extractor.

Request

Headers

Authorization
string
required
Bearer token authentication. Example: Bearer YOUR_API_KEY

Query Parameters

skip
integer
default:"0"
Number of records to skip for pagination
limit
integer
default:"100"
Maximum number of records to return (max: 100)
extractor_id
string
Filter by a specific extractor ID (UUID)
no_extractor
boolean
default:"false"
When true, returns only documents processed without an extractor (plain Markdown conversions)
Search documents by filename (case-insensitive partial match)
date_from
string
Filter documents created on or after this date (ISO 8601 format)
date_to
string
Filter documents created on or before this date (ISO 8601 format)

Example Requests

# Basic list
curl https://api.doctly.ai/api/v1/documents \
  -H "Authorization: Bearer YOUR_API_KEY"

# With pagination
curl "https://api.doctly.ai/api/v1/documents?skip=20&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Search by filename
curl "https://api.doctly.ai/api/v1/documents?search=invoice" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Filter by date range
curl "https://api.doctly.ai/api/v1/documents?date_from=2024-01-01&date_to=2024-03-31" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

data
array
Array of document objects
count
integer
Total number of documents matching the filter criteria

Example Responses

{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "file_name": "quarterly-report.pdf",
      "file_size": 2097152,
      "page_count": 24,
      "status": "COMPLETED",
      "accuracy": "ultra",
      "extractor_id": null,
      "created_at": "2024-03-21T13:45:00Z"
    },
    {
      "id": "987fcdeb-a654-3210-9876-543210987654",
      "file_name": "invoice-march.pdf",
      "file_size": 524288,
      "page_count": 2,
      "status": "COMPLETED",
      "accuracy": null,
      "extractor_id": "abc12345-e89b-12d3-a456-426614174000",
      "created_at": "2024-03-20T09:30:00Z"
    },
    {
      "id": "456def78-e89b-12d3-a456-426614174000",
      "file_name": "contract.docx",
      "file_size": 1048576,
      "page_count": null,
      "status": "PROCESSING",
      "accuracy": "lite",
      "extractor_id": null,
      "created_at": "2024-03-21T14:00:00Z"
    }
  ],
  "count": 156
}

Pagination Example

import requests

headers = {"Authorization": "Bearer YOUR_API_KEY"}
all_documents = []
skip = 0
limit = 100

while True:
    response = requests.get(
        "https://api.doctly.ai/api/v1/documents",
        headers=headers,
        params={"skip": skip, "limit": limit}
    ).json()
    
    all_documents.extend(response["data"])
    
    if len(all_documents) >= response["count"]:
        break
    
    skip += limit

print(f"Retrieved {len(all_documents)} documents")

Authorizations

Authorization
string
header
required

API key authentication using Bearer token

Query Parameters

skip
integer
default:0

Number of records to skip for pagination

limit
integer
default:100

Maximum number of records to return (max 100)

Required range: x <= 100
extractor_id
string<uuid>

Filter by extractor ID

no_extractor
boolean
default:false

Filter for documents without an extractor (plain conversions)

Search by filename

date_from
string<date-time>

Filter by start date (ISO 8601)

date_to
string<date-time>

Filter by end date (ISO 8601)

Response

List of documents

data
object[]
required
count
integer
required