---
name: courtlistener-api-ingestion
description: "How to get Free Law Project CourtListener API data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load the keyless CourtListener court directory into Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/courtlistener-api
Provider: https://www.courtlistener.com/help/api/
Checked against the provider's documentation: 2026-11-02

## Access
- Observed 2026-11-02: the v4 court-directory endpoint returned JSON without an account or token.
- Create a free account and token for case-law, opinion and other authenticated endpoints.

## Request
```bash
curl -H 'Accept: application/json' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) SignalLabCheck/1.0' 'https://www.courtlistener.com/api/rest/v4/courts/?page_size=25'
```

## Format
Paginated JSON court records with stable court ID, names, jurisdiction code, dates, status, parent and appellate relationships, PACER fields and provider URLs.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""CourtListener public court directory -> pandas -> Parquet. No key."""
import requests
import pandas as pd

URL = "https://www.courtlistener.com/api/rest/v4/courts/"
headers = {
    "Accept": "application/json",
    "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) SignalLabCheck/1.0",
}
response = requests.get(URL, params={"page_size": 25}, headers=headers, timeout=60)
response.raise_for_status()
payload = response.json()
columns = [
    "id", "full_name", "short_name", "jurisdiction",
    "start_date", "end_date", "in_use", "url",
]
df = pd.DataFrame(payload["results"])[columns]
df["start_date"] = pd.to_datetime(df["start_date"], errors="coerce")
df["end_date"] = pd.to_datetime(df["end_date"], errors="coerce")
df.to_parquet("courtlistener_courts.parquet", index=False)
print(len(df), "courts of", payload["count"], "records;",
      int(df["in_use"].sum()), "marked in use")
```
Run by us on 2026-11-02 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 20 courts of 3359 records; 19 marked in use

## Limits
- Rate limit: 5 requests per minute, 50 requests per hour and 125 requests per day for default authenticated users.
- Endpoint permissions differ; the checked courts endpoint was keyless, while opinion and cluster endpoints required authentication.
- Follow the next URL in paginated responses rather than constructing page numbers from the count.

## Quirks
- Court IDs are more stable than names; keep id for joins and retain jurisdiction as the provider code.
- start_date and end_date describe the court institution, while date_modified records API metadata changes.
- Case-law and RECAP endpoints have nested relationships and different permissions from the court directory.

## Terms and attribution
- Court records can contain third-party copyrighted material even when judicial opinions and filings are generally public domain.
- The service cannot be used for consumer-reporting purposes covered by the FCRA, and credentials cannot be shared or pooled.
- A product or team needing shared access must arrange a commercial agreement with Free Law Project.
- Terms page: https://wiki.free.law/c/terms/courtlistener/courtlistenercom-terms-of-service-and-policies

## Sources
- https://wiki.free.law/c/courtlistener/help/api/rest/v4/rest-api-v47: "By default, authenticated users may make up to **5 requests per minute**, **50 requests per hour**, and **125 requests per day**."
- https://wiki.free.law/c/courtlistener/help/data-coverage/case-law: "we have every legal opinion from Harvard University's law library, going back over 365 years"
- https://wiki.free.law/c/courtlistener/help/data-coverage/federal-cases-and-filings: "We regularly scrape these pages for each court, ensuring that we collect basic metadata for all new District and Bankruptcy cases shortly after they are filed."
- https://wiki.free.law/c/terms/courtlistener/courtlistenercom-terms-of-service-and-policies: "judicial opinions, motions, and other filings are generally in the public domain"

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
