CourtListener Legal Data Scraper avatar
CourtListener Legal Data Scraper

Pricing

from $4.00 / 1,000 results

Go to Apify Store
CourtListener Legal Data Scraper

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

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:

  1. Create an account at https://www.courtlistener.com/sign-in/
  2. Go to your profile to get your API token

Input Parameters

ParameterTypeRequiredDefaultDescription
apiTokenstringYes-Your CourtListener API token
searchTypestringNoopinionsType: opinions, dockets, recap, oral_arguments
querystringNo-Search terms (e.g., "first amendment")
courtstringNo-Court code (e.g., "scotus", "ca9")
dateAfterstringNo-Filed after date (YYYY-MM-DD)
dateBeforestringNo-Filed before date (YYYY-MM-DD)
maxItemsintegerNo100Maximum items to fetch (max 5000)
includeFullTextbooleanNofalseInclude full opinion text

Court Codes

Common court codes:

  • scotus - U.S. Supreme Court
  • ca1 through ca11 - Circuit Courts of Appeals
  • cadc - D.C. Circuit
  • cafc - Federal Circuit
  • nysd - Southern District of New York
  • cacd - 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 install
echo '{"apiToken":"your-token","query":"test","maxItems":5}' > storage/key_value_stores/default/INPUT.json
node src/main.js
cat storage/datasets/default/*.json

Resources