CourtListener APIcourtlistener.com ↗
Search 471 jurisdictions of court opinions and PACER RECAP docket documents via the CourtListener API. Returns case metadata, parties, attorneys, and text snippets.
What is the CourtListener API?
The CourtListener API provides two endpoints covering case law and federal docket data across 471 jurisdictions. The search_opinions endpoint returns case metadata, judge names, citations, and opinion text snippets from published court opinions, while search_recap_documents surfaces PACER docket entries with parties, attorneys, and nested document records from the RECAP archive — all queryable with Boolean full-text search and date range filters.
curl -X GET 'https://api.parse.bot/scraper/88233e56-1cfa-4862-9b8d-2c01f691ee9e/search_opinions?page=1&query=antitrust&order_by=relevance&filed_after=2026-04-15&filed_before=2026-07-14' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace courtlistener-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: CourtListener SDK — bounded, re-runnable; every call capped."""
from parse_apis.courtlistener_com_api import CourtListener, OpinionOrder, RecapOrder, InvalidInput
client = CourtListener()
# Search for recent antitrust opinions, sorted newest first.
for opinion in client.opinions.search(query="antitrust", order_by=OpinionOrder.DATE_FILED_DESC, limit=3):
print(opinion.case_name, opinion.date_filed, opinion.court)
# Drill into RECAP docket documents for antitrust filings.
for docket in client.dockets.search(query="antitrust", order_by=RecapOrder.DATE_FILED_DESC, limit=2):
print(docket.case_name, docket.docket_number, docket.court)
for doc in docket.recap_documents:
print(" ", doc.entry_number, doc.short_description, doc.page_count)
# Typed error handling: catch invalid input.
try:
client.opinions.search(query="antitrust", order_by=OpinionOrder.RELEVANCE, limit=1).first()
except InvalidInput as e:
print("invalid input:", e)
print("exercised: opinions.search, dockets.search")
Full-text search over published court opinions (case law). Returns case metadata, judge, citations, and opinion snippets. Results are ordered by the chosen sort and auto-iterated across cursor pages.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for results pagination. |
| queryrequired | string | Full-text search query (supports Boolean operators). |
| order_by | string | Sort order for results. |
| filed_after | string | ISO date (YYYY-MM-DD). Only return opinions filed on or after this date. |
| filed_before | string | ISO date (YYYY-MM-DD). Only return opinions filed on or before this date. |
{
"type": "object",
"fields": {
"count": "Total number of matching opinions",
"results": "Array of opinion records with case metadata and opinion text snippets"
},
"sample": {
"count": 125,
"results": [
{
"court": "District Court, District of Columbia",
"judge": "Judge Amit P. Mehta",
"status": "Published",
"citation": [],
"court_id": "dcd",
"opinions": [
{
"id": 11394905,
"type": "combined-opinion",
"cites": [
109586,
185398
],
"snippet": "UNITED STATES DISTRICT COURT...",
"author_id": 2209,
"per_curiam": false,
"download_url": "https://ecf.dcd.uscourts.gov/cgi-bin/show_public_doc?2024cv2788-27"
}
],
"case_name": "Sensory, Inc. v. Google LLC",
"docket_id": 73610386,
"cite_count": 0,
"cluster_id": 10927366,
"date_filed": "2026-07-13",
"absolute_url": "/opinion/10927366/sensory-inc-v-google-llc/",
"docket_number": "Civil Action No. 2024-2788"
}
]
}
}About the CourtListener API
Opinion Search
The search_opinions endpoint accepts a required query string that supports Boolean operators, allowing targeted searches like "Fourth Amendment" AND warrant. You can narrow results using filed_after and filed_before (both in YYYY-MM-DD format) and control ordering with order_by. Each record in the results array includes case metadata (court, judge, citations) and opinion text snippets. The count field reports total matches across all pages, and pagination is handled via the page parameter.
RECAP Docket Search
The search_recap_documents endpoint queries the RECAP archive — a public mirror of PACER federal court filings. Results include docket-level records with parties, attorneys, and nested RECAP document entries that contain text snippets from the underlying filings. The response also returns a document_count field reflecting the total number of individual documents matched across all dockets, which is distinct from the count of matching dockets. The same Boolean query syntax, date filters, and pagination parameters apply.
Date Filtering and Pagination
Both endpoints share a consistent parameter surface: filed_after and filed_before filter by filing date, order_by controls sort order, and page steps through result sets. This makes it straightforward to build time-bounded queries — for example, retrieving all opinions in a jurisdiction filed within a specific calendar year or tracking newly filed RECAP dockets over a rolling window.
The CourtListener API is a managed, monitored endpoint for courtlistener.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when courtlistener.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official courtlistener.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitor newly filed federal dockets on a specific topic using
search_recap_documentswithfiled_afterand a Boolean query. - Build a case law citation tracker by extracting citation fields from
search_opinionsresults. - Identify attorneys and parties in PACER cases by parsing the
resultsarray fromsearch_recap_documents. - Filter opinions by judge name to research judicial patterns across a date range.
- Aggregate opinion counts by date range using the
countfield fromsearch_opinionsfor trend analysis. - Retrieve opinion text snippets for legal NLP pipelines using Boolean queries on
search_opinions. - Cross-reference docket document counts against docket counts using
document_countvscountfromsearch_recap_documents.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does CourtListener have an official developer API?+
What does the `search_recap_documents` endpoint actually return, and how does it differ from `search_opinions`?+
search_recap_documents returns docket-level records from the RECAP archive of PACER federal court filings, including parties, attorneys, and nested document entries with text snippets. search_opinions returns published case law records with case metadata, judge, citations, and opinion text snippets. RECAP data covers federal district and appellate filings that may not have published opinions; the two endpoints draw from different underlying collections.Does the API return full opinion text, or only snippets?+
results array for search_opinions includes opinion snippets, and search_recap_documents includes text snippets within nested document records. Full text retrieval is not covered by these endpoints. You can fork this API on Parse and revise it to add an endpoint that fetches the full opinion or document text by ID.Can I filter results by specific court or jurisdiction?+
query, filed_after, filed_before, order_by, and page as inputs. Filtering by a specific court ID or jurisdiction slug is not exposed as a dedicated parameter. You can fork this API on Parse and revise it to add jurisdiction or court-specific filter parameters.How does pagination work across large result sets?+
count field with the total number of matches and support a page integer parameter to step through results. For very large queries the count may run into hundreds of thousands of records; iterate page until the results array is empty to consume all pages. There is no cursor token — pagination is offset-based via the page parameter.