Skip to main content

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.

Legal citations must be verified before use. This page covers all citation-related endpoints: parsing citations from text, extracting them from documents, verifying they exist, and retrieving full content.

Verify citations

Check if a citation refers to a real case. Essential for catching AI hallucinations.
Endpoint
POST /legal/v1/verify
curl -X POST https://api.case.dev/legal/v1/verify \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The Court held in Bush v. Gore, 531 U.S. 98 (2000)..."
  }'

Response

{
  "summary": {
    "total": 1,
    "verified": 1,
    "notFound": 0,
    "multipleMatches": 0
  },
  "citations": [
    {
      "original": "531 U.S. 98",
      "span": { "start": 32, "end": 43 },
      "status": "verified",
      "verificationSource": "courtlistener",
      "confidence": 1,
      "normalized": "531 U.S. 98",
      "case": {
        "id": 118365,
        "name": "Bush v. Gore",
        "shortName": "Bush",
        "court": "scotus",
        "dateDecided": "2000-12-12",
        "parallelCitations": ["121 S. Ct. 525", "148 L. Ed. 2d 388"],
        "url": "https://www.courtlistener.com/opinion/118365/bush-v-gore/"
      }
    }
  ]
}

Verification statuses

StatusMeaning
verifiedCitation matches a real case in CourtListener (~10M cases)
not_foundNo match found — likely hallucination or typo
multiple_matchesMultiple possible matches — review candidates array
Each citation also includes verificationSource and confidence. CourtListener returns confidence: 1.0, while heuristic fallback uses a score based on the source verification signals.

Parse citations from text

Extract and parse Bluebook components from citation text. Use when you have text and need structured citation data.
Endpoint
POST /legal/v1/citations
curl -X POST https://api.case.dev/legal/v1/citations \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Response

{
  "citations": [
    {
      "original": "410 U.S. 113",
      "span": { "start": 17, "end": 29 },
      "components": {
        "caseName": "Roe v. Wade",
        "volume": 410,
        "reporter": "U.S.",
        "page": 113,
        "year": 1973,
        "court": "scotus"
      },
      "normalized": "410 U.S. 113",
      "found": true
    }
  ]
}

Extract citations from URL

Fetch a document and extract all citations from it. Use when you have a URL and want to analyze what it cites.
Endpoint
POST /legal/v1/citations-from-url
Key difference from citations: This endpoint fetches content from a URL and categorizes citations by type (cases, statutes, regulations). The citations endpoint parses text you provide and returns Bluebook components.
curl -X POST https://api.case.dev/legal/v1/citations-from-url \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Response

{
  "url": "https://www.courtlistener.com/opinion/118365/bush-v-gore/",
  "title": "Bush v. Gore, 531 U.S. 98 (2000)",
  "totalCitations": 15,
  "citations": {
    "cases": [
      { "type": "usReporter", "citation": "478 U.S. 109", "count": 3 },
      { "type": "federalReporter", "citation": "772 F.2d 1444", "count": 1 }
    ],
    "statutes": [
      { "type": "usc", "citation": "3 U.S.C. § 5", "count": 2 }
    ],
    "regulations": []
  },
  "externalLinks": ["https://www.law.cornell.edu/uscode/text/3/5"]
}

Citation types

TypeDescriptionExample
usReporterUS Supreme Court531 U.S. 98
federalReporterFederal Circuit Courts123 F.3d 456
stateReporterState Courts123 Cal.App.4th 456
uscUS Code42 U.S.C. § 1983
cfrCode of Federal Regulations29 C.F.R. § 1910.134

Get full text

Retrieve the full content of a legal document with optional highlights and summary.
Endpoint
POST /legal/v1/full-text
curl -X POST https://api.case.dev/legal/v1/full-text \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

ParameterTypeDescription
urlstringURL of the legal document
maxCharactersnumberMax characters to return (1,000-50,000, default 10,000)
highlightQuerystringQuery to highlight relevant passages
summaryQuerystringQuery to generate a focused summary

Resolve jurisdictions

Convert jurisdiction names to IDs for filtering searches and verification.
Endpoint
POST /legal/v1/jurisdictions
curl -X POST https://api.case.dev/legal/v1/jurisdictions \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Available jurisdictions

IDNameLevel
us-federalUS FederalFederal
us-scotusUS Supreme CourtFederal
californiaCaliforniaState
new-yorkNew YorkState
texasTexasState
All 50 statesState

Common patterns

Verify AI output before display

# Verify the AI-generated text
curl -X POST https://api.case.dev/legal/v1/verify \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "AI generated citation text..."
  }'

# If not found, search for a real alternative
curl -X POST https://api.case.dev/legal/v1/find \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "extracted topic from text"
  }'

Build a citation checker

curl -X POST https://api.case.dev/legal/v1/citations-from-url \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Get full context for a verified citation

# Verify the citation
curl -X POST https://api.case.dev/legal/v1/verify \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "531 U.S. 98"
  }'

# If verified, get full text with highlights
curl -X POST https://api.case.dev/legal/v1/full-text \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.courtlistener.com/opinion/118365/bush-v-gore/",
    "highlightQuery": "holding"
  }'