How to Use GovInfo publication collections in Codex
Returns GovInfo's available publication collections and their identifying codes. Use it to choose the right publication series before researching statutes, bills, or regulations.
Prompts to try with GovInfo publication collections in Codex
Copy an example into Codex, or ask in your own words.
Use GovInfo publication collections to identify the U.S. Code collection, then use GovInfo U.S. Code browse to populate a navigation tree for Title 17 in the 2022 edition in this project's reader.
Use GovInfo publication collections to look this up and give me the result as a table. Save the result in ./assets.
Pull the latest numbers from GovInfo publication collections and tell me what changed since last week.
Check GovInfo publication collections and summarize what you find in three bullet points.
Pull the newest data from GovInfo publication collections and give me the result as a table.
How to set up GovInfo publication collections in Codex
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the hosted server
codex mcp add spiral --url https://api.spiral.ai/mcp
- Sign in
Codex opens the browser: sign in to Spiral and click Authorize. No API key. codex mcp list then shows Spiral.
codex mcp login spiral
Use the Spiral skill
- Send Codex this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run GovInfo publication collections
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "alexandria", "model": "govinfo-gov/legislation/collections", "input": {} }'
Then paste one of the prompts above: Codex finds GovInfo publication collections on Spiral, shows the price and runs it.
GovInfo publication collections providers and prices
Spiral runs GovInfo publication collections through Alexandria. Open a card for today's price, with every fee included.
What can you do with GovInfo publication collections in Codex?
Build a federal publication reader with U.S. Code navigation, source text, and edition comparisons. A coding agent can use GovInfo documents to populate the interface and connect each passage to its publication metadata.
Build a federal statute research reader
Create a reader that starts with publication selection, lets researchers explore the U.S. Code, and opens cited sections with their metadata and text. Add edition selection for historical comparisons and topic search for discovery.
Prepare a legislative research packet
Choose publication series, find documents about a policy topic, and organize the relevant U.S. Code provisions by chapter. Include document metadata, readable text, and selected historical editions for a reviewer.
Create a federal legal research lesson
Build an exercise around a public statute: identify its publication collection, locate its chapter, search for related publications, and retrieve a cited section. Have students compare selected editions and distinguish document metadata from document text.
Assemble an edition-specific reference archive
Select federal publication collections and collect the documents needed for a policy handbook. Organize U.S. Code sections within their titles, preserve publication metadata and text, and include earlier editions where the handbook discusses changes.
Find federal publications on a policy topic
Identify relevant publication series, search their metadata and full text, and prepare a reading list with document details and selected passages. Keep the publication series visible so readers can distinguish the sources.
More on GovInfo publication collections and Codex
Overview
GovInfo publication collections in other agents
Questions about GovInfo publication collections in Codex
Can Codex use GovInfo publication collections?
Yes. Add Spiral to Codex as an MCP server, and Codex can find and run GovInfo publication collections like any built-in tool.
How much does GovInfo publication collections cost in Codex?
$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.
Do I need an Alexandria account to use GovInfo publication collections in Codex?
No. Spiral runs GovInfo publication collections on its own Alexandria account. You sign in to Spiral once and never paste a key.
How long does it take to set up GovInfo publication collections in Codex?
About two minutes: add the hosted server, then sign in.
Does Codex wait while GovInfo publication collections runs?
GovInfo publication collections runs in the background. Codex starts the run, checks on it and gives you the json when it's ready.
Does GovInfo include every government document?
GovInfo covers official publications from all three branches of the federal government. Its search only includes documents stored on GovInfo, so it is not a complete index of everything government agencies publish.
How far back does GovInfo's U.S. Code archive go?
GovInfo provides virtual main editions of the U.S. Code from 1994 onward. You can browse them by year and then title.
How often is the U.S. Code updated?
The publication cycle includes a new main edition every six years and annual supplements. A GovInfo edition is a published snapshot, so choose the edition deliberately when comparing statutory wording.
Does a recent modification date mean a publication is new?
GovInfo's lastModified value records when a package was added or updated. It differs from the publication date, so a recent modification alone does not establish when the document was issued.
Is every document available in the same formats?
Most GovInfo documents are available as PDF and text. Other formats depend on the publication, and the document details page identifies the available files.
Start using GovInfo publication collections in Codex
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Codex:
set up https://spiral.ai/SKILL.md


