Documentation Index Fetch the complete documentation index at: https://docs.case.dev/llms.txt
Use this file to discover all available pages before exploring further.
Search for legal sources by topic, find similar cases, and conduct deep research with multiple query variations.
Find cases
Search for legal sources including cases, statutes, and regulations from authoritative databases.
cURL
CLI
Typescript
Python
C#
Java
PHP
Go
curl -X POST https://api.case.dev/legal/v1/find \
-H "Authorization: Bearer $CASEDEV_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"query": "qualified immunity excessive force police",
"jurisdiction": "us-federal",
"numResults": 10
}'
Parameters
Parameter Type Description querystring Search query (3-1,000 characters) jurisdictionstring Optional jurisdiction ID (e.g., us-federal, california) numResultsnumber Results to return (1-25, default 10)
Response
{
"query" : "qualified immunity excessive force police" ,
"jurisdiction" : "us-federal" ,
"found" : 10 ,
"candidates" : [
{
"url" : "https://www.courtlistener.com/opinion/..." ,
"title" : "Harlow v. Fitzgerald, 457 U.S. 800 (1982)" ,
"snippet" : "Government officials performing discretionary functions are shielded from liability..." ,
"source" : "courtlistener.com" ,
"publishedDate" : "1982-06-24"
}
],
"hint" : "IMPORTANT: Use legal.verify() on each candidate before citing."
}
Always verify before citing. Search results are candidates, not verified sources. Use legal.verify() to confirm each citation exists in the database before your user cites it.
Find similar cases
Given a legal document URL, find semantically similar sources. Useful for expanding research or finding citing cases.
cURL
CLI
Typescript
Python
C#
Java
PHP
Go
curl -X POST https://api.case.dev/legal/v1/similar \
-H "Authorization: Bearer $CASEDEV_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.courtlistener.com/opinion/118365/bush-v-gore/",
"numResults": 10
}'
Parameters
Parameter Type Description urlstring URL of the source document jurisdictionstring Optional jurisdiction filter numResultsnumber Results to return (1-25, default 10) startPublishedDatestring Only include sources after this date (ISO format)
Response
{
"sourceUrl" : "https://www.courtlistener.com/opinion/118365/bush-v-gore/" ,
"jurisdiction" : "all" ,
"found" : 10 ,
"similarSources" : [
{
"url" : "https://www.courtlistener.com/opinion/..." ,
"title" : "Reynolds v. Sims, 377 U.S. 533 (1964)" ,
"snippet" : "The Equal Protection Clause requires substantially equal legislative representation..." ,
"source" : "courtlistener.com" ,
"publishedDate" : "1964-06-15"
}
]
}
Deep research
Conduct comprehensive research with multiple query variations. Uses advanced search to find sources across different phrasings of the legal issue.
cURL
CLI
Typescript
Python
C#
Java
PHP
Go
curl -X POST https://api.case.dev/legal/v1/research \
-H "Authorization: Bearer $CASEDEV_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"query": "employment discrimination disparate impact",
"additionalQueries": [
"Title VII disparate impact theory",
"Griggs v Duke Power significance"
],
"numResults": 15
}'
Parameters
Parameter Type Description querystring Primary search query additionalQueriesstring[] Up to 5 alternative phrasings jurisdictionstring Optional jurisdiction filter numResultsnumber Results to return (1-25, default 10)
Response
{
"query" : "employment discrimination disparate impact" ,
"additionalQueries" : [ "Title VII disparate impact theory" , "..." ],
"jurisdiction" : "us-federal" ,
"searchType" : "deep" ,
"found" : 15 ,
"candidates" : [
{
"url" : "https://www.courtlistener.com/opinion/..." ,
"title" : "Griggs v. Duke Power Co., 401 U.S. 424 (1971)" ,
"snippet" : "The Act proscribes not only overt discrimination but also practices..." ,
"highlights" : [
"Congress directed the thrust of the Act to the consequences of employment practices" ,
"The touchstone is business necessity"
],
"source" : "courtlistener.com" ,
"publishedDate" : "1971-03-08"
}
]
}
When to use deep research
Scenario Use Quick case lookup legal.find()Thorough brief research legal.research() with query variationsFinding all related cases legal.similar() from a key case
Common patterns
Research workflow
cURL
CLI
Typescript
Python
C#
Java
PHP
Go
# 1. Deep search with variations
curl -X POST https://api.case.dev/legal/v1/research \
-H "Authorization: Bearer $CASEDEV_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"query": "topic",
"additionalQueries": ["variation 1", "variation 2"],
"jurisdiction": "us-federal",
"numResults": 20
}'
# 2. Verify top candidates
curl -X POST https://api.case.dev/legal/v1/verify \
-H "Authorization: Bearer $CASEDEV_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"text": "Candidate Title, 457 U.S. 800"
}'
# 3. Find similar cases to the best result
curl -X POST https://api.case.dev/legal/v1/similar \
-H "Authorization: Bearer $CASEDEV_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.courtlistener.com/opinion/...",
"numResults": 5
}'
Build a case timeline
cURL
CLI
Typescript
Python
C#
Java
PHP
Go
# Find the seed case
curl -X POST https://api.case.dev/legal/v1/find \
-H "Authorization: Bearer $CASEDEV_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"query": "seed case topic",
"numResults": 1
}'
# Find similar cases across time
curl -X POST https://api.case.dev/legal/v1/similar \
-H "Authorization: Bearer $CASEDEV_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.courtlistener.com/opinion/...",
"numResults": 25
}'
Jurisdiction-specific research
cURL
CLI
Typescript
Python
C#
Java
PHP
Go
curl -X POST https://api.case.dev/legal/v1/find \
-H "Authorization: Bearer $CASEDEV_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"query": "your query",
"jurisdiction": "us-federal",
"numResults": 5
}'
Supported sources
Search covers authoritative legal databases:
Source Content CourtListener ~10M court opinions Cornell Law Statutes, regulations, legal encyclopedias Supreme Court All SCOTUS opinions govinfo.gov Federal Register, CFR, USC State courts Via regional reporters