# GovInfo API reference

> The GovInfo API gives programmatic access to U.S. Government Publishing Office collections such as Congressional Bills, the Federal Register and court opinions, at the package and granule level, with links to download each document. An investigator can list collections, find packages issued or…

Source: https://osinttools.io/apis/govinfo/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

Compiled by OSINTtools.io editors from the vendor's docs, updated Nov 29, 2026. Listing: https://osinttools.io/tools/govinfo/

- Base URL: https://api.govinfo.gov
- Authentication: API key in the `api_key` query parameter. Get a key: https://api.govinfo.gov/docs/ Key from api.data.gov; DEMO_KEY has lower limits.
- Free tier: yes
- Pricing: Free
- Rate limits: 36,000 requests per hour, 1,200 per minute, 40 per second (rolling window); X-RateLimit-Limit and X-RateLimit-Remaining headers are returned
- Vendor docs: https://api.govinfo.gov/docs/

## Overview

The GovInfo API gives programmatic access to U.S. Government Publishing Office collections such as Congressional Bills, the Federal Register and court opinions, at the package and granule level, with links to download each document.

An investigator can list collections, find packages issued or modified in a date window, and fetch a package's summary with download links in several formats. Calls need an api.data.gov key in the `api_key` parameter; `DEMO_KEY` works for testing with lower limits. Large result sets are paged with `offsetMark` (start with `*`) and the `nextPage` value in each response.

The docs also describe a POST /search endpoint, related-document endpoints and granule endpoints; the README does not describe their response fields, so only three endpoints are written out here. Interactive docs are at https://api.govinfo.gov/docs.

## Errors

| Status | Meaning |
| --- | --- |
| 401 | API_KEY_MISSING: no API key was included |
| 429 | Rate limit exceeded |
| 503 | MODS or ZIP file is being generated; retry after the Retry-After value (typically 30 seconds) |

## Discovery

### List collection codes with package and granule counts.

`GET /collections`

- Footprint: passive (the target is not contacted)

Returns the collections available through the API.

Response fields:

- `collections[].collectionCode` (string): Collection code
- `collections[].collectionName` (string): Collection name
- `collections[].packageCount` (integer): Number of packages
- `collections[].granuleCount` (integer): Number of granules, where applicable

```bash
curl 'https://api.govinfo.gov/collections?api_key=YOUR_API_KEY'
```

Example response (200):

```json
{
  "collections": [
    {
      "collectionCode": "EXAMPLE",
      "collectionName": "Example Collection",
      "packageCount": 100,
      "granuleCount": 500
    }
  ]
}
```

### Packages issued on or after a date, filtered by collection.

`GET /published/{dateIssuedStartDate}`

- Footprint: passive (the target is not contacted)

Paginate with offsetMark, starting at * and then using the nextPage value from the response. An end date can be added as a second path segment.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `dateIssuedStartDate` | path | string | yes | Start of the issue date window Example: 2026-01-01 |
| `offsetMark` | query | string | yes | Pagination mark; start with * Example: * |
| `pageSize` | query | integer | yes | Results per page Example: 100 |
| `collection` | query | string | yes | Collection code Example: EXAMPLE |
| `docClass` | query | string | no | Document class filter Example: hr |
| `congress` | query | string | no | Congress number filter Example: 119 |
| `modifiedSince` | query | string | no | ISO 8601 date-time; only items modified since Example: 2026-01-01T00:00:00Z |

Response fields:

- `nextPage` (string): URL supplying the offsetMark for the next page

```bash
curl 'https://api.govinfo.gov/published/2026-01-01?offsetMark=*&pageSize=100&collection=EXAMPLE&api_key=YOUR_API_KEY'
```

Example response (200):

```json
{
  "nextPage": "https://api.govinfo.gov/published/2026-01-01?offsetMark=EXAMPLE_MARK&pageSize=100&collection=EXAMPLE"
}
```

## Retrieval

### Metadata and download links for one package.

`GET /packages/{packageId}/summary`

- Footprint: passive (the target is not contacted)

Roughly the same information as the package details page. Content is also available at /packages/{packageId}/{format} for htm, xml, pdf, mods, premis and zip.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packageId` | path | string | yes | Package identifier Example: EXAMPLE-PACKAGE-1 |

Response fields:

- `download.txtLink` (string): Text download link
- `download.xmlLink` (string): XML download link
- `download.pdfLink` (string): PDF download link
- `download.modsLink` (string): MODS download link
- `download.premisLink` (string): PREMIS download link
- `download.zipLink` (string): ZIP download link
- `related.billStatusLink` (string): Bill status link, for bills

```bash
curl 'https://api.govinfo.gov/packages/EXAMPLE-PACKAGE-1/summary?api_key=YOUR_API_KEY'
```

Example response (200):

```json
{
  "download": {
    "pdfLink": "https://api.govinfo.gov/packages/EXAMPLE-PACKAGE-1/pdf",
    "xmlLink": "https://api.govinfo.gov/packages/EXAMPLE-PACKAGE-1/xml"
  }
}
```

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
