CourtListener Legal Data Scraper
Pricing
from $4.00 / 1,000 results
Go to Apify Store

CourtListener Legal Data Scraper
Fetch US court data from CourtListener API. Search opinions, dockets, RECAP documents, and oral arguments. Filter by court (SCOTUS, Circuit Courts), date range, and keywords. Get case names, citations, judges, and filing dates. No API key needed.
Pricing
from $4.00 / 1,000 results
Rating
0.0
(0)
Developer

Fortuitous Pirate
Maintained by Community
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
CourtListener Legal Data API Scraper
Fetch legal opinions, dockets, oral arguments, and RECAP documents from the CourtListener REST API v4.
Features
- Search across multiple legal data types:
- Opinions: Federal and state court decisions
- Dockets: Case metadata and filings
- RECAP: PACER documents from the RECAP Archive
- Oral Arguments: Audio recordings of court arguments
- Filter by court, date range, and search terms
- Handles cursor-based pagination automatically
- Respects API rate limits (5000 requests/hour)
Prerequisites
You need a free CourtListener API token:
- Create an account at https://www.courtlistener.com/sign-in/
- Go to your profile to get your API token
Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| apiToken | string | Yes | - | Your CourtListener API token |
| searchType | string | No | opinions | Type: opinions, dockets, recap, oral_arguments |
| query | string | No | - | Search terms (e.g., "first amendment") |
| court | string | No | - | Court code (e.g., "scotus", "ca9") |
| dateAfter | string | No | - | Filed after date (YYYY-MM-DD) |
| dateBefore | string | No | - | Filed before date (YYYY-MM-DD) |
| maxItems | integer | No | 100 | Maximum items to fetch (max 5000) |
| includeFullText | boolean | No | false | Include full opinion text |
Court Codes
Common court codes:
scotus- U.S. Supreme Courtca1throughca11- Circuit Courts of Appealscadc- D.C. Circuitcafc- Federal Circuitnysd- Southern District of New Yorkcacd- Central District of California
Full list: https://www.courtlistener.com/api/rest/v4/courts/
Output Schema
Opinions
{"id": 12345,"absolute_url": "/opinion/12345/case-name/","case_name": "Smith v. Jones","case_name_short": "Smith","court": "Supreme Court of the United States","court_id": "scotus","date_filed": "2024-01-15","author_str": "Roberts","citation_count": 42,"citations": ["123 S. Ct. 456"],"snippet": "...highlighted search match...","download_url": "https://..."}
Dockets
{"id": 67890,"absolute_url": "/docket/67890/case-name/","case_name": "United States v. Defendant","court": "U.S. District Court","court_id": "nysd","docket_number": "1:23-cv-01234","date_filed": "2024-02-01","date_terminated": "2024-06-15","nature_of_suit": "Civil Rights","assigned_to_str": "Judge Name"}
Oral Arguments
{"id": 11111,"absolute_url": "/audio/11111/case-name/","case_name": "Petitioner v. Respondent","court_id": "scotus","date_argued": "2024-03-01","duration": 3600,"download_url": "https://.../audio.mp3","judges": "Roberts, Thomas, Alito..."}
Example Usage
Search Supreme Court opinions about free speech
{"apiToken": "your-token-here","searchType": "opinions","query": "free speech first amendment","court": "scotus","maxItems": 50}
Get recent 9th Circuit decisions
{"apiToken": "your-token-here","searchType": "opinions","court": "ca9","dateAfter": "2024-01-01","maxItems": 100}
Search RECAP for bankruptcy filings
{"apiToken": "your-token-here","searchType": "recap","query": "chapter 11 bankruptcy","maxItems": 200}
API Rate Limits
- 5,000 queries per hour for authenticated users
- The scraper includes a 500ms delay between requests
- Do not create multiple accounts to bypass limits
Local Testing
npm installecho '{"apiToken":"your-token","query":"test","maxItems":5}' > storage/key_value_stores/default/INPUT.jsonnode src/main.jscat storage/datasets/default/*.json