Register for a free Census API key at api.census.gov/data/key_signup.html; all data queries to the Census Data API require an api_key parameter.
Identify the dataset and vintage year: for the American Community Survey 5-year estimates use the base URL https://api.census.gov/data/{year}/acs/acs5; for 1-year estimates use acs1 — 5-year estimates provide data down to census tracts and block groups, while 1-year estimates require populations of 65,000 or more.
Construct a GET request with a get parameter listing the variable codes you need (e.g., B01003_001E for total population) and a for parameter specifying the geographic unit (e.g., county:* or tract:* within state:06 for California tracts).
Parse the JSON response: the first array in the response contains column headers and each subsequent array is a data row; join on the geographic FIPS codes to match rows to your spatial data.
To discover available variables, fetch the variables JSON at https://api.census.gov/data/{year}/acs/acs5/variables.json or use the subject-tables endpoint (acs5/subject) for pre-computed topic summaries.
Handle the Census API's 50-variable-per-request limit by splitting large variable lists across multiple requests and joining results on the geographic identifier.
Known gotchas
ACS data is released with a lag: the 2024 ACS 5-year estimates are the most recent available as of mid-2026; do not expect 2025 or 2026 vintage data from the Census API yet.
The 1-year ACS is not available for geographies with populations below 65,000; attempting to retrieve tract or small-county data from the 1-year dataset returns an error — use the 5-year dataset for small geographies.
The Census API caps requests at 500 rows per call by default; for large geographic queries (all tracts in a large state) paginate using the limit and offset approach documented in the Census API user guide.
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