CourtListener Opinion Search
POST /api/v1/courtlistener/opinions/search
Search CourtListener court opinions by keyword, court, judge, case name or filing date and get up to 20 of the newest matches with case names, courts, filing dates, text excerpts and links.
Overview
Search CourtListener court opinions by keyword, court, judge, case name or filing date and get up to 20 of the newest matches with case names, courts, filing dates, text excerpts and links.
POST /api/v1/courtlistener/opinions/search
Method: POST Path: /api/v1/courtlistener/opinions/search Category: Research & Public Records
Request Parameters
Endpoint Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
| case_name | string | Optional | Only cases whose name matches this text, e.g. "microsoft". |
| court | string | Optional | Only these courts, as comma-separated CourtListener court IDs, e.g. "scotus" or "ca9,ca2". |
| filed_after | string | Optional | Only opinions filed on or after this date (YYYY-MM-DD). |
| filed_before | string | Optional | Only opinions filed on or before this date (YYYY-MM-DD). |
| judge | string | Optional | Only opinions by a judge with this name, e.g. "posner". |
| limit | integer | Optional | Maximum number of results to return (1-20, newest first). For older matches, set filed_before. |
| query | string | Required | Search keywords, e.g. "antitrust". Supports quoted phrases and AND/OR. |
| status | string | Optional | Precedential status - published, unpublished or all. |
Request Example
CourtListener Opinion Search Request Examples
curl -X POST "https://api.dataguru.cc/api/v1/courtlistener/opinions/search" \ -H "Authorization: Api-Key YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"case_name": "example", "court": "example", "filed_after": "example", "filed_before": "example", "judge": "example", "limit": "20", "query": "example", "status": "published"}'
Response Example
200 OK
Typical 200 OK JSON response structure with envelope metadata.
{ "query": "string", "filters": { "court": "string", "filed_after": "string", "filed_before": "string", "status": "published", "case_name": "string", "judge": "string" }, "sort": "newest", "source": "string", "returned_results": 0, "results": [ { "cluster_id": 0, "title": "string", "court": "string", "date_filed": "string", "snippets": [ "string" ], "url": "https://example.com/..." } ], "error": "string", "_metadata": { "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e", "execution_time_ms": 842, "endpoint": "CourtListener Opinion Search", "mode": "live", "format": "json", "timestamp": "2026-01-01T12:00:00+00:00" } }
Response Schema
Fields returned in a successful response. Nested fields use dot notation and `[]` marks items of a list. Fields that are not required can be missing or `null` when the source does not provide them. Every response also includes a `_metadata` block.
Response Fields
| Field | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search keywords that were searched. |
| filters | object | Yes | Filters applied; unused text filters are empty. |
| filters.court | string | No | Comma-separated court IDs, or empty. |
| filters.filed_after | string | No | Earliest filing date (YYYY-MM-DD), or empty. |
| filters.filed_before | string | No | Latest filing date (YYYY-MM-DD), or empty. |
| filters.status | string | No | Precedential status filter. |
| filters.case_name | string | No | Case name filter, or empty. |
| filters.judge | string | No | Judge name filter, or empty. |
| sort | string | Yes | Result order: most recently filed first. |
| source | string | Yes | Attribution for the data. |
| returned_results | integer | Yes | Number of opinions returned. |
| results | array<object> | Yes | |
| results[].cluster_id | integer | Yes | CourtListener ID of the decision. |
| results[].title | string | Yes | Case name. |
| results[].court | string | Yes | Full name of the court. |
| results[].date_filed | string | Yes | Filing date (YYYY-MM-DD), or empty when unknown. |
| results[].snippets | array<string> | Yes | Short excerpts of the opinion text around the match. |
| results[].url | string | Yes | CourtListener opinion page URL. |
| error | string | No | Present only when the search failed. |
Asynchronous Requests
Long-running requests can be processed in the background. Add `?async=true` (or the `Prefer: respond-async` header) to receive a `job_id` immediately, then poll the job until its status is `COMPLETED`.
Async Workflow
curl -X POST "https://api.dataguru.cc/api/v1/courtlistener/opinions/search?async=true" \ -H "Authorization: Api-Key YOUR_API_KEY" # 202 Accepted { "success": true, "status": "SUBMITTED", "job_id": "0ca215ce-244f-4b28-b481-dc1b551983c8", "status_url": "/api/v1/jobs/0ca215ce-244f-4b28-b481-dc1b551983c8/" }
Batch Processing
To run many requests at half price, upload them as a CSV file: one row per request, with the parameter names above as the header row. Rows run in the background within 24 hours (up to 7 days for large files) and each successful row costs 50% of the price below. Poll /api/v1/batches/{batch_id}/ for progress and download results.json when it has finished. See the Batch Processing guide for details.
Batch Workflow
query,case_name,court,filed_after,filed_before,judge,limit,status example,example,example,example,example,example,20,published
Pricing & Rate Limits
Endpoint Pricing
$0.0012 / per successful request (USD)
Consumed per successful call: 1 request unit(s), 1 credit(s).
Endpoint Rate Limits
Common Errors
Common HTTP Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | A required parameter is missing or malformed. |
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 402 | INSUFFICIENT_BALANCE | Your balance cannot cover this request. |
| 403 | ENDPOINT_DISABLED | This endpoint is currently unavailable. |
| 405 | METHOD_NOT_ALLOWED | The endpoint was called with the wrong HTTP method. |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests. See the Retry-After header. |
| 502 | PROVIDER_ERROR | The upstream data source failed. Retry with exponential backoff. |