CourtListener TypeScript Types¶
Type-safe access to millions of court opinions and legal documents.
Installation¶
Usage¶
import type { Court, Opinion, SearchResult } from '@types/lawforge__courtlistener';
const response = await fetch('https://www.courtlistener.com/api/rest/v4/courts/scotus/');
const court: Court = await response.json();
console.log(court.full_name); // "Supreme Court of the United States"
What's Included¶
| Type | Description |
|---|---|
| Courts | Federal, state, and specialized court metadata |
| Search Results | Case search responses and filtering |
| Opinions | Judicial opinions and clusters |
| Dockets | Case filings and docket entries |
| Citations | Citation lookups and networks |
| Utility Types | Enums, IDs, and helper types |
Features¶
- Complete Coverage — All CourtListener API v4 endpoints
- Strict Types — Accurate optional/required properties
- Documentation — JSDoc comments on every property
- Modern — ESM-first, TypeScript 4.8+
Requirements¶
- TypeScript 4.8 or higher
- Node.js 18 or higher