# How to connect US Census Bureau to Grok Bot

> Connect US Census Bureau to Grok Bot with the Firecrawl plugin. Use US Census Bureau as an MCP tool in Grok Bot via Firecrawl Alexandria.

To connect US Census Bureau to Grok Bot, add the Firecrawl plugin to Grok Bot, sign in on a Firecrawl team with Alexandria enabled, and ask for US Census Bureau data in plain language. The connection works in every Bot in your Grok Bot account, and you set it up once.

Grok Bot uses US Census Bureau as an MCP tool through Firecrawl's hosted MCP server, so you don't install or host a separate MCP server for US Census Bureau.

Grok Bot is xAI's agent app. Plugins give your Bots outside tools, and the Firecrawl plugin adds web search, scraping and every data provider in Firecrawl Alexandria.

## How do I connect US Census Bureau to Grok Bot?

### 1. Add the Firecrawl plugin

In Grok Bot, open Connect apps from the sidebar, find Firecrawl and select Connect. You can also open [Firecrawl's plugin listing](https://x.ai/bot/plugin/789) and select Add to Grok Bot, which opens the desktop app to finish the install.

[Add to Grok Bot](https://x.ai/bot/plugin/789)

![Grok Bot's Connect Apps window with Firecrawl and its Connect button](https://www.firecrawl.dev/images/alexandria/connect/grok-bot/connect-apps.webp)

### 2. Connect your Firecrawl account

Grok Bot opens Firecrawl in your browser. Sign in, choose a team with Alexandria enabled, and select Authorize. The screen names Cursor, because the plugin is published on the Cursor Marketplace. No account yet? You can create one for free in the same flow.

![Firecrawl's consent screen for the Grok Bot plugin, with the team picker and Authorize button](https://www.firecrawl.dev/images/alexandria/connect/grok-bot/authorize.webp)

### 3. Ask your Bot for the data

In a chat, ask in plain language and mention US Census Bureau or Firecrawl Alexandria. To make sure the Bot uses Firecrawl, type @ and choose Firecrawl first. For example:

```text
Use Firecrawl to show total population and margin of error for every California county in the 2023 ACS 5-year estimates.
```

## What can Grok Bot do with US Census Bureau?

Discover Census datasets, variables and geography codes, then retrieve published estimates, margins of error and counts with source annotations; County Business Patterns establishments, employment and payroll by NAICS industry for the nation, states and counties; manufacturing shipments, value added, payroll and inventories (Annual Integrated Economic Survey and Economic Census); monthly manufacturers' shipments, new orders, unfilled orders and inventories (M3 factory orders and advance durable goods); monthly US imports and exports by HS commodity code, partner country and port (international trade API, keyed); and the Population Estimates Program and SAIPE poverty and income files from www2.census.gov.

Grok Bot can run any of US Census Bureau's 14 capabilities through Alexandria. Each call is billed in Firecrawl credits on your Firecrawl team.

- **Cbp**: County Business Patterns for one NAICS industry: establishments, March employment and annual and first-quarter payroll for the nation, a state, every state, a county or every county in a state, as labeled records with disclosure and noise flags resolved (withheld cells are null with the flag explained). Reads the CBP table (CBP<year>.CB<yy>00CBP) from the keyless data.census.gov backend; NAICS levels from 2-digit sectors to 6-digit industries. Costs 5 Firecrawl credits per call.
- **Data**: Retrieve estimates. Input: dataset path (acs/acs5, acs/acs1, acs/acs5/subject, acs/acs5/profile, dec/pl, dec/dhc, pep/population, cbp ...), vintage, 1-200 variable names or group(TABLE) tokens, and a geography as Data API for/in predicates (for: 'county:*', in: ['state:06']). Returns one row per geography with values as published, sentinels turned into null plus annotation, FIPS parts, variable metadata with units, and the equivalent api.census.gov URL. Unknown variables are rejected with invalid_input naming them. A variable list may be one name or a comma-separated string, and geography.for / geography.in may be a string or a list. A number is accepted where a code or year is a string. Unknown options are rejected by name. Costs 5 Firecrawl credits per call.
- **Datasets**: Search the Census Data API catalog. Input: free-text query over dataset path, title and description plus an optional vintage (year). Returns one record per dataset/vintage with its API endpoint, metadata links, publication date and supported geography levels. Costs 5 Firecrawl credits per call.
- **Geographies**: Geography resolver. Input: a place, county, state, tract or other geography name (e.g. 'Travis County, Texas'). Returns matching Census geographies with summary level, GEO_ID, FIPS parts and the exact `for`/`in` predicates to pass to `data`. Costs 5 Firecrawl credits per call.
- **M3**: Manufacturers' Shipments, Inventories and Orders (M3), the monthly factory orders and durable goods survey: value of shipments, new orders, unfilled orders and inventories (total and by stage) plus inventory/shipment and unfilled-orders/shipment ratios for total manufacturing, durable and nondurable goods, core capital goods and 80+ industry categories, US, millions of dollars, from 1992. Reads the full report (programCode M3) and the advance durable goods report (M3ADV, about a week earlier) from www.census.gov; report latest takes each series from whichever reaches the newer month. Costs 5 Firecrawl credits per call.
- **Manufacturing**: Manufacturing statistics for one NAICS industry (31-33 or any code under it): employees, production workers and hours, payroll and wages, value of shipments, value added, cost of materials, capital expenditures and end-of-year inventories, in thousands of dollars as published. source aies reads the Annual Integrated Economic Survey (AIES31BASIC01; reference years 2023+, US down to 6-digit NAICS, states down to 4-digit, with coefficients of variation); source economic_census reads the Economic Census (EC<yy>31BASIC; 2017 and 2022, US, states and counties, with establishment counts). Withheld cells are null with the flag explained. Costs 5 Firecrawl credits per call.
- **Popest get**: One PEP geography by its own codes, as its estimate-year records (same shape as popest_list). counties: state + county (county omitted or 000 = the state row). subcounty: the per-state file; select by place (default SUMLEV 162, or 157 together with county), cousub + county (SUMLEV 061), concit, or an explicit sumlev; nothing but state = the state row. More than one matching row is invalid_input asking for sumlev; none is not_found. state, county, place, cousub, concit and sumlev may be numbers (6 becomes 06, 40 becomes 040). Unknown options are rejected by name. Costs 5 Firecrawl credits per call.
- **Popest list**: List Vintage 2020-YYYY population estimates from one PEP file as one record per geography and estimate year: counties (SUMLEV 040 states and 050 counties; components of change, group quarters and per-1,000 rates) or subcounty (places, county subdivisions, consolidated cities; population only). The whole file is fetched per call (2.1 MB counties, 7.5 MB national subcounty, ~30 KB per state) and paged from memory; the cursor pins vintage, file, Last-Modified and size and a changed file fails with publication_changed. source_record_id = v<vintage>:<file>:<sumlev>:<geo_id>:<year>. Names are decoded from Latin-1. Costs 5 Firecrawl credits per call.
- **Popest status**: Cheap version check of the Population Estimates Program (PEP) file tree on www2.census.gov: newest 2020-YYYY vintage directory, then HEAD of counties/totals/co-est<YYYY>-alldata.csv and cities/totals/sub-est<YYYY>.csv (size, Last-Modified, publication_id = v<YYYY>:<file>:<Last-Modified>), plus the per-state sub-county files from the cities/totals listing. No publisher hash exists; popest_list reports the SHA-256 of the file it reads. Costs 5 Firecrawl credits per call.
- **Saipe get**: One SAIPE record by state and county FIPS for a year: reads est<yy>-<st>.txt (county omitted or 000 = the state row) or, for state 00 / US, the national row of est<yy>us.txt. Same record shape as saipe_list. Costs 5 Firecrawl credits per call.
- **Saipe list**: List SAIPE state-and-county poverty and median household income estimates for one year: est<yy>all.txt (US, 51 states, every county; 3,196 lines for 2024) or, with state, est<yy>-<st>.txt (state row first, then its counties). Fixed-width positions per the layout README: state 1-2, county 4-6, poverty all ages 8-48, age 0-17 50-90, related children 5-17 92-132, median household income 134-153, under 5 155-192 (US and states only), name 194-238, postal 240-241, file tag 243-264. Blanks and '.' become null; FIPS stay zero-padded strings. The file is fetched per call and paged from memory; the cursor pins year, file, Last-Modified and size. source_record_id = saipe<year>:<state_fips><county_fips>. Costs 5 Firecrawl credits per call.
- **Saipe status**: Cheap version check of the Small Area Income and Poverty Estimates (SAIPE) state-and-county files on www2.census.gov: newest year directory, the file listing (est<yy>all.txt, est<yy>us.txt, est<yy>-<st>.txt and the .xls twins), and for the national files est<yy>all.txt and est<yy>us.txt the exact size, Last-Modified, SHA-256 and line count (they are fetched: the server sends them gzip-encoded without Content-Length). publication_id = saipe<year>:<file>:<Last-Modified>. Costs 5 Firecrawl credits per call.
- **Trade**: US merchandise trade by Harmonized System (HS) code from the Census Bureau's international trade API: monthly imports (general imports, customs value) or exports (total exports, free alongside ship value) in US dollars for one HS code at 2, 4, 6 or 10 digits, for the total of all partners, one partner country, group or region, every partner country, one US port, or every port. Each month carries year-to-date value, vessel and air value, quantity and unit at 10 digits, and calculated duty for imports. Monthly from 2010-01; the newest month is about two months back. Reads api.census.gov/data/timeseries/intltrade (imports/hs, exports/hs, imports/porths, exports/porths), which needs an API key that the calling platform supplies. Costs 5 Firecrawl credits per call.
- **Variables**: List variables of one dataset vintage. Input: dataset path and vintage, plus a group (table id such as B01003 or DP05) and/or a free-text query matched against group descriptions and variable labels. Returns variable name, verbatim label, concept, predicate type, group and the unit phrase the label carries. Costs 5 Firecrawl credits per call.

## What should I ask Grok Bot?

Name US Census Bureau or Firecrawl Alexandria in the prompt so Grok Bot reaches for it.

- Use Firecrawl to show total population and margin of error for every California county in the 2023 ACS 5-year estimates.
- Use Firecrawl to show median household income with margin of error for every census tract in San Francisco County in the 2023 ACS 5-year release.
- Use Firecrawl to find the FIPS codes for Travis County, Texas and retrieve its 2020 Census population.
- Use Firecrawl to find the 2023 ACS 5-year dataset and list the variables in its B19013 median household income table, including labels and units.

### For agents

Start with the `census-gov` provider. Use Firecrawl Alexandria first. With MCP, use firecrawl_search with sources: ["alexandria"] to discover relevant tools, firecrawl_find_tools to inspect the selected capability contracts, then firecrawl_scrape in alexandria mode to retrieve records. With the CLI, use firecrawl search alexandria, firecrawl list, then firecrawl scrape for the selected provider/capability. Follow the live tool schema and returned contract; never invent provider IDs or inputs. Ask for missing required details before execution, respect access and pricing, and inspect each result for errors. Cite retrieved records, distinguish missing data from failures, and explain gaps. If no suitable Alexandria capability exists, say so before using web sources. Do not treat a tool listing as retrieved data.

## Troubleshooting

### Why doesn't my Bot use US Census Bureau?

Attach Firecrawl to the chat with @ before you ask, and name US Census Bureau or Firecrawl Alexandria in the prompt.

### Add to Grok Bot doesn't open the app. What should I do?

Install the Grok Bot desktop app first, or open Connect apps in Grok Bot and search for Firecrawl.

## Use US Census Bureau in other AI apps

- [US Census Bureau in ChatGPT](https://alexandria.firecrawl.dev/providers/census-gov/connect/chatgpt)
- [US Census Bureau in Claude](https://alexandria.firecrawl.dev/providers/census-gov/connect/claude)
- [US Census Bureau in Cursor](https://alexandria.firecrawl.dev/providers/census-gov/connect/cursor)
- [US Census Bureau in Muse](https://alexandria.firecrawl.dev/providers/census-gov/connect/muse)

### Other data providers you can connect to Grok Bot

- [How to connect France public medicines database (BDPM) to Grok Bot](https://alexandria.firecrawl.dev/providers/base-donnees-publique-medicaments-gouv-fr/connect/grok-bot)
- [How to connect ClinicalTrials.gov to Grok Bot](https://alexandria.firecrawl.dev/providers/clinicaltrials-gov/connect/grok-bot)
- [How to connect CMS Medicare Drug Prices: Negotiated Prices and Part B ASP Payment Limits to Grok Bot](https://alexandria.firecrawl.dev/providers/cms-gov/connect/grok-bot)
- [How to connect CDC PLACES local health estimates (data.cdc.gov) to Grok Bot](https://alexandria.firecrawl.dev/providers/data-cdc-gov/connect/grok-bot)

Full setup guide: [Firecrawl in Grok Bot](https://www.firecrawl.dev/integrations/grok-bot)

## 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 Grok Bot, 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, US Census Bureau among them. Each provider returns structured data through documented capabilities. Grok Bot 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 US Census Bureau MCP server for Grok Bot?

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

### What does connecting US Census Bureau to Grok Bot unlock?

Grok Bot can run all 14 of US Census Bureau's capabilities, including Cbp, Data and Datasets, from any chat, with structured results it can sort, compare and summarize. For example, ask: "Use Firecrawl to show total population and margin of error for every California county in the 2023 ACS 5-year estimates." In the same conversation, Grok Bot can combine US Census Bureau with Firecrawl's web search and scraping and the other providers in Firecrawl Alexandria.

### Do I need my own US Census Bureau account or API key to use it in Grok Bot?

No. Grok Bot calls US Census Bureau through Firecrawl Alexandria and each call is billed in Firecrawl credits, so you don't need a separate US Census Bureau account or API key.

### How much does it cost to use US Census Bureau in Grok Bot?

Each US Census Bureau 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 Grok Bot, and finding the right capability is free.

### Can Grok Bot use other providers besides US Census Bureau?

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 US Census Bureau in other AI apps?

Yes. Connect Firecrawl to ChatGPT, Claude, Cursor, 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 US Census Bureau capabilities are available there. Keyless connections don't include Alexandria.
