GovInfo API

How to connect GovInfo to ChatGPT

Add the Firecrawl plugin to ChatGPT once and it can call the GovInfo API and every other provider in Firecrawl Alexandria, with no GovInfo integration code.

Open Markdown

To connect GovInfo to ChatGPT, add the Firecrawl plugin to ChatGPT, sign in on a Firecrawl team with Alexandria enabled, and ask for GovInfo data in plain language. The connection works in ChatGPT and Codex, and you set it up once.

ChatGPT uses GovInfo as an MCP tool through Firecrawl's hosted MCP server, so you don't install or host a separate MCP server for GovInfo.

ChatGPT is OpenAI's AI assistant. Plugins add tools from other services, and the Firecrawl plugin adds web search, scraping and every data provider in Firecrawl Alexandria.

How do I connect GovInfo to ChatGPT?

  1. Install the Firecrawl plugin

    Open the Firecrawl listing in ChatGPT's plugin directory and select Install plugin. You can also open Plugins in ChatGPT or Codex and search for Firecrawl.

    The Firecrawl plugin page in ChatGPT with the Install plugin button
  2. Connect your Firecrawl account

    ChatGPT opens Firecrawl in your browser. Sign in, choose a team with Alexandria enabled, and approve access. No account yet? You can create one for free in the same flow.

    Firecrawl's consent screen asking to connect chatgpt.com to Firecrawl
  3. Attach Firecrawl to a chat

    Start a new chat so it loads the plugin, open the + menu and choose Firecrawl. You can also ask ChatGPT to use Firecrawl by name.

    ChatGPT's + menu with the Firecrawl plugin listed
  4. Ask ChatGPT for the data

    Ask in plain language and mention GovInfo or Firecrawl Alexandria. ChatGPT finds the GovInfo capability that fits and runs it. For example:

    Use Firecrawl to run GovInfo's Browse collection capability. Inspect the Alexandria inputs, ask for any missing required details, and return a small sample with sources.

What can ChatGPT do with GovInfo?

GovInfo (govinfo.gov), the U.S. Government Publishing Office's repository of official federal publications: full-text search across the United States Code, CFR, Federal Register, bills, public laws, Statutes at Large and court opinions; exact U.S. Code section lookup by title, section and edition year; the edition-by-edition version history of a section; document metadata, download links and citations; document text; and the collection browse tree. Reads the key-free backend the govinfo.gov web app itself uses.

ChatGPT can run any of GovInfo's 7 capabilities through Alexandria. Each call is billed in Firecrawl credits on your Firecrawl team.

  • Browse collection: One level of a GovInfo collection's browse tree. Without `path`, the root nodes (for `uscode`: the edition years); with a `path` such as `2024/title18/partI/chapter110`, the children of that node (titles, parts, chapters, then section leaves). Each node carries its title and heading, type (`node` or `leaf`), the `browse_path` to pass back for the next level, and for documents the granule and package ids, HTML and PDF URLs, publish date and section range. A path with no node is `not_found`. Verified on `uscode`; other collection codes are passed through as the site accepts them. Costs 5 Firecrawl credits per call.
  • Collections: The searchable GovInfo collections: code and display name (United States Code `USCODE`, Code of Federal Regulations `CFR`, Federal Register `FR`, Congressional Bills `BILLS`, Public and Private Laws `PLAW`, Statutes at Large `STATUTE`, United States Courts Opinions `USCOURTS`, ...). Costs 5 Firecrawl credits per call.
  • Document details: Metadata for one GovInfo package or granule: title, collection, the metadata table (publication title, hierarchy, laws-in-effect date, source credit, Statutes at Large and public law references, and so on), download links (PDF, HTML/text, MODS, PREMIS, ZIP) with sizes, Chicago and Bluebook citations, Dublin Core fields and the document-in-context position. Accepts a pasted `https://www.govinfo.gov/app/details/...` URL. An unknown package or granule id is `not_found`. Costs 5 Firecrawl credits per call.
  • Document text: The text of one GovInfo document from its HTML rendition: the page title, the document heading, the full text as plain text (paragraphs separated by newlines, HTML and entities resolved), the U.S. Code `current through` date and hierarchy comment when present, and the file's last-modified date. Accepts a pasted `https://www.govinfo.gov/content/pkg/.../html/....htm` URL. Package-level HTML of a whole U.S. Code title is several megabytes and is refused above 4 MB; use a granule id. An unknown id is `not_found`. Costs 5 Firecrawl credits per call.
  • Search: Full-text search across GovInfo collections with the site's query language (plain text, phrases, and field operators such as `collection:USCODE`, `usctitlenum:18`, `uscsectionnum:2256`, `title:`, `congress:`, `publishdate:`). Optional collection and publication-year facets, `historical` to include superseded editions, and page-index pagination (page sizes up to 50). Returns the total count, result rows with package and granule ids, titles, the two display lines, a text teaser and content URLs, and the facet navigators with their top-level buckets. Costs 5 Firecrawl credits per call.
  • Uscode section: Exact lookup of one United States Code section by title number, section number and edition year (or the most recent edition when `year` is omitted), through the site's citation search. Returns the granule and package ids, the section heading, the edition year, the hierarchy line, the first PDF page and the HTML, PDF and details URLs. A section the edition does not contain is `not_found`. Costs 5 Firecrawl credits per call.
  • Uscode section versions: Every edition of one United States Code section held by GovInfo (main editions 1994 onward), newest first: edition year, granule and package ids, heading, hierarchy line, HTML, PDF and details URLs, and whether the edition is the current one. This is the section's version history; the text of each edition is available through `document_text`. A section number the title never had is `not_found`. Costs 5 Firecrawl credits per call.

