Census APIcensus.gov ↗
Access US Census Bureau ACS housing data — home values, rents, occupancy rates, and housing units by state, county, ZIP, tract, and more.
What is the Census API?
This API exposes 3 endpoints for querying American Community Survey (ACS) housing and property statistics from the US Census Bureau. Use get_property_data to retrieve median home values, median gross rent, owner/renter occupancy counts, total housing units, median year built, and household income across five geography levels — state, county, place, ZIP code, or census tract — for any available ACS data year.
curl -X GET 'https://api.parse.bot/scraper/a7a77a76-6329-44e5-b61f-fd84d5965dfb/get_property_data?year=2022&dataset=acs%2Facs5&geo_code=*&geo_level=state' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace census-gov-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: US Census Bureau Property Data — discover tables, explore variables, fetch housing stats."""
from parse_apis.us_census_bureau_property_data_api import Census, Dataset, GeoLevel, GeographyNotFound
client = Census()
# Search for housing-related data tables in the ACS catalog.
table = client.censustables.search(query="housing", dataset=Dataset.ACS_5_YEAR, limit=5).first()
if table:
print(table.table_id, table.description)
# Drill into a table's variables to see what columns are available.
for var in table.variables.list(limit=3):
print(var.variable_code, var.label)
# Fetch state-level property statistics (all states).
for state in client.propertydatas.list(geo_level=GeoLevel.STATE, limit=5):
print(state.name, state.median_home_value, state.median_gross_rent, state.median_household_income)
# Fetch county-level data within California (state FIPS 06).
county = client.propertydatas.list(
geo_level=GeoLevel.COUNTY, state_code="06", limit=1
).first()
if county:
print(county.name, county.geo_id, county.median_home_value, county.owner_occupied_units)
# Handle invalid geography gracefully.
try:
client.propertydatas.list(geo_level=GeoLevel.TRACT, limit=1).first()
except GeographyNotFound as exc:
print(f"geography error: {exc}")
print("exercised: censustables.search / table.variables.list / propertydatas.list / GeographyNotFound")
Get property and housing statistics for a specified geography. Returns median home value, median rent, owner/renter occupancy, housing unit counts, median year built, median rooms, household income, and monthly housing costs from ACS data. Makes multiple requests to Census data tables and merges results by geography. For state-level queries with geo_code=*, returns all 52 states/territories.
| Param | Type | Description |
|---|---|---|
| year | string | ACS data year (e.g. 2022, 2021, 2020). |
| dataset | string | ACS dataset: acs/acs5 (5-year estimates, all geographies) or acs/acs1 (1-year estimates, larger areas only). |
| geo_code | string | FIPS code for the geography, or * for all entities at the specified geo_level. |
| geo_level | string | Geography level. Accepted values: state, county, place, zip, tract. |
| state_code | string | 2-digit state FIPS code. Required for place and tract queries; optional for county queries to filter within a state. |
| county_code | string | 3-digit county FIPS code. Required for tract queries. |
{
"type": "object",
"fields": {
"year": "string, the data year queried",
"dataset": "string, the ACS dataset used",
"results": "array of objects with geo_id, name, median_home_value, median_gross_rent, total_occupied_units, owner_occupied_units, renter_occupied_units, total_housing_units, occupied_units, vacant_units, median_year_built, median_rooms, median_household_income, median_monthly_housing_costs, and applicable FIPS codes",
"geo_level": "string, geography level queried",
"total_results": "integer, number of geographic areas returned"
},
"sample": {
"data": {
"year": "2022",
"dataset": "acs/acs5",
"results": [
{
"name": "California",
"geo_id": "0400000US06",
"state_fips": "06",
"median_rooms": 5,
"vacant_units": 1108620,
"occupied_units": 13315822,
"median_gross_rent": 1856,
"median_home_value": 659300,
"median_year_built": 1976,
"total_housing_units": 14424442,
"owner_occupied_units": 7407361,
"total_occupied_units": 13315822,
"renter_occupied_units": 5908461,
"median_household_income": 91905,
"median_monthly_housing_costs": 1947
}
],
"geo_level": "state",
"total_results": 1
},
"status": "success"
}
}About the Census API
What the API returns
The get_property_data endpoint returns an array of geographic areas, each with fields including median_home_value, median_gross_rent, total_occupied_units, owner_occupied_units, renter_occupied_units, and additional housing cost and structure metrics. You can target any ACS-supported geography using geo_level (state, county, place, zip, or tract), supply a specific FIPS code via geo_code, or pass * to retrieve all entities at that level. The state_code and county_code params are required for narrower geographies like tracts.
Choosing the right dataset
The dataset param selects between acs/acs5 (5-year estimates, covering all geographies including small census tracts and ZIP codes) and acs/acs1 (1-year estimates, restricted to areas with populations of 65,000 or more). The year param controls which ACS release is queried — for example, 2022 returns the most recently published 2022 estimates. 5-year estimates are generally preferred for tract- and ZIP-level analysis due to their larger sample sizes.
Discovering tables and variables
The search_property_tables endpoint accepts a query keyword and returns matching ACS table IDs, descriptions, and a variables_url for each. Once you have a table ID — for example, B25077 for median home value or B25001 for total housing units — pass it to get_table_variables to inspect every variable code, label, concept, and data type in that table. This discovery workflow lets you identify the exact variable codes available before constructing a data query.
The Census API is a managed, monitored endpoint for census.gov — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when census.gov changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official census.gov API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Map median home values and gross rents by county or ZIP code for a real estate market analysis tool.
- Compare owner-occupied vs. renter-occupied unit ratios across states for housing policy research.
- Build a neighborhood demographic dashboard pulling tract-level household income and housing cost data.
- Filter ACS tables by keyword to discover relevant census variables for a custom housing affordability index.
- Aggregate total housing unit counts by state to model regional housing supply trends over multiple ACS years.
- Pull median year built by census tract to identify older housing stock for renovation or infrastructure planning.
- Query place-level housing data to enrich a city comparison tool with census-sourced rental and ownership metrics.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does the US Census Bureau provide an official developer API?+
What geography levels does get_property_data support, and are there any requirements for narrower geographies?+
geo_level param accepts state, county, place, zip, and tract. For place and tract queries, state_code (2-digit FIPS) is required. For tract queries, county_code (3-digit FIPS) is also required. County queries optionally accept state_code to restrict results to a single state.Does the acs/acs1 dataset cover all geographies?+
acs/acs1) only covers geographic areas with populations of 65,000 or more. Smaller counties, most census tracts, and many ZIP Code Tabulation Areas are only available in the 5-year estimates (acs/acs5). Use acs/acs5 when querying tract- or ZIP-level data.Can I retrieve individual household-level records or microdata through this API?+
Does the API expose non-housing Census variables like population, education, or commute data?+
get_property_data focus on housing metrics. However, search_property_tables and get_table_variables let you browse ACS table groups beyond housing. Non-housing demographic variables are not surfaced in the current response schema. You can fork the API on Parse and revise it to add endpoints targeting other ACS subject tables.