Court Record Intelligence, Via API
A simple, powerful REST API to search, extract, and monitor 50M+ Indian court records. Integrate in hours, not months.
import requests
response = requests.get(
"https://api.casetrail.ai/v1/search",
headers={
"Authorization": "Bearer ck_live_..."
},
params={
"query": "Rahul Sharma",
"state": "MH"
}
)
# Returns structured JSON in <2 seconds
cases = response.json()["results"]
print(f"Found {len(cases)} matching cases")API Endpoints
Clean, RESTful endpoints designed for predictable, developer-friendly integration.
/v1/searchCase SearchSearch across all indexed Indian courts by name, case number, CNR, PAN, or advocate. Returns ranked matching cases with confidence scores.
querystatecourt_typedate_fromdate_tolimit/v1/cases/{cnr}Case DetailsFetch complete structured details for a case by CNR number — parties, advocates, judge, hearing history, orders, and current status.
cnr (required)include_ordersinclude_documents/v1/bulkBulk LookupSubmit a JSON array of up to 10,000 identifiers (names, PANs, case numbers) for batch processing. Async job with webhook callback on completion.
identifiers[]callback_urlpriority/v1/reports/generateReport GenerationGenerate a verified, tamper-evident PDF report for a case or entity. Report includes source URLs, extraction timestamp, and cryptographic hash.
typesubject_idformatlanguage/v1/alerts/subscribeCase AlertsSubscribe to real-time webhooks for any case. Receive instant HTTP callbacks when a new order is passed, a hearing is scheduled, or status changes.
cnrcallback_urlevents[]Code Examples
Real code you can copy-paste and adapt immediately.
curl -X GET \ "https://api.casetrail.ai/v1/search?query=Rahul+Sharma&state=MH&limit=10" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
import requests
client = requests.Session()
client.headers.update({
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
})
response = client.get(
"https://api.casetrail.ai/v1/search",
params={
"query": "Rahul Sharma",
"state": "MH",
"limit": 10
}
)
data = response.json()
for case in data["results"]:
print(f"{case['cnr']} — {case['title']} ({case['status']})")const axios = require('axios');
const client = axios.create({
baseURL: 'https://api.casetrail.ai/v1',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
});
async function searchCases(query, state) {
const { data } = await client.get('/search', {
params: { query, state, limit: 10 },
});
data.results.forEach(c => {
console.log(`${c.cnr} — ${c.title} (${c.status})`);
});
}
searchCases('Rahul Sharma', 'MH');{
"status": "success",
"query_time_ms": 312,
"total": 4,
"results": [
{
"cnr": "MNHC010012342018",
"title": "Rahul Sharma v. State of Maharashtra",
"court": "Bombay High Court",
"filing_date": "2018-03-14",
"status": "Disposed",
"category": "Civil Writ Petition",
"confidence": 0.97,
"parties": {
"petitioner": "Rahul Sharma",
"respondent": "State of Maharashtra"
},
"last_hearing": "2023-11-28",
"advocate": "Adv. Priya Mehta"
}
]
}Getting Started in 4 Steps
From sign-up to your first successful API call in under 10 minutes.
Create Account
Sign up at app.casetrail.ai. Choose a plan based on your expected call volume.
Generate API Key
Navigate to Settings → API Keys and click "Create New Key". Name it and set scopes.
Add to Header
Include your key as a Bearer token in every API request: Authorization: Bearer YOUR_KEY
Handle Responses
All endpoints return JSON. Check the status field and handle rate limits (429) with exponential backoff.
Rate Limits & Plan Quotas
| Plan | Requests / Day | Bulk Size | Rate Limit | Webhooks |
|---|---|---|---|---|
| Starter | 1,000 / day | Up to 500 / batch | 10 req/s | 5 |
| Professional | 10,000 / day | Up to 1,000 / batch | 50 req/s | 25 |
| Enterprise | Unlimited | Up to 10,000 / batch | 500 req/s | Unlimited |
API FAQs
Common developer questions answered.
How do I get an API key?
What rate limits apply?
Is there an SDK?
How do webhooks work?
What SLA does the API carry?
Can I test in a sandbox environment?
Start Building Today
Free sandbox access. No credit card required. Your first API key is ready in 60 seconds.