[Integrations](https://spiral.ai/integrations) › [VS Code](https://spiral.ai/integrations/vscode) › [GovInfo U.S. Code section editions](https://spiral.ai/integrations/vscode/govinfo-u-s-code-section-editions)

# How to Use GovInfo U.S. Code section editions in VS Code

Returns available edition locations for a cited U.S. Code section. Use it to choose historical snapshots for comparison, then retrieve the text from the editions you need.

|  |  |
| --- | --- |
| Model | GovInfo U.S. Code section editions |
| Available through | Alexandria |
| Category | Public Records |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with GovInfo U.S. Code section editions in VS Code

- Use GovInfo U.S. Code section editions to list available editions of 17 U.S.C. 107 and populate the edition selector in this project's comparison view.
- Use GovInfo U.S. Code section editions to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from GovInfo U.S. Code section editions and tell me what changed since last week.
- Check GovInfo U.S. Code section editions and summarize what you find in three bullet points.
- Pull the newest data from GovInfo U.S. Code section editions and give me the result as a table.

## How to set up GovInfo U.S. Code section editions in VS Code

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the hosted server**: Use Add to VS Code on the console's Agents & MCP page, or run:

```bash
code --add-mcp '{"name":"spiral","type":"http","url":"https://api.spiral.ai/mcp"}'
```

2. **Sign in**: VS Code asks you to sign in when it first starts the server: sign in to Spiral and click Authorize. No API key. Run MCP: List Servers from the Command Palette to check that Spiral is running.

### Use the Spiral skill

1. **Send VS Code this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run GovInfo U.S. Code section editions**: One request; the result comes back by polling or a webhook.

```bash
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/uscode_section_versions",
    "input": {
      "title": 1,
      "section": "<section>"
    }
  }'
```

Then paste one of the prompts above: VS Code finds GovInfo U.S. Code section editions on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/vscode

## GovInfo U.S. Code section editions tools and prices

- [GovInfo · Uscode section versions](https://spiral.ai/tools/alexandria/govinfo-gov/legislation/uscode_section_versions) (Alexandria): $0.00873 per call.

## What can you do with GovInfo U.S. Code section editions in VS Code?

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.

### Compare statutory wording across editions

Find available editions of a cited section, retrieve the selected texts, and produce a passage-by-passage comparison. Link each passage to its edition and document details.

### Review citations in a policy handbook

Resolve the handbook's U.S. Code citations to the intended editions and compare quoted passages with the retrieved text. Return document links and edition information for editorial review.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All VS Code guides](https://spiral.ai/integrations/vscode)

## GovInfo U.S. Code section editions in other agents

- [Amp](https://spiral.ai/integrations/amp/govinfo-u-s-code-section-editions)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/govinfo-u-s-code-section-editions)
- [Claude](https://spiral.ai/integrations/claude-desktop/govinfo-u-s-code-section-editions)
- [Claude Code](https://spiral.ai/integrations/claude-code/govinfo-u-s-code-section-editions)
- [Cline](https://spiral.ai/integrations/cline/govinfo-u-s-code-section-editions)
- [Codex](https://spiral.ai/integrations/codex/govinfo-u-s-code-section-editions)
- [Cursor](https://spiral.ai/integrations/cursor/govinfo-u-s-code-section-editions)
- [Devin](https://spiral.ai/integrations/devin/govinfo-u-s-code-section-editions)
- [dots](https://spiral.ai/integrations/dots/govinfo-u-s-code-section-editions)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/govinfo-u-s-code-section-editions)
- [Gemini](https://spiral.ai/integrations/gemini/govinfo-u-s-code-section-editions)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/govinfo-u-s-code-section-editions)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/govinfo-u-s-code-section-editions)
- [goose](https://spiral.ai/integrations/goose/govinfo-u-s-code-section-editions)
- [Grok](https://spiral.ai/integrations/grok/govinfo-u-s-code-section-editions)
- [Grok Build](https://spiral.ai/integrations/grok-build/govinfo-u-s-code-section-editions)
- [Hermes](https://spiral.ai/integrations/hermes/govinfo-u-s-code-section-editions)
- [Instinct](https://spiral.ai/integrations/instinct/govinfo-u-s-code-section-editions)
- [Manus](https://spiral.ai/integrations/manus/govinfo-u-s-code-section-editions)
- [Muse](https://spiral.ai/integrations/muse/govinfo-u-s-code-section-editions)
- [Muse Code](https://spiral.ai/integrations/muse-code/govinfo-u-s-code-section-editions)
- [n8n](https://spiral.ai/integrations/n8n/govinfo-u-s-code-section-editions)
- [Notion](https://spiral.ai/integrations/notion/govinfo-u-s-code-section-editions)
- [OpenClaw](https://spiral.ai/integrations/openclaw/govinfo-u-s-code-section-editions)
- [opencode](https://spiral.ai/integrations/opencode/govinfo-u-s-code-section-editions)
- [Perplexity](https://spiral.ai/integrations/perplexity/govinfo-u-s-code-section-editions)
- [Raycast](https://spiral.ai/integrations/raycast/govinfo-u-s-code-section-editions)
- [Windsurf](https://spiral.ai/integrations/windsurf/govinfo-u-s-code-section-editions)
- [Zapier](https://spiral.ai/integrations/zapier/govinfo-u-s-code-section-editions)

## More VS Code guides

- [GovInfo U.S. Code browse](https://spiral.ai/integrations/vscode/govinfo-u-s-code-browse)
- [GovInfo U.S. Code section lookup](https://spiral.ai/integrations/vscode/govinfo-u-s-code-section-lookup)
- [Gov.br page content](https://spiral.ai/integrations/vscode/gov-br-page-content)
- [GovInfo document details](https://spiral.ai/integrations/vscode/govinfo-document-details)
- [Gov.br agency news](https://spiral.ai/integrations/vscode/gov-br-agency-news)
- [GovInfo document text](https://spiral.ai/integrations/vscode/govinfo-document-text)

## Questions about GovInfo U.S. Code section editions in VS Code

**Can VS Code use GovInfo U.S. Code section editions?**

Yes. Add Spiral to VS Code as an MCP server, and VS Code can find and run GovInfo U.S. Code section editions like any built-in tool.

**How much does GovInfo U.S. Code section editions cost in VS Code?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your VS Code plan is separate.

**Do I need an Alexandria account to use GovInfo U.S. Code section editions in VS Code?**

No. Spiral runs GovInfo U.S. Code section editions 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 U.S. Code section editions in VS Code?**

About two minutes: add the hosted server, then sign in.

**Does VS Code wait while GovInfo U.S. Code section editions runs?**

GovInfo U.S. Code section editions runs in the background. VS Code 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.

