Scrape PACER with a JSON API. This repo has working Python examples for DataGuru's PACER scraper APIs: PACER Docket Details and PACER Docket Search.
DataGuru runs the scraping, proxies, retries and parsing, and returns clean JSON. You pay only for successful requests, from $0.0012 per request, out of a prepaid balance: no subscription. New accounts get $1.00 of free credit.
| API | What it returns | Price | Page |
|---|---|---|---|
| PACER Docket Details | Get a US federal court docket from PACER records in the free RECAP archive, with case name, docket number, court and the 30 most recent docket entries, their filing dates, docket text and document links. | $0.0022 | https://dataguru.cc/apis/pacer-docket-details/ |
| PACER Docket Search | Search US federal court filings from PACER records in the free RECAP archive by keyword, court, case name, docket number, party or filing date and get up to 20 of the newest matching documents with case names, courts, filing dates, text excerpts and docket links. | $0.0012 | https://dataguru.cc/apis/pacer-docket-search/ |
- Create a free account and an API key at dashboard.dataguru.cc.
- Install and run:
git clone https://github.com/dataguru-cc/pacer-scraper-api.git
cd pacer-scraper-api
pip install -r requirements.txt
export DATAGURU_API_KEY="your key"
python examples/sdk_example.py pacer-docket-detailsEvery example covers all 2 PACER APIs. Pass an API name to run just one; with no name each script runs them all, and each call is billed at the price above.
| File | Style | Run |
|---|---|---|
examples/sdk_example.py |
DataGuru Python SDK (pip install dataguru-sdk), one function per API, saves JSON to output/ |
python examples/sdk_example.py |
examples/requests_example.py |
Plain requests, synchronous |
python examples/requests_example.py |
examples/async_example.py |
asyncio + httpx, concurrent with a limit |
python examples/async_example.py |
examples/scrapy_spider.py |
Scrapy spider, items to JSON/CSV | scrapy runspider examples/scrapy_spider.py -O pacer.json |
All requests use the header Authorization: Api-Key YOUR_API_KEY. Errors return {"success": false, "error": {"code", "message", "request_id"}}, with HTTP 402 when the balance runs out and 429 (with Retry-After) when rate limited. Failed requests are not charged.
Get a US federal court docket from PACER records in the free RECAP archive, with case name, docket number, court and the 30 most recent docket entries, their filing dates, docket text and document links.
- Endpoint:
POST https://api.dataguru.cc/api/v1/pacer/dockets/details - Price: $0.0022 per successful request ($2.20 per 1,000)
- Rate limit: 60 requests/minute
- Page and live playground: https://dataguru.cc/apis/pacer-docket-details/
- Documentation: https://dataguru.cc/documentation/pacer-docket-details/
| Parameter | Type | Required | Description |
|---|---|---|---|
docket_url |
string | yes | RECAP docket URL from PACER Docket Search (e.g. https://www.courtlistener.com/docket/4214664/national-veterans-legal-services-program-v-united-states/) or its numeric docket ID. |
Response fields: docket_id, case_name, docket_number, court_id, docket_url, latest_entry_date, source, returned_entries, free_documents, entries, error, plus _metadata
curl -X POST "https://api.dataguru.cc/api/v1/pacer/dockets/details" \
-H "Authorization: Api-Key $DATAGURU_API_KEY" \
-H "Content-Type: application/json" \
-d '{"docket_url": "https://www.courtlistener.com/docket/4214664/national-veterans-legal-services-program-v-united-states/"}'Response schema
Values are type placeholders from the API's published schema, not real data.
{
"docket_id": 0,
"case_name": "string",
"docket_number": "string",
"court_id": "1234567890",
"docket_url": "https://example.com/...",
"latest_entry_date": "2026-01-01T12:00:00Z",
"source": "string",
"returned_entries": 0,
"free_documents": 0,
"entries": [
{
"entry_number": 0,
"date_filed": "string",
"description": "string",
"document_url": "https://example.com/...",
"free_document": false,
"entry_url": "https://example.com/..."
}
],
"error": "string",
"_metadata": {
"request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
"execution_time_ms": 842,
"endpoint": "PACER Docket Details",
"mode": "live",
"format": "json",
"timestamp": "2026-01-01T12:00:00+00:00"
}
}Search US federal court filings from PACER records in the free RECAP archive by keyword, court, case name, docket number, party or filing date and get up to 20 of the newest matching documents with case names, courts, filing dates, text excerpts and docket links.
- Endpoint:
POST https://api.dataguru.cc/api/v1/pacer/dockets/search - Price: $0.0012 per successful request ($1.20 per 1,000)
- Rate limit: 60 requests/minute
- Page and live playground: https://dataguru.cc/apis/pacer-docket-search/
- Documentation: https://dataguru.cc/documentation/pacer-docket-search/
| Parameter | Type | Required | Description |
|---|---|---|---|
case_name |
string | no | Only cases whose name matches this text, e.g. "Apple". |
court |
string | no | Only these courts, as comma-separated court IDs, e.g. "nysd" or "cand,txwd". |
docket_number |
string | no | Only the case with this docket number, e.g. "1:16-cv-00745". |
filed_after |
string | no | Only documents filed on or after this date (YYYY-MM-DD). |
filed_before |
string | no | Only documents filed on or before this date (YYYY-MM-DD). |
limit |
integer | no | Maximum number of filings to return (1-20, newest first). For older filings, set filed_before. Default: 20. |
nature_of_suit |
string | no | Only cases of this nature of suit, e.g. "Patent" or "Civil Rights". |
party_name |
string | no | Only cases with a party of this name, e.g. "Amazon.com, Inc.". |
query |
string | no | Search keywords in the filed documents, e.g. "motion to dismiss". Supports quoted phrases and AND/OR. Optional when case_name, docket_number or party_name is set. |
Response fields: query, filters, sort, source, returned_results, results, error, plus _metadata
curl -X POST "https://api.dataguru.cc/api/v1/pacer/dockets/search" \
-H "Authorization: Api-Key $DATAGURU_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "motion to dismiss", "limit": 5}'Response schema
Values are type placeholders from the API's published schema, not real data.
{
"query": "string",
"filters": {
"court": "string",
"case_name": "string",
"docket_number": "string",
"party_name": "string",
"nature_of_suit": "string",
"filed_after": "string",
"filed_before": "string"
},
"sort": "newest",
"source": "string",
"returned_results": 0,
"results": [
{
"case_name": "string",
"court": "string",
"date_filed": "string",
"docket_id": 0,
"document_number": 0,
"attachment_number": 0,
"snippets": [
"string"
],
"document_url": "https://example.com/...",
"docket_url": "https://example.com/..."
}
],
"error": "string",
"_metadata": {
"request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
"execution_time_ms": 842,
"endpoint": "PACER Docket Search",
"mode": "live",
"format": "json",
"timestamp": "2026-01-01T12:00:00+00:00"
}
}- Python SDK and examples for all DataGuru APIs: github.com/dataguru-cc/dataguru-python (docs)
- Every API, with a live playground: https://dataguru.cc/apis/
- Use DataGuru from Claude, ChatGPT or Cursor through the MCP server: https://dataguru.cc/mcp/
- Run thousands of inputs from a CSV at half price with batch jobs: https://dataguru.cc/documentation/
- Other scraper APIs: 1688, Airbnb, Alibaba, AliExpress, Amazon, arXiv, ASOS, Best Buy, Booking.com, Brave Search, CA State Bar, Capterra, CoinGecko, CoinMarketCap, Companies House, Costco, CourtListener, Crunchbase, Discord, DoorDash, eBay, Etsy, Expedia, Fiverr, Flipkart, Glassdoor, Google Flights, Google Patents, Google Scholar, Google Search, Grubhub, Home Depot, Instagram, Investing.com, Justia, Kayak, Kick, Lazada, MarketWatch, Mercado Libre, Monster, OpenCorporates, OpenTable, PitchBook, PubMed, Reddit, Redfin, Resy, Rightmove, SEC EDGAR, Seeking Alpha, Shopee, Skyscanner, Target, TikTok, TradingView, TripAdvisor, Trulia, TrustRadius, Twitch, Uber Eats, Upwork, Vrbo, Walmart, Wayfair, X (Twitter), Yahoo Finance, YouTube, Zillow, ZoomInfo, Zoopla
The example code is MIT licensed. Use of the DataGuru API is subject to the terms of service.