Setup
Put them in your environment or
.env; Data APIs covers the other ways.
Notes
- Rate limits per key (rolling hour): 36,000 requests per hour, 1,200 per minute, 40 per second; 429 when over. DEMO_KEY is far lower.
- Lists page with offsetMark: send ’*’ first, then follow the nextPage value in each response. pageSize is required on list calls, at most 1000. The older offset parameter is deprecated.
- Collection codes (BILLS, CREC, FR, CFR, PLAW, USCOURTS, CHRG, …) come from collections.list.
- A package or granule summary links to its content (htm, xml, pdf, mods, premis, zip). A first request for a ZIP or MODS file may return 503 with Retry-After: 30 while it is generated; retry after the delay.
Endpoints
Search GovInfo
- A read over POST.
List collections
List packages added or changed in a collection
- lastModified is when GovInfo added or updated the package, not the publication date; use published.list for publication dates.
- For an end date too, call /collections/{collection}/{start}/{end} raw.
List packages by publication date
Get a package summary
List a package’s granules
Get a granule summary
List related documents
- Each relationship links to /related/{accessId}/{collection} for the related documents in that collection.