US Census Bureau Demographics & Population Data API avatar

US Census Bureau Demographics & Population Data API

Pricing

from $0.01 / 1,000 results

Go to Apify Store
US Census Bureau Demographics & Population Data API

US Census Bureau Demographics & Population Data API

Access comprehensive US Census Bureau data including American Community Survey (ACS) demographics, population estimates, economic indicators, business statistics, and geographic data. Get population, income, education, housing, employment, and health data for any US location.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

The Howlers

The Howlers

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

0

Monthly active users

15 days ago

Last modified

Features

Limited permissions

Share

US Census Bureau API - Demographics & Population Data

Get American Community Survey (ACS) numbers for any US state, county, city, ZIP code or census tract: population, age, race and ethnicity, income, housing, education, employment, poverty, health insurance, commuting and migration. Compare states side by side, build ZIP, county and state profiles, or pull any ACS variable you need. With a Census API key you can also get County Business Patterns business counts.


The Census Bureau now requires a key for every request to its own API (api.census.gov). Keys are free and arrive by email in a minute: https://api.census.gov/data/key_signup.html

  • With your key: the actor queries api.census.gov directly, for the year and dataset (acs5 or acs1) you choose. All 16 tasks work, including get_business_stats.
  • Without a key: every ACS task still returns real data. It comes from the latest ACS release (currently ACS 2024 5-year, or 2024 1-year if you pick acs1), read through Census Reporter (censusreporter.org), which republishes the Census Bureau's ACS tables. The year input is ignored in this mode and each row says which release it used. get_business_stats needs a key and returns a message asking for one.

Every row includes a source and release field so you always know where the numbers came from.


Quick Start

Population for a state (works without a key)

{
"task": "get_population",
"stateName": "California"
}

ZIP code profile

{
"task": "get_zip_profile",
"zipCode": "94105"
}

A specific year, with your key

{
"task": "get_income",
"state": "TX",
"county": "453",
"dataset": "acs5",
"year": 2022,
"apiKey": "YOUR_CENSUS_API_KEY"
}

Preview the output format with sample data

{
"task": "get_population",
"demoMode": true
}

Demo Mode returns placeholder numbers marked isSampleData: true. They are not real Census figures. Demo runs are not charged a task fee.


Tasks

TaskWhat you get
get_populationTotal population, median age, male and female counts and shares
get_demographicsRace counts and shares, Hispanic or Latino, foreign born
get_incomeMedian and mean household income, per capita income, households, Gini index
get_housingHousing units, occupied and vacant, owner vs renter, median home value, median gross rent, median year built
get_educationEducational attainment for people 25+, high school or higher and bachelor's or higher rates
get_employmentLabor force, employed, unemployed, unemployment rate, participation rate
get_povertyPopulation below the poverty line, poverty rate, SNAP households
get_health_insuranceUninsured count and rate, uninsured by age group
get_commutingWorkers, mean travel time, share driving alone, carpooling, transit, biking, walking, working from home
get_migrationWhere residents lived a year ago (same house, same county, other county, other state, abroad)
compare_locationsProfile metrics for two or more states side by side (compareStates)
get_zip_profileProfile for one ZIP code (zipCode)
get_county_profileProfile for one county (state + county)
get_state_profileProfile for one state
custom_queryAny ACS variables (variables) or a whole ACS table (tableGroup)
get_business_statsEstablishments, employees and annual payroll from County Business Patterns (key required; naicsCode optional)

Profiles include population, median age, median household income, per capita income, median home value, median gross rent, bachelor's or higher rate, unemployment rate and poverty rate.


Choosing a location

Use one of these. If you give nothing, the actor uses California.

LocationInputs
Statestate (FIPS 06, postal CA, or name) or stateName
Countystate + county (3-digit FIPS, e.g. 075)
City or townstate + place (5-digit place FIPS, e.g. 67000)
Census tractstate + county + tract (6 digits)
ZIP codezipCode (5 digits, acs5 only)

Input Parameters

ParameterTypeDefaultDescription
taskstring"get_population"Which operation to run (see Tasks)
apiKeystring-Optional free Census API key
datasetstring"acs5"acs5 (all areas) or acs1 (areas of 65,000+ people). Other options in the list are not supported yet and return an error
yearinteger2024Data year, used when you supply a key
statestring-State FIPS code, postal code or name
countystring-3-digit county FIPS code
placestring-5-digit place FIPS code
zipCodestring-5-digit ZIP code
tractstring-6-digit census tract code
stateNamestring-State name
variablesstring-custom_query: comma-separated ACS variables, e.g. B01003_001E,B19013_001E
tableGroupstring-custom_query: a whole ACS table, e.g. B25003
compareStatesstring06,48,36compare_locations: comma-separated states
naicsCodestring00get_business_stats: NAICS 2017 industry code
webhookUrlstring-Optional URL that receives the result as a POST
demoModebooleanfalseReturn labelled placeholder data instead of real data

Output

Each run writes one row: task, success, and data. data holds the geography (name, level and codes), the metrics for the task, and year, dataset, release and source. Keyless runs also carry keylessMode: true and a short note. Values the Census does not publish for an area come back as null. If something goes wrong, success is false and error explains what to fix.


Pricing

Pay per event:

EventWhen it is chargedPrice
Actor startOnce when the run starts, one event per GB of memory (minimum one). At the default 1 GB of memory that is $0.10 per run$0.10 per GB
Population QueryGet population and age/sex breakdown$0.01
Demographics QueryGet race, ethnicity, ancestry data$0.01
Income QueryGet household and per capita income$0.01
Housing QueryGet housing units, values, rent data$0.01
Education QueryGet educational attainment levels$0.01
Employment QueryGet labor force and occupation data$0.01
Business StatisticsGet business establishments and employees$0.01
Poverty QueryGet poverty rates and public assistance$0.01
Health Insurance QueryGet insurance coverage rates$0.01
Commuting QueryGet commute times and transportation modes$0.01
Migration QueryGet geographic mobility data$0.01
Location ComparisonCompare demographics across locations$0.02
ZIP Code ProfileGet complete ZIP code demographic profile$0.02
County ProfileGet complete county demographic profile$0.02
State ProfileGet complete state demographic profile$0.02
Custom Census QueryQuery custom Census variables$0.01
ResultEach item written to the default dataset$0.00001

No task fee is charged for Demo Mode or for runs that end in an error (for example a missing key for get_business_stats, an unknown state, or an invalid key). The actor start and the single dataset row are platform fees that apply to every run. This actor runs fine on 256 MB, which keeps the start fee at one unit.


Troubleshooting

"The Census Bureau rejected your API key as invalid"

Check the key, and make sure you clicked the activation link in the Census confirmation email.

"Business statistics come from County Business Patterns..."

get_business_stats needs your own key. Add it to the Census API Key field.

"Variable ... needs your own Census API key"

Without a key, custom_query can read ACS detailed-table estimates (codes like B19013_001E). Subject tables, profiles and other datasets need a key.

"No ACS data for that geography"

ZIP codes and tracts are only in the 5-year data. Use dataset: acs5.


Built by John Rippy | Actor Arsenal