After several years of planning and development, we have released v4 of our APIs.
This upgrade responds to feedback we have received over the years and should be much better for our users — faster, more featureful, more scalable, and more accurate.
Unfortunately, we couldn't make these new APIs completely backwards compatible, so this guide explains what's new.
Questions about this migration can be sent to our GitHub Discussions forum or to our contact form.
We prefer that questions be posted in the forum so they can help others. If you are a private organization posting to that forum, we will avoid sharing details about your organization.
Ask in GitHub Discussions Send us a Private Message
v4 of the API is available now and is the default version for anybody creating new systems. Before its full release, a number of organizations beta tested it.
All of our APIs except for our search API are powered by our database. We do not have plans at present to deprecate any of these APIs, but we'd like to remove them someday and urge you to migrate to v4 as soon as possible so we can do that.
That said, the v3 Search API is currently powered by Solr while v4 is powered by ElasticSearch. In nine weeks we aim to switch v3 so it uses ElasticSearch too. This will change v3 in small backwards incompatible ways, but will allow us to continue supporting it even after turning off our Solr server.
If you are a v3 Search API user, you will soon get an email from us to communicate and discuss timelines.
You might be fine. Most of the database and search APIs are only changing slightly, and v3 will be supported for some period of time. But you should read this guide to see if any changes are needed to your application.
The remainder of this guide is in three sections:
We're very excited to be releasing v4 of our APIs. We hope you will review these changes so we can all have a smooth transition.
Our database-powered APIs now support cursor-based pagination. This allows you to crawl very deeply in the API. In v3, any page past 100 was blocked.
v4 of the Search API is powered by ElasticSearch instead of Solr. This is a huge upgrade to our API and search engine.
Some improvements include:
For more details, please see our blog.
We cannot continue running Solr forever, but we can do our best to support v3 of the API. To do this, on November 25, 2024, v3 of the Search API will be upgraded to use ElasticSearch. We expect this to support most uses, but it will cause some breaking changes, as outlined in this section.
We recommend all users upgrade to v4 of the API, but if that is not possible, please review this section to learn about the upcoming changes to v3 of the search API.
type=r:firm_id:1245 AND party:(United States)
type=r will use a cardinality aggregation to compute the result count, which will have an error of ±6% if results are over 2000.
type=o:date_created field will be added.snippet will change. In the Solr version, it includes content from all fields, while in ElasticSearch it will display only the Opinion text content.
type=o will use a cardinality aggregation to compute the result count, which will have an error of ±6% if results are over 2000 hits.
snippet field currently stores a variety of fields. After the change, it will contain the audio transcription only.
The total count of the results is no longer available in the response. Most users don't need this when using the API, and computing the count for each response slows down the API. If this value is important to your service, let us know so we can discuss adding a new API with this feature.
A new type of error in the v4 API is Invalid Cursor with a 404 status code.
This can happen when GET parameters are changed without getting a fresh cursor parameter. To prevent this error, do not change the GET parameters while maintaining an existing cursor parameter.
next and previous parameters provided in each response. Navigation of the API is exclusively through those keys in each API response.
null, strings return an empty string, and lists return an empty array.
highlight=on in your request.
snippet fields are returned for types o, r, and rd.
type=o and type=ptype=o), and positions are nested within judges in judge results (type=p).
type=r is now for dockets with nested documentstype=r no longer returns a flat list of documents.
Instead, it now returns a list of dockets with up to three matching documents nested within each docket's recap_documents key.
type=rd parameter.
This can be useful for those upgrading from v3 to v4 of the search API.
more_docs field for the docket result will be true.
As in the front end, you can get the remaining documents for a docket by placing a docket ID query like:
type=rd&q=(original query) AND docket_id:XYZ
count is the number of dockets returned. document_count is the number of documents.
type=rd is a new result type for documentstype=rd returns a flat list of PACER documents, and is similar to type=r in v3 of the API.
Results for this type can be queried by any docket fields except the party and attorney fields.
r in v3 and rd in v4 are that all the docket-level fields were removed:
docket_id is still available in the rd type so users can identify the docket and pull additional docket data from the docket API.
entry_date_filed. In r v3, it was a datetime field with PST midnight as the default time.
Now, it's simply a date field.
timestamp field has been moved to the new meta field, which also contains date_created.
type=d still returns docketstype=d returns dockets without nested documents. If all you need in the response is the docket information, this response type will be significantly faster.
You can query document fields with this response type even though they will not be returned.
type=o):
type=o), some type field values have changed:
status field in the case law search results have changed:
snippet field in the case law search results previously included more than one opinion text field.
It now only contains the best text field, based on the following priority and determined by availability:
The following is a full list of date fields that are now date objects (rather than datetime objects, which they were in v3):
r and d:r and rd:entry_date_filed (in type r is available in documents nested within the recap_documents key)o:oa:p:positions key:
caseName fields.
case_name filter and the text query.
detailkey, explaining the reason for the error:
Server Error Code: 500.Internal Server Error. Please try again later or review your query.Not Found Error Code: 404
detail key: Invalid cursor