A fully-searchable and accessible archive of court data including growing repositories of opinions, oral arguments, judges, judicial financial records, and federal filings.
This PR introduces a new count=on query parameter to our paginated API endpoints. When this parameter is included in a request, the API returns only the total count of items matching the query filters, without including any result data.
If no count=on is added to the request, a count key is now included in the response just like in v3, but instead of providing the count immediately, it provides a URL that points to the count endpoint for the current query parameters to guide users on how to obtain the total count if needed.
V4 removed the count due to the overhead of counting huge querysets in each request, which is why we're adding this tweaked version of the count in the response so the users have access to the information if needed without reintroducing the overhead.
Resolves #4506
This PR introduces a new
count=on
query parameter to our paginated API endpoints. When this parameter is included in a request, the API returns only the total count of items matching the query filters, without including any result data.If no
count=on
is added to the request, a count key is now included in the response just like in v3, but instead of providing the count immediately, it provides a URL that points to the count endpoint for the current query parameters to guide users on how to obtain the total count if needed.V4 removed the count due to the overhead of counting huge querysets in each request, which is why we're adding this tweaked version of the count in the response so the users have access to the information if needed without reintroducing the overhead.
Also updated docs to reflect these changes: