Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time
April 19, 2018 14:31
February 5, 2020 00:27


The govinfo api is intended to provide data users with a simple means to programmatically access govinfo content and metadata, which is stored in self-describing packages. This initial release provides functionality to retrieve lists of packages added or modified within a given time frame, summary metadata for packages, direct access to content and metadata formats, and equivalent granule information.

Interactive documentation using the OpenAPI/swagger specification is available at

Table of Contents

  1. Keys
  2. Versioning
  3. Issues
  4. About the Data
  5. Quickstart - sample requests
  6. Error Messages


This API requires the use of an key - signup here. If you already have one, go to the /docs page, click on Authorize, and enter your key. Then you can make all the requests normally.

You can send your API key in a few different ways. See for more information on key usage.

Information on rate limits can be found here. The rate limit is tracked on an rolling hourly basis.


One of the API's design goals is to minimize breaking changes, but we are implementing versioning to allow users to specify the version required. We have not determined the number of versions that we plan to support at this time, but it will be based on usage and we will communicate with known users prior to deprecating any version.

If no version is specified in requests, the latest version of the api will be provided.


See Issues to submit an issue or comment on future development priorities.

See the labels below for additional information:

  • Features - list of features that are currently under consideration by the govinfo team. Your feedback is welcome!
  • Upcoming - list of features that are currently under development and will be available in our next release. May also be tagged with a release label (Month Year) e.g. "July 2018".

About the Data

Data available in the API represents official publications from all three branches of the Federal Government as made available on GPO's govinfo. For more information about the data that's available from govinfo, see our about page and learn what's available.


Collections Service | samples

Base collections request | sample | formatted

This request will provide a json list of the collections available within our system, including a collectionCode, collectionName, packageCount, and granuleCount (as applicable). All json response are returned in a minified format.

Collection update

The following request allows you to specify a collection and get a list of packageIds that have been added or modified within the specified time period. collectionCode and startDate are required, as are offset and pageSize. Optionally, you can include the endDate. Currently, we are not limiting the pageSize, but we may restrict this based on performance needs.

Note: There is a 10000 item limit on collections responses. This means that if your update range is too broad, you may need to narrow it down using the endDate parameter. Example

startDate/endDate usage

startDate and endDate are parameters used to search against the lastModified value for the individual packages. This represents the time that this package was added or updated - equivalent to the value listed in the sitemaps. It is not the equivalent to Date Published, Date Issued, or Date Ingested in MODS.

Congressional Bills with startDate only (BILLS) | sample | formatted

Congressional Bills with endDate | sample | formatted

Congressional Record (CREC) | sample | formatted

United States Court Opinions (USCOURTS) | sample | formatted

Published Service

This is similar to the collections service in that it provides users with an easy way to get a list of packages by date. The difference is that this service provides packages based on dateIssued -- this generally corresponds to the publication date of the content itself, rather than the govinfo system update time for a publication.


https:// of records in call&collection=comma-separated list of values&api_key=your api key


BILLS issued between January and July 2019:

Federal Register and CFR packages in 2019:,FR&modifiedSince=2020-01-01T00:00:00&api_key=DEMO_KEY

Required parameters

Optional parameters:

  • dateIssuedEndDate: the latest package you are requesting by dateIssued – YYYY-MM-DD
  • docClass: Filter the results by overarching collection-specific categories. The values vary from collection to collection. For example, docClass in BILLS corresponds with Bill Type --e.g. s, hr, hres, sconres. CREC (the Congressional Record) has docClass by CREC section: HOUSE, SENATE, DIGEST, and EXTENSIONS
  • congress: congress number (e.g. “116”)
  • modifiedSince: equivalent to the startDate parameter in the collections service which is based on lastModified– allows you to request only packages that have been modified since a given date/time – useful for tracking updates. Requires ISO 8601 format -- e.g. 2020-02-28T00:00:00Z

Packages service | samples

This service allows you to specify a govinfo packageId and retrieve available forms of content and metadata. A /summary json response is available that includes links and basic metadata about the package - generally equivalent to the information available on the details page for that package.

