API Reference
DeepLedger REST API — search and cross-reference 8.5M+ public records programmatically.
https://deepfiles-api.deepfiles.workers.devAuthentication
Include your API key in the Authorization header. API keys are available on the Pro and Enterprise plans.
curl -H "Authorization: Bearer df_live_YOUR_KEY" \
https://deepfiles-api.deepfiles.workers.dev/v1/search?q=exampleEndpoints
/v1/searchSearch across all datasets. Returns matching entities, documents, and relationships.
Parameters
qstringdatasetstringFilter by dataset (ofac, offshore-leaks, faa, irs-990, epstein, fec)typestringFilter by entity type (person, company, aircraft, nonprofit, document)countrystringISO 3166-1 alpha-2 country codelimitintegerMax results (default: 20, max: 100)offsetintegerPagination offset (default: 0)Response
{
"query": "Mossack Fonseca",
"dataset": "all",
"total": 23,
"offset": 0,
"limit": 20,
"results": [
{
"type": "entity",
"id": "icij-12345",
"title": "Mossack Fonseca & Co.",
"snippet": "<mark>Mossack</mark> <mark>Fonseca</mark> & Co. (Panama)",
"dataset": "offshore-leaks",
"entity_type": "company"
},
{
"type": "entity",
"id": "ofac-67890",
"title": "Mossack Fonseca Related Entity",
"snippet": "OFAC designated entity linked to <mark>Mossack</mark>...",
"dataset": "ofac",
"entity_type": "company"
}
]
}/v1/statsGet aggregate statistics for all indexed datasets.
Response
{
"total_records": 12500000,
"datasets": 6,
"entities": 8200000,
"relationships": 3100000,
"documents": 1200000,
"shards": [
{
"dataset": "ofac",
"entities": 350000,
"relationships": 120000,
"documents": 0
}
],
"last_updated": "2025-02-24T00:00:00Z"
}/v1/entity/:idGet full details for a specific entity, including direct relationships.
Parameters
idstringResponse
{
"entity": {
"id": "icij-12345",
"dataset_id": "offshore-leaks",
"name": "Mossack Fonseca & Co.",
"entity_type": "company",
"metadata": {
"countries": "Panama",
"sourceID": "Panama Papers"
},
"created_at": "2026-02-25T00:00:00Z"
},
"relationships": [
{
"id": "icij-r-12345-67890",
"source_entity_id": "icij-12345",
"target_entity_id": "icij-67890",
"relationship_type": "registered_agent",
"dataset_id": "offshore-leaks",
"connected_name": "John Doe",
"connected_id": "icij-67890",
"connected_type": "person"
}
]
}/v1/entity/:id/connectionsMulti-level graph traversal — follow entity relationships across datasets up to 3 levels deep. Find indirect connections between people, companies, and records.
Parameters
idstringdepthintegerTraversal depth (default: 2, max: 3)Response
{
"root": "icij-12345",
"depth": 2,
"total_connections": 47,
"connections": [
{
"from": "icij-12345",
"to": "icij-67890",
"name": "John Doe",
"type": "person",
"relationship": "shareholder",
"dataset": "offshore-leaks",
"depth": 1
},
{
"from": "icij-67890",
"to": "faa-N12345",
"name": "Doe Aviation LLC",
"type": "aircraft",
"relationship": "registered_owner",
"dataset": "faa",
"depth": 2
}
]
}/v1/document/:idGet document content as markdown (default), JSON metadata, or original PDF.
Parameters
idstringResponse
// With Accept: application/json
{
"document": {
"id": "epstein-EFTA00001234",
"title": "Flight Log - February 2003",
"dataset": "epstein",
"source_filename": "EFTA00001234.pdf",
"page_count": 12,
"token_count": 4500,
"has_pdf": true,
"has_markdown": true
}
}
// With Accept: text/markdown (default)
// Returns raw markdown content
// With Accept: application/pdf
// Returns original PDF binaryMCP Integration
DeepLedger is available as an MCP (Model Context Protocol) server for AI-native workflows. Connect it to Claude, Cursor, or any MCP-compatible client.
// claude_desktop_config.json
{
"mcpServers": {
"deepfiles": {
"command": "npx",
"args": ["-y", "@deepfiles/mcp-server"],
"env": {
"DEEPFILES_API_KEY": "df_live_YOUR_KEY"
}
}
}
}Available MCP Tools
searchFull-text search across all datasetstraverseMulti-level graph traversal — follow relationships up to 3 levels deepget_entityGet entity details with direct relationshipsget_documentGet document content as markdown or PDFget_statsGet dataset statistics and record countsRate Limits
| Plan | Rate | Quota |
|---|---|---|
| Free | 10/day | 10 searches/day |
| Pro | 60/min | 1,000 per purchase |
| Enterprise | Custom | Unlimited |
Error Codes
| Code | Status | Description |
|---|---|---|
| 400 | Bad Request | Missing or invalid query parameters |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | Insufficient plan for this endpoint |
| 404 | Not Found | Entity or document not found |
| 429 | Too Many Requests | Rate limit exceeded — retry after Retry-After header |
| 500 | Internal Error | Unexpected server error — please retry |