What should I ask ChatGPT?

Name GovInfo or Firecrawl Alexandria in the prompt so ChatGPT reaches for it. Each example opens in ChatGPT with the prompt filled in.

Troubleshooting

Why doesn't ChatGPT use GovInfo?

Start a new chat after installing so ChatGPT loads the plugin, then attach Firecrawl from the + menu and name GovInfo or Firecrawl Alexandria in the prompt.

How do I switch the Firecrawl team ChatGPT uses?

Open the Firecrawl plugin page in ChatGPT, uninstall it from the menu next to Settings, then install it again and choose the other team on Firecrawl's consent screen.

Why does ChatGPT say GovInfo isn't available?

Alexandria needs a Firecrawl team with Alexandria enabled. Reinstall the plugin and pick that team when you approve access.

Use GovInfo in other AI apps

The same Firecrawl account reaches GovInfo from other AI apps. Pick one for its setup steps:

Other data providers you can connect to ChatGPT

Frequently Asked Questions

What is Firecrawl?

Firecrawl is the web data API to search, scrape and interact with the web at scale. It turns websites into clean, LLM-ready data for AI agents and apps. The Firecrawl plugin brings those tools into ChatGPT, along with every data provider in Firecrawl Alexandria.

What is Firecrawl Alexandria?

Firecrawl Alexandria is Firecrawl's library of 550+ data providers for AI agents, GovInfo among them. Each provider returns structured data through documented capabilities. ChatGPT finds the capability that fits your question and calls it through the Firecrawl plugin, so you don't write any integration code. Alexandria needs a Firecrawl account signed in on a team with Alexandria enabled, or an API key from such a team; keyless connections don't include it.

Is there a GovInfo MCP server for ChatGPT?

ChatGPT reaches GovInfo through Firecrawl's hosted MCP server, which serves GovInfo and every other Alexandria provider as tools. Add the Firecrawl plugin once and you don't install or host a separate MCP server for GovInfo.

What does connecting GovInfo to ChatGPT unlock?

ChatGPT can run all 7 of GovInfo's capabilities, including Browse collection, Collections and Document details, from any chat, with structured results it can sort, compare and summarize. In the same conversation, ChatGPT can combine GovInfo with Firecrawl's web search and scraping and the other providers in Firecrawl Alexandria.

Do I need my own GovInfo account or API key to use it in ChatGPT?

No. ChatGPT calls GovInfo through Firecrawl Alexandria and each call is billed in Firecrawl credits, so you don't need a separate GovInfo account or API key.

How much does it cost to use GovInfo in ChatGPT?

Each GovInfo call costs 5 Firecrawl credits. The capability list on this page shows each price and its unit. The credits come from the Firecrawl team you connect to ChatGPT, and finding the right capability is free.

Can ChatGPT use other providers besides GovInfo?

Yes. The same Firecrawl plugin reaches every provider in Firecrawl Alexandria, along with Firecrawl's web search and scraping, so you connect once.

Can I use GovInfo in other AI apps?

Yes. Connect Firecrawl to Claude, Cursor, Grok Bot, Muse signed in on a Firecrawl team with Alexandria enabled, or use the Firecrawl MCP server, CLI or API with an API key from that team, and the same GovInfo capabilities are available there. Keyless connections don't include Alexandria.

//
Get started
//
Ready to build?
Start getting web context for free and scale seamlessly as your project expands. No credit card needed.
Are you an AI agent? See setup options