Microproduct data guideintermediate

American Community Survey 5-Year Estimates

Annual U.S. demographic, housing, social, and economic estimates for building local market-sizing, site-selection, and community comparison tools.

At a glance

Difficulty
Intermediate — some data preparation helps
Size
Large · 0.001–10 GB
Formats
JSON, CSV
Access
API or Download
API key
Required
Provider
U.S. Census Bureau
Updates
Annual
Data terms
U.S. Census Bureau API Terms of Service

From source to product signal

Test a product idea in four steps

ACS 5-year products provide annual estimates for every U.S. community down to small geographic areas. Start with a few documented variables at the state level before moving to tracts or block groups. Every estimate must be interpreted with its margin of error, and overlapping five-year periods are not independent observations.

1

Check the setup

  • Python 3.10 or newer
  • A notebook environment such as Jupyter or Google Colab
  • A free Census Data API key saved in the CENSUS_API_KEY environment variable
2

Access the data

  1. 1.Request a free key from the Census Data API page.
  2. 2.Review the current ACS 5-year variable definitions and geography documentation.
  3. 3.Request estimates and matching margin-of-error fields for all states.
Open official source
3

Run the Python example

Install the packages, then run the notebook cell.

python -m pip install pandas requests

import os
import pandas as pd
import requests

variables = [
    "NAME",
    "B01003_001E", "B01003_001M",
    "B19013_001E", "B19013_001M",
]
response = requests.get(
    "https://api.census.gov/data/2024/acs/acs5",
    params={
        "get": ",".join(variables),
        "for": "state:*",
        "key": os.environ["CENSUS_API_KEY"],
    },
    timeout=30,
)
response.raise_for_status()
rows = response.json()
states = pd.DataFrame(rows[1:], columns=rows[0])
print(states.head())
4

Test a useful signal

Screen states for a service-market hypothesis

Test whether population and median household income can support an initial state-level market-sizing signal.

  1. 01Rename the selected estimate and margin-of-error variables and convert them to numeric values.
  2. 02Rank states using explicit population and income thresholds while retaining both margins of error.
  3. 03Explain why survey uncertainty, variable definitions, and statewide averages require validation with users and finer geography.

Dataset details

U.S. Census Bureau is a government source. Last verified 2026-08-11. Temporal coverage: 2009-present.

Domains

DemographicsHousingLocal Economics

Data types

TabularGeospatialSurvey Estimates

Tasks

Market SizingSite SelectionCommunity Comparison

Geography

United States

Formats

JSONCSV

Provider

U.S. Census Bureau

Data terms

U.S. Census Bureau API Terms of Service