census_query
Retrieve U.S. Census Bureau statistics for demographics, income, housing, and more. Choose a dataset, variables, and geography to obtain tailored data.
Instructions
Query the U.S. Census Bureau Data API. Supports ACS, Decennial Census, Population Estimates, Economic Census, and more. Returns data for specified variables and geography.
Common datasets: '2023/acs/acs1' (1yr), '2023/acs/acs5' (5yr), '2020/dec/pl' (Decennial), '2023/pep/population' Common variables: NAME, B01001_001E (population), B19013_001E (median income), B25077_001E (home value), B01002_001E (median age)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| in_geo | No | Parent geography for nested queries. Example: 'state:06' to get counties in CA | |
| dataset | Yes | Census dataset path, e.g. '2023/acs/acs1', '2023/acs/acs5', '2020/dec/pl' | |
| for_geo | Yes | Geography level and filter. Examples: 'state:*' (all states), 'state:06' (CA), 'county:*' | |
| variables | Yes | Comma-separated variable names. Always include NAME. Example: 'NAME,B01001_001E,B19013_001E' |