Skip to main content
Build legal research into your application. Search case law by topic, find similar authorities, verify citations, and retrieve full document text—all from authoritative sources.

Capabilities

Legal Research provides a complete toolkit for working with legal sources:
CapabilityMethodWhat it does
Searchlegal.find()Find cases by topic or keyword
Patent searchlegal.patentSearch()Search US patent applications and grants
Trademark lookuplegal.trademarkSearch()Look up US trademark status and details
Discoverlegal.similar()Find semantically similar cases to a source
Verifylegal.verify()Confirm citations exist (catch hallucinations)
Parselegal.citations()Extract Bluebook components from text
Extractlegal.citationsFromUrl()Pull all citations from a document URL
Retrievelegal.fullText()Get full document content with highlights
Researchlegal.research()Deep multi-query research with variations
Resolvelegal.jurisdictions()Convert jurisdiction names to IDs
These methods work together to create credible legal workflows—where every citation is verified and every source is retrievable.

Quick start

import Casedev from 'casedev';

const client = new Casedev({ apiKey: process.env.CASEDEV_API_KEY });

// Search for cases on a topic
const results = await client.legal.find({
  query: 'qualified immunity excessive force',
  jurisdiction: 'us-federal',
});

console.log(`Found ${results.found} cases`);
for (const candidate of results.candidates) {
  console.log(`${candidate.title}: ${candidate.url}`);
}

// Find similar cases to expand research
const similar = await client.legal.similar({
  url: results.candidates[0].url,
  numResults: 5
});

// Verify a citation before citing it
const verification = await client.legal.verify({
  text: '531 U.S. 98'
});

if (verification.summary.verified > 0) {
  const citation = verification.citations[0];
  console.log(`Verified: ${citation.case.name}`);  // "Bush v. Gore"
}

// Get full document text
const doc = await client.legal.fullText({
  url: 'https://www.courtlistener.com/opinion/118365/bush-v-gore/',
  highlightQuery: 'equal protection'
});

Why verify citations?

AI models hallucinate. They confidently cite “Smith v. Jones, 542 U.S. 123”—a case that doesn’t exist. If your users trust those citations, they file briefs with fake authorities and face sanctions. Legal Research solves this by verifying every citation against authoritative databases:
┌─────────────────────────────────────────────────────────────────┐
│  AI generates: "Miranda v. Arizona, 384 U.S. 436"               │
│                           ↓                                     │
│  legal.verify("384 U.S. 436")                                   │
│  → status: "verified", case: "Miranda v. Arizona"               │
│                           ↓                                     │
│  Safe to cite with URL to authoritative source                  │
└─────────────────────────────────────────────────────────────────┘
StatusMeaningAction
verifiedCitation matches a real caseSafe to cite
not_foundNo match in databaseLikely hallucination—search for alternatives
multiple_matchesMultiple possible matchesReview candidates manually

Building credible workflows

The real power comes from combining methods. Here’s how to build a research workflow where every citation is verified and every source is retrievable:
async function researchWithVerification(topic: string) {
  // 1. Deep search with multiple query variations
  const research = await client.legal.research({
    query: topic,
    additionalQueries: [
      `${topic} Supreme Court`,
      `${topic} leading case`,
    ],
    numResults: 15
  });

  // 2. Verify each candidate before presenting to user
  const verified = [];
  for (const candidate of research.candidates) {
    const result = await client.legal.verify({ text: candidate.title });
    if (result.summary.verified > 0) {
      verified.push({
        ...candidate,
        citation: result.citations[0]
      });
    }
  }

  // 3. Expand research with similar cases
  if (verified.length > 0) {
    const similar = await client.legal.similar({
      url: verified[0].url,
      numResults: 5
    });
    return { primary: verified, related: similar.similarSources };
  }

  return { primary: verified, related: [] };
}
This pattern ensures your users only see real cases with working links—never hallucinated authorities.

Endpoints

Supported sources

Search and verification covers authoritative legal databases:
SourceContent
CourtListener~10M court opinions
Federal CourtsSupreme Court, Circuit Courts, District Courts
State CourtsAll 50 states via regional reporters
StatutesUS Code (USC) citations
RegulationsCode of Federal Regulations (CFR)
Cornell LawStatutes, regulations, legal encyclopedias

Pricing

MethodPriceUse case
legal.verify()FreeVerify AI-generated citations
legal.citations()FreeParse citations from text
legal.jurisdictions()FreeResolve jurisdiction names
legal.citationsFromUrl()$0.01/requestExtract citations from document URL
legal.fullText()$0.01/requestRetrieve document content
legal.find()$0.01/requestSearch for cases
legal.similar()$0.01/requestFind related cases
legal.trademarkSearch()$0.005/requestLook up trademark status
legal.research()$0.05/requestDeep multi-query research

Next steps