home / skills / openclaw / skills / census
This skill helps you fetch and summarize US Census Bureau data, including population, demographics, ACS, and geographic indicators, via a Python CLI.
npx playbooks add skill openclaw/skills --skill censusReview the files below or copy the command above to add this skill to your agents.
---
name: census
description: "US Census Bureau ā population, demographics, ACS data, economic indicators, and geographic data."
homepage: https://www.agxntsix.ai
license: MIT
compatibility: Python 3.10+ (stdlib only ā no dependencies)
metadata: {"openclaw": {"emoji": "š", "requires": {"env": ["CENSUS_API_KEY"]}, "primaryEnv": "CENSUS_API_KEY", "homepage": "https://www.agxntsix.ai"}}
---
# š Census API
US Census Bureau ā population, demographics, ACS data, economic indicators, and geographic data.
## Requirements
| Variable | Required | Description |
|----------|----------|-------------|
| `CENSUS_API_KEY` | ā
| Census API key (optional) |
## Quick Start
```bash
# ACS 5-Year estimates
python3 {{baseDir}}/scripts/census.py acs-5yr --get "NAME,B01003_001E" --for "state:*"
# ACS 1-Year estimates
python3 {{baseDir}}/scripts/census.py acs-1yr --get "NAME,B01003_001E" --for "state:*"
# 2020 Decennial Census
python3 {{baseDir}}/scripts/census.py decennial --get "NAME,P1_001N" --for "state:*"
# Population estimates
python3 {{baseDir}}/scripts/census.py population --get "NAME,POP_2022" --for "state:*"
# County Business Patterns
python3 {{baseDir}}/scripts/census.py cbp --get "NAME,ESTAB,EMP" --for "state:*" --naics "72"
# Poverty data
python3 {{baseDir}}/scripts/census.py poverty --get "NAME,B17001_001E,B17001_002E" --for "state:*"
# Median household income
python3 {{baseDir}}/scripts/census.py income --get "NAME,B19013_001E" --for "state:*"
# Housing data
python3 {{baseDir}}/scripts/census.py housing --get "NAME,B25001_001E,B25002_002E,B25002_003E" --for "state:*"
# List available datasets
python3 {{baseDir}}/scripts/census.py list-datasets --year "2022"
# List ACS variables
python3 {{baseDir}}/scripts/census.py list-variables
# List available geographies
python3 {{baseDir}}/scripts/census.py list-geographies
```
## Output Format
All commands output JSON by default.
## Script Reference
| Script | Description |
|--------|-------------|
| `{baseDir}/scripts/census.py` | Main CLI ā all commands in one tool |
## Credits
Built by [M. Abidi](https://www.linkedin.com/in/mohammad-ali-abidi) | [agxntsix.ai](https://www.agxntsix.ai)
[YouTube](https://youtube.com/@aiwithabidi) | [GitHub](https://github.com/aiwithabidi)
Part of the **AgxntSix Skill Suite** for OpenClaw agents.
š
**Need help setting up OpenClaw for your business?** [Book a free consultation](https://cal.com/agxntsix/abidi-openclaw)
This skill provides a command-line interface to query the US Census Bureau APIs for population, demographic, ACS, economic, and geographic data. It wraps multiple datasets and endpoints into a single script so you can fetch estimates, decennial counts, business patterns, poverty, income, housing, and more. Outputs are JSON by default for easy integration into pipelines and apps.
The tool accepts dataset names (ACS 1yr/5yr, decennial, population estimates, CBP, etc.), variable lists, geography selectors, and optional NAICS filters for business data. It calls the Census API (with an optional API key) and returns structured JSON results. Additional helper commands list available datasets, variables, and geographies to simplify discovery.
Is an API key required?
No ā the script can run without a key, but supplying CENSUS_API_KEY reduces rate limits and improves reliability.
What output formats are supported?
JSON is the default output, suitable for direct consumption by downstream tools and scripts.