[Integrations](https://spiral.ai/integrations) › [Muse Code](https://spiral.ai/integrations/muse-code) › [Census variable lookup](https://spiral.ai/integrations/muse-code/census-variable-lookup)

# How to Use Census variable lookup in Muse Code

Returns variable definitions for a Census dataset and reference year, searchable by table or topic. Use it to identify the exact measure and its uncertainty fields before retrieving statistics.

|  |  |
| --- | --- |
| Model | Census variable lookup |
| 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 Census variable lookup in Muse Code

- Use Census variable lookup to inspect table B01003 in the 2024 ACS five-year dataset and document the estimate, margin of error, and annotation variables in this project's data dictionary.
- Use Census variable lookup to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from Census variable lookup and tell me what changed since last week.
- Check Census variable lookup and summarize what you find in three bullet points.
- Pull the newest data from Census variable lookup and give me the result as a table.

## How to set up Census variable lookup in Muse Code

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

### Use Spiral's MCP server

1. **Install Muse Code**

```bash
curl -fsSL https://dev.meta.ai/install.sh | bash
```

2. **Ask Muse to add the server**: Start `muse` and ask:

```text
Add the Spiral MCP server at https://api.spiral.ai/mcp
```

3. **Sign in**: In your terminal, run:

```bash
muse mcp login spiral
```

### Use the Spiral skill

1. **Send Muse 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 Census variable lookup**: 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": "census-gov/census/variables",
    "input": {
      "dataset": "<dataset>",
      "vintage": 2000,
      "query": "<query>"
    }
  }'
```

Then paste one of the prompts above: Muse Code finds Census variable lookup on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/muse-code

## Census variable lookup tools and prices

- [US Census Bureau · Variables](https://spiral.ai/tools/alexandria/census-gov/census/variables) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| group |  | — | Table id, e.g. B01003, S0101, DP05, P1. Pattern: ^[A-Za-z0-9_]{1,40}$. |
| query |  | — | Tokens matched against group name/description (when no group is given; the first 5 matching groups are listed) or variable name/label/concept (within a group). Datasets with at most 5 tables (cbp, pep/population) whose descriptions do not match are searched by variable label instead. |
| cursor |  | — | cursor |
| page_size | 1 to 500 | 20 | page_size |

## What can you do with Census variable lookup in Muse Code?

Build a county comparison view with Census population, income, poverty, and ACS statistics. Use geographic identifiers, variable definitions, and publication metadata to keep the project's measures tied to the correct areas and periods.

### Maintain a county community report

Build a report for Travis County, Texas, with ACS characteristics, population history, and poverty estimates. Find the datasets and variable definitions, resolve county identifiers, check publication status, compare statewide collections, and retrieve the county details for the narrative.

### Prepare a grant needs assessment

Document population change, poverty, income, and housing conditions for a proposed county service area. Use statewide collections as benchmarks, local records as evidence, dataset and variable documentation to define measures, and publication checks to keep the assessment current.

### Compare counties for business expansion

Compare North Carolina counties using population trends, household income, poverty, and ACS housing characteristics. Identify the appropriate datasets, measures, and county codes; check publication changes; rank the county collections; then examine shortlisted counties in detail.

### Plan regional library outreach

Compare Montana counties for outreach planning using population change, poverty, and ACS characteristics. Resolve service-area counties, find and define the measures, check publication status, compare the statewide collections, and add local population and income detail to each county brief.

### Compare neighborhood characteristics

Compare ACS five-year housing measures across census tracts in Wake County, North Carolina. Find the dataset, inspect variable definitions, resolve the geographic hierarchy, and retrieve estimates with their margins of error.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Muse Code guides](https://spiral.ai/integrations/muse-code)

## Census variable lookup in other agents

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

## More Muse Code guides

- [Census statistical data](https://spiral.ai/integrations/muse-code/census-statistical-data)
- [Citizens Count candidate profile](https://spiral.ai/integrations/muse-code/citizens-count-candidate-profile)
- [Census poverty publication status](https://spiral.ai/integrations/muse-code/census-poverty-publication-status)
- [Citizens Count candidate search](https://spiral.ai/integrations/muse-code/citizens-count-candidate-search)
- [Census poverty and income collection](https://spiral.ai/integrations/muse-code/census-poverty-and-income-collection)
- [Citizens Count district representatives and candidates](https://spiral.ai/integrations/muse-code/citizens-count-district-representatives-and-candidates)

## Questions about Census variable lookup in Muse Code

**Can Muse Code use Census variable lookup?**

Yes. Add Spiral to Muse Code as an MCP server, and Muse Code can find and run Census variable lookup like any built-in tool.

**How much does Census variable lookup cost in Muse 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 Muse Code plan is separate.

**Do I need an Alexandria account to use Census variable lookup in Muse Code?**

No. Spiral runs Census variable lookup on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Census variable lookup in Muse Code?**

About two minutes: install Muse Code, then ask Muse to add the server, then sign in.

**Does Muse Code wait while Census variable lookup runs?**

Census variable lookup runs in the background. Muse Code starts the run, checks on it and gives you the json when it's ready.

**How small an area can Census statistics describe?**

Coverage depends on the program and table. ACS five-year Detailed Tables reach block groups, while Subject Tables and Data Profiles reach census tracts; the SAIPE state and county files describe those larger jurisdictions.

**How current are Census estimates?**

Population estimates and SAIPE estimates are produced annually. An ACS five-year estimate combines 60 months of collected data, so its ending year does not make it a snapshot of that year alone.

**Why can an older population estimate change?**

Each new population estimates vintage revises the series back to the most recent census. The newest vintage supersedes previously published estimates for those dates, so a growth calculation should use one vintage throughout.

**Are poverty estimates exact counts?**

SAIPE uses statistical models to estimate income and poverty. Each state and county estimate is published with a 90% confidence interval, which matters when comparing counties with similar results.

**Why might an ACS one-year table omit a small community?**

Standard ACS one-year estimates cover areas with at least 65,000 residents. ACS five-year estimates cover all areas and are the appropriate product to investigate for smaller communities.

