census_query
Query U.S. Census Bureau data for population, income, housing, and more. Specify dataset, variables, and geography to retrieve demographic or economic statistics.
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' |