> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# GovInfo

> The US Government Publishing Office's GovInfo API: official publications of all three branches (bills, Congressional Record, Federal Register, CFR, court opinions, public laws) with search, change lists, package and granule metadata and related documents.

![](https://mintcdn.com/webrouter/Wx0iBZkUGX_VAFTN/logo/data-apis/_default.svg?fit=max\&auto=format\&n=Wx0iBZkUGX_VAFTN\&q=85\&s=951f11a0968af0d8747e234a1ec1f32c)

[Web Catalog · Government](https://docs.webrouter.net/data-apis.md?category=government)

Needs&#x20;

`GOVINFO_API_KEY`

Endpoints

8

Auth

Key in query

[Vendor docs](https://api.govinfo.gov/docs/)

## Setup

| Variable | | What it is |
| - | - | - |
| `GOVINFO_API_KEY` | required | api.data.gov key (free sign-up at [https://www.govinfo.gov/api-signup](https://www.govinfo.gov/api-signup)); DEMO\_KEY works with a much lower limit. Sent as the api\_key query parameter. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) 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

POST

Search GovInfo

Full-text search across GovInfo with the same query syntax as the GovInfo website.

[Open](#govinfo-search)

GET

List collections

Every GovInfo collection with its code, name and package and granule counts.

[Open](#govinfo-collections-list)

GET

List packages added or changed in a collection

Package ids in one collection added or modified since a date-time, for tracking updates.

[Open](#govinfo-collections-updated)

GET

List packages by publication date

Packages in the given collections issued between two dates.

[Open](#govinfo-published-list)

GET

Get a package summary

Metadata of one package and links to every content and metadata format (text, XML, PDF, MODS, ZIP).

[Open](#govinfo-packages-summary)

GET

List a package's granules

The granules (sections, articles, hearings parts) of one package, with titles, ids and summary links.

[Open](#govinfo-packages-granules)

GET

Get a granule summary

Metadata of one granule and links to its content and metadata formats.

[Open](#govinfo-granules-summary)

GET

List related documents

Relationships of a package or granule: bill versions, history, public laws, reports, CFR citations and more.

[Open](#govinfo-related)

### Search GovInfo

POST

`/search`

`govinfo.search`

Full-text search across GovInfo with the same query syntax as the GovInfo website.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`query` required</td><td>string</td><td>body</td><td>Search query in GovInfo syntax; field operators like collection:(USCOURTS) are allowed. Example `collection:(BILLS) and congress:118 broadband`</td></tr>
    <tr><td>`pageSize` required</td><td>integer</td><td>body</td><td>Results per page. Example `25`</td></tr>
    <tr><td>`offsetMark` required</td><td>string</td><td>body</td><td>'\*' for the first page, then the offsetMark the previous response gave. Example `*`</td></tr>
    <tr><td>`sorts`</td><td>array</td><td>body</td><td>List of \{field, sortOrder}. Supported fields: score (DESC only), publishdate, lastModified, title (ASC or DESC). Example `[{"field": "score", "sortOrder": "DESC"}]`</td></tr>
    <tr><td>`historical`</td><td>boolean</td><td>body</td><td>Include historical content. Example `true`</td></tr>
    <tr><td>`resultLevel`</td><td>string</td><td>body</td><td>Level of detail of each result. Example `default`</td></tr>
  </tbody>
</table>

[Vendor docs](https://github.com/usgpo/api#search-service) · Same job: [Andi AI Search](https://docs.webrouter.net/data-apis/andi.md#andi-search), [Apify](https://docs.webrouter.net/data-apis/apify.md#apify-store-search), [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-web-search), [Brave Search](https://docs.webrouter.net/data-apis/bravesearch.md#bravesearch-videos-search), [BytePlus Searchinfinity](https://docs.webrouter.net/data-apis/byteplus-search.md#byteplus-search-web-search), [Crawl4AI Cloud](https://docs.webrouter.net/data-apis/crawl4ai.md#crawl4ai-search)

```python Python theme={null}
router.call_data_api("govinfo.search", {'query': 'collection:(BILLS) and congress:118 broadband', 'pageSize': 25, 'offsetMark': '*', 'sorts': [{'field': 'score', 'sortOrder': 'DESC'}], 'historical': True, 'resultLevel': 'default'})
```

```text MCP theme={null}
call_data_api(endpoint="govinfo.search", params={"query": "collection:(BILLS) and congress:118 broadband", "pageSize": 25, "offsetMark": "*", "sorts": [{"field": "score", "sortOrder": "DESC"}], "historical": true, "resultLevel": "default"})
```

> [!NOTE]
>
> * A read over POST.

### List collections

GET

`/collections`

`govinfo.collections.list`

Every GovInfo collection with its code, name and package and granule counts.

Input

No inputs.

[Vendor docs](https://github.com/usgpo/api#collections-service) · Same job: [ArcGIS Online](https://docs.webrouter.net/data-apis/arcgis.md#arcgis-groups-search), [Attio](https://docs.webrouter.net/data-apis/attio.md#attio-objects-list), [Bank of Canada](https://docs.webrouter.net/data-apis/bankofcanada.md#bankofcanada-lists), [US Bureau of Economic Analysis](https://docs.webrouter.net/data-apis/bea.md#bea-datasets-list), [Bright Data](https://docs.webrouter.net/data-apis/brightdata.md#brightdata-datasets-list), [Clay](https://docs.webrouter.net/data-apis/clay.md#clay-tables-query)

```python Python theme={null}
router.call_data_api("govinfo.collections.list")
```

```text MCP theme={null}
call_data_api(endpoint="govinfo.collections.list")
```

### List packages added or changed in a collection

GET

`/collections/{collection}/{lastModifiedStartDate}`

`govinfo.collections.updated`

Package ids in one collection added or modified since a date-time, for tracking updates.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`collection` required</td><td>string</td><td>path</td><td>Collection code, e.g. BILLS, CREC, FR, PLAW, USCOURTS. Example `BILLS`</td></tr>
    <tr><td>`lastModifiedStartDate` required</td><td>string</td><td>path</td><td>Start of the lastModified window, ISO 8601 yyyy-MM-dd'T'HH:mm:ss'Z'. Example `2025-01-01T00:00:00Z`</td></tr>
    <tr><td>`offsetMark`</td><td>string</td><td>query</td><td>'\*' first, then the value from nextPage. Example `*`</td></tr>
    <tr><td>`pageSize` required</td><td>integer</td><td>query</td><td>Records per request, at most 1000. Example `100`</td></tr>
    <tr><td>`congress`</td><td>integer</td><td>query</td><td>Congress number, where applicable (e.g. 118). Example `118`</td></tr>
    <tr><td>`docClass`</td><td>string</td><td>query</td><td>Collection-specific category, e.g. bill type (s, hr) in BILLS or section (HOUSE, SENATE) in CREC. Example `hr`</td></tr>
  </tbody>
</table>

[Vendor docs](https://github.com/usgpo/api#collections-service)

```python Python theme={null}
router.call_data_api("govinfo.collections.updated", {'collection': 'BILLS', 'lastModifiedStartDate': '2025-01-01T00:00:00Z', 'offsetMark': '*', 'pageSize': 100, 'congress': 118, 'docClass': 'hr'})
```

```text MCP theme={null}
call_data_api(endpoint="govinfo.collections.updated", params={"collection": "BILLS", "lastModifiedStartDate": "2025-01-01T00:00:00Z", "offsetMark": "*", "pageSize": 100, "congress": 118, "docClass": "hr"})
```

> [!NOTE]
>
> * 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

`/published/{dateIssuedStartDate}/{dateIssuedEndDate}`

`govinfo.published.list`

Packages in the given collections issued between two dates.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`dateIssuedStartDate` required</td><td>string</td><td>path</td><td>Earliest dateIssued, YYYY-MM-DD. Example `2019-01-01`</td></tr>
    <tr><td>`dateIssuedEndDate` required</td><td>string</td><td>path</td><td>Latest dateIssued, YYYY-MM-DD. Example `2019-07-31`</td></tr>
    <tr><td>`collection` required</td><td>string</td><td>query</td><td>Comma-separated collection codes. Example `BILLS`</td></tr>
    <tr><td>`offsetMark`</td><td>string</td><td>query</td><td>'\*' first, then the value from nextPage. Example `*`</td></tr>
    <tr><td>`pageSize` required</td><td>integer</td><td>query</td><td>Records per request, at most 1000. Example `100`</td></tr>
    <tr><td>`congress`</td><td>string</td><td>query</td><td>Congress number (e.g. 116). Example `116`</td></tr>
    <tr><td>`docClass`</td><td>string</td><td>query</td><td>Collection-specific category, e.g. bill type in BILLS. Example `s`</td></tr>
    <tr><td>`modifiedSince`</td><td>string</td><td>query</td><td>Only packages modified since this ISO 8601 date-time. Example `2020-02-28T00:00:00Z`</td></tr>
  </tbody>
</table>

[Vendor docs](https://github.com/usgpo/api#published-service) · Same job: [Attio](https://docs.webrouter.net/data-apis/attio.md#attio-records-query)

```python Python theme={null}
router.call_data_api("govinfo.published.list", {'dateIssuedStartDate': '2019-01-01', 'dateIssuedEndDate': '2019-07-31', 'collection': 'BILLS', 'offsetMark': '*', 'pageSize': 100, 'congress': '116', 'docClass': 's', 'modifiedSince': '2020-02-28T00:00:00Z'})
```

```text MCP theme={null}
call_data_api(endpoint="govinfo.published.list", params={"dateIssuedStartDate": "2019-01-01", "dateIssuedEndDate": "2019-07-31", "collection": "BILLS", "offsetMark": "*", "pageSize": 100, "congress": "116", "docClass": "s", "modifiedSince": "2020-02-28T00:00:00Z"})
```

### Get a package summary

GET

`/packages/{packageId}/summary`

`govinfo.packages.summary`

Metadata of one package and links to every content and metadata format (text, XML, PDF, MODS, ZIP).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`packageId` required</td><td>string</td><td>path</td><td>GovInfo package id. Example `BILLS-115hr1625enr`</td></tr>
  </tbody>
</table>

[Vendor docs](https://github.com/usgpo/api#packages-service) · Same job: [Attio](https://docs.webrouter.net/data-apis/attio.md#attio-records-get)

```python Python theme={null}
router.call_data_api("govinfo.packages.summary", {'packageId': 'BILLS-115hr1625enr'})
```

```text MCP theme={null}
call_data_api(endpoint="govinfo.packages.summary", params={"packageId": "BILLS-115hr1625enr"})
```

### List a package's granules

GET

`/packages/{packageId}/granules`

`govinfo.packages.granules`

The granules (sections, articles, hearings parts) of one package, with titles, ids and summary links.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`packageId` required</td><td>string</td><td>path</td><td>GovInfo package id. Example `CREC-2018-01-03`</td></tr>
    <tr><td>`offsetMark`</td><td>string</td><td>query</td><td>'\*' first, then the value from nextPage. Example `*`</td></tr>
    <tr><td>`pageSize` required</td><td>integer</td><td>query</td><td>Records per request, at most 1000. Example `100`</td></tr>

    <tr>
      <td>
        `granuleClass`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Collection-specific granule category filter.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://github.com/usgpo/api#granules-service)

```python Python theme={null}
router.call_data_api("govinfo.packages.granules", {'packageId': 'CREC-2018-01-03', 'offsetMark': '*', 'pageSize': 100})
```

```text MCP theme={null}
call_data_api(endpoint="govinfo.packages.granules", params={"packageId": "CREC-2018-01-03", "offsetMark": "*", "pageSize": 100})
```

### Get a granule summary

GET

`/packages/{packageId}/granules/{granuleId}/summary`

`govinfo.granules.summary`

Metadata of one granule and links to its content and metadata formats.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`packageId` required</td><td>string</td><td>path</td><td>GovInfo package id. Example `FR-2018-04-12`</td></tr>
    <tr><td>`granuleId` required</td><td>string</td><td>path</td><td>Granule id from packages.granules. Example `2018-07777`</td></tr>
  </tbody>
</table>

[Vendor docs](https://github.com/usgpo/api#granules-summary)

```python Python theme={null}
router.call_data_api("govinfo.granules.summary", {'packageId': 'FR-2018-04-12', 'granuleId': '2018-07777'})
```

```text MCP theme={null}
call_data_api(endpoint="govinfo.granules.summary", params={"packageId": "FR-2018-04-12", "granuleId": "2018-07777"})
```

### List related documents

GET

`/related/{accessId}`

`govinfo.related`

Relationships of a package or granule: bill versions, history, public laws, reports, CFR citations and more.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`accessId` required</td><td>string</td><td>path</td><td>Package id or granule id. Example `BILLS-116hr748enr`</td></tr>
  </tbody>
</table>

[Vendor docs](https://github.com/usgpo/api#related-service)

```python Python theme={null}
router.call_data_api("govinfo.related", {'accessId': 'BILLS-116hr748enr'})
```

```text MCP theme={null}
call_data_api(endpoint="govinfo.related", params={"accessId": "BILLS-116hr748enr"})
```

> [!NOTE]
>
> * Each relationship links to /related/\{accessId}/\{collection} for the related documents in that collection.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.