Three sources dominate programmatic access to federal court data: PACER, the official government system; CourtListener, the nonprofit archive built by the Free Law Project; and DocketLayer, an agent-native API built for automated workflows. They serve different needs. Choosing the wrong one costs time and money.
This article compares all three across the dimensions that matter for developers and AI agents: access model, data freshness, cost, ease of integration, and fit for automated monitoring.
Quick comparison
| Dimension | PACER | CourtListener | DocketLayer |
|---|---|---|---|
| Access model | Account + scraping | Free REST API | Pay-per-query, no account |
| Authentication | Username / password | API token (free) | x402 payment header |
| Cost | $0.10/page at volume | Free (rate-limited) | $0.99/query |
| Data freshness | Real-time | Hours to days lag | ≤15 min polling interval |
| Change detection | No | No | Yes — built in |
| Structured JSON | No — HTML scraping | Partial | Yes — normalized |
| Agent-native | No | No | Yes |
| Document retrieval | Yes | Partial (RECAP only) | No (URLs provided) |
| Full federal coverage | Yes — all 184 courts | Opinions only, partial dockets | 9 courts at launch, expanding |
| Historical data | Yes | Yes — deep archive | No — monitoring only |
PACER: authoritative, but built for humans
PACER
Official federal court access system — Administrative Office of the US Courts
PACER is the authoritative source. Every federal court filing, every docket entry, every document is in PACER. Nothing else has this completeness. If you need the actual source of truth in real time, PACER is it.
The problem is the interface. PACER was designed for human attorneys navigating a web browser in the 1990s. There is no REST API. Programmatic access means scraping HTML — authenticating sessions, parsing inconsistent page structures across 184 court-specific CM/ECF instances, managing session tokens, and paying per page for every document you look at.
For AI agents, PACER is a dependency to be abstracted away, not an interface to be called directly.
Use PACER directly when:
- You need to retrieve actual court documents (PDFs), not just docket metadata
- You are building your own normalization layer and need direct source access
- You need coverage of courts not yet on DocketLayer or CourtListener
- You require real-time access with no intermediary latency
Do not use PACER directly when:
- You need structured JSON without building a scraping layer
- You need change detection — PACER has none
- You are deploying autonomous agents that cannot manage authentication sessions
- Engineering time is the constraint — the PACER integration is non-trivial
CourtListener: excellent for research, limited for monitoring
CourtListener
Free Law Project — nonprofit federal court data archive
CourtListener is the best free source of federal court data. The Free Law Project has built a genuine REST API, a deep historical archive of opinions going back decades, and the RECAP extension which mirrors PACER documents to a public archive. For legal research, academic work, and historical analysis, it is often the right answer.
For real-time monitoring it has significant limitations. CourtListener's data lags PACER by hours to days depending on the court and document type. It focuses on opinions and decisions, not full docket activity. Its change detection capabilities are limited — it was not built as a monitoring system.
Use CourtListener when:
- You need historical opinion data and case law archives
- You are doing research or analysis that does not require real-time data
- Cost is the primary constraint — CourtListener is free at reasonable volumes
- You need access to RECAP-mirrored documents without paying PACER fees
Do not use CourtListener when:
- You need to know about filings within minutes or hours of them appearing
- You are monitoring active cases where timing of docket changes matters
- You need structured change detection built into the query response
- You are building autonomous agent workflows that pay per result
DocketLayer: built for agents, not humans
DocketLayer
Agent-native docket monitoring API
DocketLayer was built for one specific use case: autonomous AI agents that need to monitor federal court dockets and react to changes. The entire API is designed around this workflow — submit a case ID and a timestamp, get back a structured JSON response telling you exactly what changed. No session management, no HTML parsing, no polling logic to write.
Payment is via the x402 protocol, embedded directly in the HTTP request as a USDC transaction. There is no account to create, no subscription to manage, and no API key to store. The agent pays $0.99 and gets a result. The transaction is the authentication.
Use DocketLayer when:
- You are deploying autonomous agents that need to monitor active federal cases
- You need structured change detection returned as part of the query response
- You want to avoid building and maintaining a PACER scraping layer
- Your agent has a funded wallet and can execute x402 payments programmatically
- You need a predictable, per-query cost model with no subscription overhead
Do not use DocketLayer when:
- You need to retrieve actual court documents — DocketLayer provides URLs, not documents
- You need historical data going back years — DocketLayer is a monitoring service, not an archive
- You need coverage of courts not yet on the roadmap — check /coverage first
- Your infrastructure is not set up for x402 stablecoin payments
Choosing the right tool
The three services are not mutually exclusive. Many production workflows use more than one.
For active litigation monitoring by AI agents: DocketLayer. Real-time change detection, structured JSON, no session management, agent-native payment model.
For legal research, historical analysis, or case law retrieval: CourtListener. Deep archive, free API, well-documented, and RECAP makes document retrieval cheaper than PACER.
For document retrieval or courts not yet covered elsewhere: PACER. Authoritative and complete, but requires building your own integration layer.
For comprehensive production systems: DocketLayer for real-time monitoring signals + CourtListener for historical context + PACER credentials standing by for document retrieval when needed.
Cost comparison at scale
The cost calculus differs significantly depending on workflow volume and type.
At low query volumes — tens of queries per day — CourtListener is effectively free and PACER's $0.10/page fees are negligible. DocketLayer at $0.99/query is more expensive than either for pure research workloads.
At monitoring scale — thousands of case checks per day — the picture changes. PACER's per-page fees compound quickly if you are retrieving docket sheets repeatedly to check for changes. CourtListener's rate limits constrain high-frequency polling. DocketLayer's $0.99 flat fee covers the change detection logic that would otherwise require multiple PACER queries to replicate: one to check for new entries, parsing to identify changes, another to retrieve details. For agents with a clear per-query value proposition, $0.99 is often cheaper than the engineering cost of replicating this logic against PACER.