API Reference
DeepLedger REST API — search and cross-reference 9.3M+ public records programmatically.
https://api.deepledger.coAuthentication
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://api.deepledger.co/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/cross-refCross-reference search across ALL datasets in one call. Results grouped by dataset with total counts. Each query costs 1 search credit.
Parameters
qstringlimitintegerMax results per dataset (default: 10, max: 100)min_datasetsintegerOnly return results appearing in N+ datasets (e.g. 2 for multi-dataset hits)Response
{
"query": "Deutsche Bank",
"datasets_matched": 3,
"multi_dataset": true,
"total_results": 10,
"results_by_dataset": [
{
"dataset": "epstein",
"entity_count": 5,
"total_entity_count": 33725,
"document_count": 0,
"total_document_count": 0,
"entities": [{ "id": "epstein-EFTA01356629", "name": "EFTA01356629", "snippet": "Deutsche Bank AG London..." }]
},
{
"dataset": "offshore-leaks",
"entity_count": 5,
"total_entity_count": 36,
"entities": [{ "id": "icij-80056558", "name": "Deutsche Bank AG", "entity_type": "person" }]
}
]
}/v1/cross-refBatch cross-reference — search up to 10 queries across all datasets in one request. Each query costs 1 search credit.
Parameters
queriesstring[]datasetsstring[]Filter to specific datasetsmin_datasetsintegerOnly return queries matching N+ datasetslimitintegerMax results per dataset per query (default: 10)Response
{
"queries": [
{ "query": "Bill Gates", "datasets_matched": 2, "multi_dataset": true, "results_by_dataset": [...] },
{ "query": "Gates Foundation", "datasets_matched": 1, "multi_dataset": false, "results_by_dataset": [...] }
],
"summary": {
"total_queries": 2,
"returned_queries": 1,
"datasets_with_hits": ["epstein", "offshore-leaks", "irs-990"]
}
}/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 binaryAI Agent Integration
DeepFiles is designed for AI-native workflows. Use any AI coding tool — Claude Code, Codex, Cursor, or your own agents — to search, analyze, and cross-reference records programmatically.
Discovery
/openapi.jsonOpenAPI 3.1 spec — machine-readable API definition/llms.txtLLM-optimized quick reference — paste into any AI chatBulk Export Formats
Add ?format=ndjson or ?format=csv to any search for agent-friendly bulk export (up to 1,000 results per page).
# Search and pipe to your analysis tool
curl -s "https://api.deepledger.co/v1/search?q=maxwell&format=ndjson&limit=1000" | \
jq -r '.title'
# Cross-reference a name across all datasets
curl -s "https://api.deepledger.co/v1/cross-ref?q=maxwell&min_datasets=2" | \
jq '.results[] | {dataset, count: .total}'
# Bulk CSV export
curl -s "https://api.deepledger.co/v1/search?q=flight+log&dataset=epstein&format=csv&limit=1000" \
-o flight-logs.csvCommand-Line Interface
Search DeepLedger directly from your terminal. Download the shell function and source it in your shell profile.
Setup
# Download and add to your shell profile
curl -sL https://deepledger.co/deepledger-cli.sh -o ~/.deepledger-cli.sh
echo 'source ~/.deepledger-cli.sh' >> ~/.zshrc # or ~/.bashrc
source ~/.deepledger-cli.sh
# Set your API key
export DEEPLEDGER_API_KEY="df_live_YOUR_KEY"Usage
# Search all datasets
deepledger "Credit Suisse"
# Cross-reference across all datasets
deepledger --xref "Deutsche Bank"
# Filter by entity type
deepledger --type company "Pritzker"
deepledger --type person "John Smith"
# Filter by dataset
deepledger --dataset epstein "flight log"
deepledger --dataset offshore-leaks "Mossack Fonseca"
# Combine flags
deepledger --dataset offshore-leaks --type company "Shell"Example Output
$ deepledger "Credit Suisse"
Found 1246 results:
[epstein] (document) EFTA02040166
CREDIT SUISSE Global Trading Forum 2014...
[offshore-leaks] (company) Credit Suisse Trust Ltd.
Panama Papers — registered agent...
[ofac] (company) Credit Suisse AG
OFAC sanctioned entity...The CLI supports the same datasets, type filters, and cross-reference capabilities as the REST API. Each search uses one credit from your API key quota.
Rate 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 |