From the summary, you can get access to all available content and metadata formats for a package. Here is a sample download section for the BILLS-115hr1625enr example below, including a link to the related Billstatus package:

"download": {
"txtLink": "",
"xmlLink": "",
"pdfLink": "",
"modsLink": "",
"premisLink": "",
"zipLink": ""
"related": {
"billStatusLink": ""

Note that for some packages, zip files are generated upon request, so you may receive a HTTP503 response with a Retry-After header indicating a number of seconds to wait before checking back for the generated zip file. A message body with the following will also appear:

{"message":"Generating ZIP file. Please retry your request again after 30 seconds"}

Congressional Bills (BILLS) | sample | formatted

Congressional Record (CREC) | sample | formatted

Federal Register (FR) | sample | formatted

Granule lists

You can also get a list of available granules for a specified package by adding /granules, offset and pageSize

Congressional Hearings (CHRG) | sample | formatted

Congressional Record (CREC) | sample | formatted

Federal Register (FR) | sample | formatted

This provides a list of titles, granuleIds and links to the granule summary, where you can access all available content and metadata formats, including the zip.


Similar to the package summary, you can retrieve a json summary for any granule, which will return basic metadata as well as links to all available content and metadata.

Congressional Record (CREC) | sample | formatted

Federal Register (FR) | sample | formatted

A number of collections have specific additional collection-specific metadata values included in the API response, such as social media information in the CDIR collection. Here are some examples:

Congressional Directory (CDIR)

Related service

The related service allows users to identify and retrieve content and metadata about related content within govinfo based on an access ID. This feature will continue to evolve as we implement additional relationships.


This will return a list of relationships, which then can be followed to return specific documents, with relevant high-level metadata, e.g.:

Available relationships

From BILLS, BILLSTATUS, or PLAW packageIds:

  • Related Bill Versions (BILLS)
  • Bill History (HOB)
  • Presidential Signing Statements and Remarks (CPD)
  • Public and Private Laws (PLAW)
  • Congressional Committee Prints (coming soon!)
  • Congressional Reports
  • U.S. Code References
  • Statutes at Large References

From FR documents:

  • Related FR documents by Regulation Identifier Number (RIN)
  • Code of Federal Regulations Citations

From CHRG:

  • Related Hearings - often parts or errata

Error Messages

Occasionally, the API will return a non-200 response. Here is an explanation of some typical error codes:

503 for granule MODS or ZIP requests with a message like "Generating MODS/ZIP file. Please try again in 30 seconds"

The govinfo system generally caches granule MODS and ZIP files based on requests from users. Sometimes a user will generate the first request for a given package or granule and the ZIP or MODS file is not in the cache. In this case, the system will inform the requester that the file is being regenerated. AS part of this response, the system will also return a Retry-After header with a value of 30, indicating that users should retry the request in 30 seconds.

Sometimes the process for generating the MODS or ZIP file will take longer than that 30 seconds. In this case, the system will again send the same 503 message with another Retry-After header until the file is available.

There are some collections where the MODS and ZIP files are automatically pre-cached, but these caches are refreshed continually, resulting in older cached files being removed in an attempt to balance performance with storage concerns.

429 Over Rate limit

The govinfo API has a rate limit on it to prevent usage from a single user from overtaxing our resources and impacting requests from other users. This should be generally high enough to meet most users needs.

Requests to the govinfo API will return the following headers to indicate the overall rate limit and time remaining. The following example is for the DEMO_KEY:

X-RateLimit-Limit: 40
X-RateLimit-Remaining: 39

Regular user keys have a higher default limit.

401 Unauthorized - API_KEY_MISSING

Getting this means that the request didn't include an API key. See Keys above to get a key and learn how to use the API. You can use the DEMO_KEY as a temporary solution, but this has a lower limit. Getting a key for also grants you access to a number of other Federal APIs


services to access govinfo content and metadata








No releases published


No packages published