Comments (2)
"message": "Error page size + offset must be less than maxoffset: 10000"
from api.
@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 startDate
and endDate
.
https://github.com/usgpo/api#collection-update
The collections response is sorted by each package's lastModified
value, starting with the newest first.
so, you could use:
https://api.govinfo.gov/collections/CHRG/1990-01-01T00:00:00Z/?offset=9899&pageSize=100&api_key=DEMO_KEY
to get the last value available there. The last item available for that request would be:
{
"packageId": "CHRG-113hhrg86796",
"lastModified": "2018-07-30T19:11:28Z",
"packageLink": "https://api.govinfo.gov/packages/CHRG-113hhrg86796/summary",
"docClass": "HHRG",
"title": "Changes to the Height Act: Shaping Washington, D.c., for the Future, Part II",
"congress": "113"
}
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 startDate
from the above as the endDate
for a follow-on request.
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
{
"collectionCode": "CHRG",
"collectionName": "Congressional Hearings",
"packageCount": 27858,
"granuleCount": 33
},
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 <loc>
values.
https://www.govinfo.gov/sitemap/CHRG_sitemap_index.xml
https://www.govinfo.gov/sitemap/CHRG_2018_sitemap.xml
<url>
<loc>
https://www.govinfo.gov/app/details/CHRG-115jhrg28355
</loc>
<lastmod>2018-07-02T19:05:01.409Z</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
from api.
Related Issues (20)
- Retrieve CREC documents which have the property "Congress Member Speaking" HOT 1
- Receive "HTTP Error 401: Unauthorized" after 100 scrapes HOT 1
- abdulrahmannabhan HOT 4
- Bulk data API back to 103rd Congress HOT 6
- Missing Bill Text for S3621 HOT 2
- What is the courtCode for Court of Federal Claims Opinions? HOT 4
- Why are the Related bills getting removed and getting added back very frequently HOT 5
- (`/related/*/BILLS`, `/packages/*/summary`): missing text versions HOT 5
- (`packages/CREC-*/granules/*/summary`): missing fields in `members` HOT 11
- readme "signup here" link is dead HOT 1
- (BillStatus): missing legislation HOT 2
- BillStatus missing for bills from congress sessions 107 and older HOT 1
- Packages for BILLS collection not available for congress sessions 102 and older HOT 1
- Search API for STATUTE collection returns different results than govinfo.gov UI HOT 3
- API request to access all congressional reports by the particular committee HOT 6
- Make BILLSUM collection available via API HOT 1
- packages - Add witnesses element for Congressional Hearings HOT 1
- Return 404 response for related service specific relationship where no related documents are available HOT 4
- Set bulkdata collections (BILLSTATUS/ECFR) xmlLinks to use the /xml endpoint instead of referencing bulkdata urls HOT 1
- (BillStatus API): missing `<title>` in S347 of 118th congress HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api.