Register for a free Census API key at https://api.census.gov/data/key_signup.html
Identify the ACS dataset endpoint for your vintage year, e.g., https://api.census.gov/data/2022/acs/acs5 for the 2022 5-year estimates
GET the endpoint appending query parameters: '?get=NAME,B01003_001E&for=county:*&in=state:06&key=<API_KEY>' to retrieve total population (variable B01003_001E) for all counties in a state (FIPS code 06 = California)
Look up variable codes in the ACS variables JSON at https://api.census.gov/data/{year}/acs/acs5/variables.json or use the Census Bureau's data explorer to identify the correct variable identifiers
Parse the response array where the first row is the header and subsequent rows are data, joining on state FIPS + county FIPS to your own geographic reference data
Known gotchas
ACS 1-year estimates are only available for geographies with population over 65,000; requesting 1-year data for a small county will return a 400 or empty result — use 5-year estimates for smaller geographies
Margin-of-error variables (suffixed 'M' instead of 'E') are separate from estimate variables; always retrieve and store the MOE alongside the estimate, especially for small population subgroups where uncertainty is high
Census variable codes change between ACS vintages; a variable that existed in the 2019 ACS may have a different code or may have been discontinued in 2022 — always verify against the variables endpoint for the specific year
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp