-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this is not working ---- collections response is now sorting by lastModified date. #24
Comments
"message": "Error page size + offset must be less than maxoffset: 10000" |
@ganeshkharad2 - The API has a 10,000 item limit for the collections request, so if your count is higher than that, you should consider splitting your request range using both https://github.com/usgpo/api#collection-update The collections response is sorted by each package's so, you could use: https://api.govinfo.gov/collections/CHRG/1990-01-01T00:00:00Z/?offset=9899&pageSize=100&api_key=DEMO_KEY
What I would recommend would be to construct the request to start with that one - you may need to slightly adjust to get only 10k results, as multiple packages may be published at the same time. which has 9831 results. You could then use the Then you could do a further set of requests until you get to the total number of results. Based on the base collections request, there are 27858 total packages: https://api.govinfo.gov/collections?api_key=DEMO_KEY
Alternatively, if you want to retrieve the full set of CHRG, you could use our sitemaps to identify all packages currently in the system, using the packageid as identified in the https://www.govinfo.gov/sitemap/CHRG_sitemap_index.xml https://www.govinfo.gov/sitemap/CHRG_2018_sitemap.xml
|
collections response is now sorting by lastModified date.
https://api.govinfo.gov/collections/CHRG/1990-01-01T00:00:00Z/?offset=10000&pageSize=100&api_key=DEMO_KEY
snippet:
Originally posted by @jonquandt in #19 (comment)
The text was updated successfully, but these errors were encountered: