# US Census Bureau API

> US Census Bureau returns population, place demographics, comparisons, and address details as a workflow and API.

US Census Bureau (Census Bureau) returns place facts through Get place facts; provide a US city, county, or state. Compare places returns population and demographic facts for 2 to 6 places; provide their names separated by semicolons. Get address details returns matched location and district facts; provide a full US street address.

- Page: https://fous.com/workflows/us-census-bureau
- Handle: `@us-census-bureau`
- Category: [Data](https://fous.com/workflows/category/data)
- Source website: https://census.gov
- Last verified: Sep 29, 2026
- Fous is not affiliated with US Census Bureau.

## Methods

### Compare places

Operation `compare_places`, version 1. 1 credit per call.

Compare population, age, income, education, housing and poverty for 2 to 6 US cities, counties or states. Population uses the latest July 1 estimate; other facts use the indicated American Community Survey year. Some places or values may not be available in QuickFacts.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `places` | string | yes | `"Travis County, TX; Texas; California"` | Two to six US cities, counties or states separated by semicolons, for example Austin, TX; Denver, CO; Raleigh, NC. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "places"
  ],
  "properties": {
    "places": {
      "type": "string",
      "description": "Two to six US cities, counties or states separated by semicolons, for example Austin, TX; Denver, CO; Raleigh, NC.",
      "examples": [
        "Travis County, TX; Texas; California",
        "Austin, TX; Denver, CO; Raleigh, NC"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "places": "Travis County, TX; Texas; California"
    },
    {
      "places": "Austin, TX; Denver, CO; Raleigh, NC"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `places` | array |  | Place facts in the same order as requested. |
| `places[].currency` | string | `"USD"` | Currency for the income and home value amounts (USD). |
| `places[].median_age` | number or null | `35.6` | Median age in years. |
| `places[].place_link` | string | `"https://www.census.gov/quickfacts/fact/table/traviscountytexas"` | QuickFacts page for this place. |
| `places[].place_name` | string | `"Travis County, Texas"` | Place name as matched by the Census Bureau. |
| `places[].population` | integer or null | `1389670` | Latest available July 1 population estimate. |
| `places[].percent_under_18` | number or null | `19.7` | Percent of residents under age 18. |
| `places[].homeownership_rate` | number or null | `52.1` | Percent of occupied housing units that are owner-occupied. |
| `places[].percent_in_poverty` | number or null | `10.5` | Percent of residents in poverty. |
| `places[].percent_65_and_over` | number or null | `11.6` | Percent of residents age 65 or older. |
| `places[].median_home_value_usd` | number or null | `523000` | Median value of owner-occupied homes in US dollars. |
| `places[].persons_per_household` | number or null | `2.23` | Average persons per household. |
| `places[].median_household_income_usd` | number or null | `99611` | Median household income in US dollars. |
| `places[].percent_bachelors_degree_or_higher` | number or null | `56.6` | Percent of adults age 25 or older with a bachelor’s degree or higher. |
| `data_year` | integer | `2024` | Last year of the five-year American Community Survey period used for age, income, education and housing. |
| `population_year` | integer | `2025` | Year of the latest July 1 population estimate. |
| `quickfacts_comparison_link` | string | `"https://www.census.gov/quickfacts/fact/table/traviscountytexas,TX,CA"` | QuickFacts comparison page for all requested places. |

**Example input**

```json
{
  "places": "Travis County, TX; Texas; California"
}
```

**Example output**

```json
{
  "places": [
    {
      "currency": "USD",
      "median_age": 35.6,
      "place_link": "https://www.census.gov/quickfacts/fact/table/traviscountytexas",
      "place_name": "Travis County, Texas",
      "population": 1389670,
      "percent_under_18": 19.7,
      "homeownership_rate": 52.1,
      "percent_in_poverty": 10.5,
      "percent_65_and_over": 11.6,
      "median_home_value_usd": 523000,
      "persons_per_household": 2.23,
      "median_household_income_usd": 99611,
      "percent_bachelors_degree_or_higher": 56.6
    },
    {
      "currency": "USD",
      "median_age": 35.6,
      "place_link": "https://www.census.gov/quickfacts/fact/table/TX",
      "place_name": "Texas",
      "population": 31709821,
      "percent_under_18": 24,
      "homeownership_rate": 62.6,
      "percent_in_poverty": 13.4,
      "percent_65_and_over": 14.9,
      "median_home_value_usd": 283800,
      "persons_per_household": 2.69,
      "median_household_income_usd": 78476,
      "percent_bachelors_degree_or_higher": 33.8
    },
    {
      "currency": "USD",
      "median_age": 37.9,
      "place_link": "https://www.census.gov/quickfacts/fact/table/CA",
      "place_name": "California",
      "population": 39355309,
      "percent_under_18": 20.8,
      "homeownership_rate": 55.9,
      "percent_in_poverty": 11.8,
      "percent_65_and_over": 17.5,
      "median_home_value_usd": 734700,
      "persons_per_household": 2.84,
      "median_household_income_usd": 99122,
      "percent_bachelors_degree_or_higher": 37.1
    }
  ],
  "data_year": 2024,
  "population_year": 2025,
  "quickfacts_comparison_link": "https://www.census.gov/quickfacts/fact/table/traviscountytexas,TX,CA"
}
```

### Get address details

Operation `get_address_details`, version 1. 1 credit per call.

Match a US street address to its city or place, county, state, ZIP code, census tract, congressional district and state legislative districts. Districts reflect the Census Geocoder's current geography vintage and may differ from sitting representation.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `address` | string | yes | `"1600 Pennsylvania Ave NW, Washington, DC 20500"` | Full US street address, such as 350 5th Ave, New York, NY 10118. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "address"
  ],
  "properties": {
    "address": {
      "type": "string",
      "description": "Full US street address, such as 350 5th Ave, New York, NY 10118.",
      "examples": [
        "1600 Pennsylvania Ave NW, Washington, DC 20500",
        "350 5th Ave, New York, NY 10118",
        "1 Dr Carlton B Goodlett Pl, San Francisco, CA 94102"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "address": "1600 Pennsylvania Ave NW, Washington, DC 20500"
    },
    {
      "address": "350 5th Ave, New York, NY 10118"
    },
    {
      "address": "1 Dr Carlton B Goodlett Pl, San Francisco, CA 94102"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `state` | string or null | `"District of Columbia"` | State name. |
| `county` | string or null | `"District of Columbia"` | County name. |
| `latitude` | number or null | `38.898702605245` | Latitude of the matched location. |
| `zip_code` | string or null | `"20500"` | ZIP code in the matched address. |
| `longitude` | number or null | `-77.035189204737` | Longitude of the matched location. |
| `block_fips` | string or null | `"110019800001034"` | Full 15-digit census block FIPS identifier (state, county, tract and block). |
| `state_fips` | string or null | `"11"` | Two-digit state FIPS code. |
| `tract_fips` | string or null | `"11001980000"` | Full 11-digit census tract FIPS identifier (state, county and tract). |
| `county_fips` | string or null | `"001"` | Three-digit county FIPS code. |
| `census_tract` | string or null | `"Census Tract 9800"` | Census tract name. |
| `city_or_place` | string or null | `"Washington"` | Incorporated place, census-designated place, or matched city. |
| `matched_address` | string or null | `"1600 PENNSYLVANIA AVE NW, WASHINGTON, DC, 20500"` | Street address matched by the Census Geocoder. |
| `google_maps_link` | string or null | `"https://www.google.com/maps/search/?api=1&query=1600%20PENNSYLVANIA%20AVE%20NW%2C%20WASHINGTON%2C%20DC%2C%2020500"` | Google Maps search link for the matched address. |
| `congressional_district` | string or null | `"Delegate District (at Large)"` | Congressional district label. |
| `state_legislative_district_lower` | string or null | `"Assembly District 75"` | State lower-chamber district name, when available. |
| `state_legislative_district_upper` | string or null | `"Ward 2"` | State upper-chamber district name, when available. |

**Example input**

```json
{
  "address": "1600 Pennsylvania Ave NW, Washington, DC 20500"
}
```

**Example output**

```json
{
  "state": "District of Columbia",
  "county": "District of Columbia",
  "latitude": 38.898702605245,
  "zip_code": "20500",
  "longitude": -77.035189204737,
  "block_fips": "110019800001034",
  "state_fips": "11",
  "tract_fips": "11001980000",
  "county_fips": "001",
  "census_tract": "Census Tract 9800",
  "city_or_place": "Washington",
  "matched_address": "1600 PENNSYLVANIA AVE NW, WASHINGTON, DC, 20500",
  "google_maps_link": "https://www.google.com/maps/search/?api=1&query=1600%20PENNSYLVANIA%20AVE%20NW%2C%20WASHINGTON%2C%20DC%2C%2020500",
  "congressional_district": "Delegate District (at Large)",
  "state_legislative_district_lower": null,
  "state_legislative_district_upper": "Ward 2"
}
```

### Get place facts

Operation `get_place_facts`, version 1. 1 credit per call.

Get population, age, income, poverty, education and housing facts for a US city, county or state. QuickFacts covers places with at least 5,000 people; figures come from different years and Census programs.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `place` | string | yes | `"Austin, Texas"` | US city with state, county with state, or state name, for example Austin, Texas. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "place"
  ],
  "properties": {
    "place": {
      "type": "string",
      "description": "US city with state, county with state, or state name, for example Austin, Texas.",
      "examples": [
        "Austin, Texas",
        "Cook County, IL",
        "Ohio"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "place": "Austin, Texas"
    },
    {
      "place": "Cook County, IL"
    },
    {
      "place": "Ohio"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `median_age` | object |  |  |
| `median_age.value` | number or null | `34.7` |  |
| `median_age.source` | string or null | `"U.S. Census Bureau, American Community Survey 2024 5-year estimates, table S0101"` |  |
| `median_age.data_year` | string or null | `"2020-2024"` |  |
| `place_name` | string | `"Austin city, Texas"` |  |
| `population` | object |  |  |
| `population.value` | number or null | `1002632` |  |
| `population.source` | string or null | `"U.S. Census Bureau, Population Estimates Program 2025 (QuickFacts)"` |  |
| `population.data_year` | string or null | `"2025"` |  |
| `quickfacts_link` | string | `"https://www.census.gov/quickfacts/fact/table/austincitytexas"` |  |
| `percent_under_18` | object |  |  |
| `percent_under_18.value` | number or null | `18` |  |
| `percent_under_18.source` | string or null | `"U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)"` |  |
| `percent_under_18.data_year` | string or null | `"2020-2024"` |  |
| `median_home_value` | object |  |  |
| `median_home_value.value` | number or null | `555300` |  |
| `median_home_value.source` | string or null | `"U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)"` |  |
| `median_home_value.currency` | string | `"USD"` |  |
| `median_home_value.data_year` | string or null | `"2020-2024"` |  |
| `percent_in_poverty` | object |  |  |
| `percent_in_poverty.value` | number or null | `12` |  |
| `percent_in_poverty.source` | string or null | `"U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)"` |  |
| `percent_in_poverty.data_year` | string or null | `"2020-2024"` |  |
| `percent_65_and_over` | object |  |  |
| `percent_65_and_over.value` | number or null | `10.4` |  |
| `percent_65_and_over.source` | string or null | `"U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)"` |  |
| `percent_65_and_over.data_year` | string or null | `"2020-2024"` |  |
| `persons_per_household` | object |  |  |
| `persons_per_household.value` | number or null | `2.1` |  |
| `persons_per_household.source` | string or null | `"U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)"` |  |
| `persons_per_household.data_year` | string or null | `"2020-2024"` |  |
| `median_household_income` | object |  |  |
| `median_household_income.value` | number or null | `93658` |  |
| `median_household_income.source` | string or null | `"U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)"` |  |
| `median_household_income.currency` | string | `"USD"` |  |
| `median_household_income.data_year` | string or null | `"2020-2024"` |  |
| `homeownership_rate_percent` | object |  |  |
| `homeownership_rate_percent.value` | number or null | `43.4` |  |
| `homeownership_rate_percent.source` | string or null | `"U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)"` |  |
| `homeownership_rate_percent.data_year` | string or null | `"2020-2024"` |  |
| `percent_bachelors_degree_or_higher` | object |  |  |
| `percent_bachelors_degree_or_higher.value` | number or null | `59.6` |  |
| `percent_bachelors_degree_or_higher.source` | string or null | `"U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)"` |  |
| `percent_bachelors_degree_or_higher.data_year` | string or null | `"2020-2024"` |  |

**Example input**

```json
{
  "place": "Austin, Texas"
}
```

**Example output**

```json
{
  "median_age": {
    "value": 34.7,
    "source": "U.S. Census Bureau, American Community Survey 2024 5-year estimates, table S0101",
    "data_year": "2020-2024"
  },
  "place_name": "Austin city, Texas",
  "population": {
    "value": 1002632,
    "source": "U.S. Census Bureau, Population Estimates Program 2025 (QuickFacts)",
    "data_year": "2025"
  },
  "quickfacts_link": "https://www.census.gov/quickfacts/fact/table/austincitytexas",
  "percent_under_18": {
    "value": 18,
    "source": "U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)",
    "data_year": "2020-2024"
  },
  "median_home_value": {
    "value": 555300,
    "source": "U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)",
    "currency": "USD",
    "data_year": "2020-2024"
  },
  "percent_in_poverty": {
    "value": 12,
    "source": "U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)",
    "data_year": "2020-2024"
  },
  "percent_65_and_over": {
    "value": 10.4,
    "source": "U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)",
    "data_year": "2020-2024"
  },
  "persons_per_household": {
    "value": 2.1,
    "source": "U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)",
    "data_year": "2020-2024"
  },
  "median_household_income": {
    "value": 93658,
    "source": "U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)",
    "currency": "USD",
    "data_year": "2020-2024"
  },
  "homeownership_rate_percent": {
    "value": 43.4,
    "source": "U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)",
    "data_year": "2020-2024"
  },
  "percent_bachelors_degree_or_higher": {
    "value": 59.6,
    "source": "U.S. Census Bureau, American Community Survey 2020-2024 5-year estimates (QuickFacts)",
    "data_year": "2020-2024"
  }
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@us-census-bureau",
  "visibility": "public",
  "operation": "compare_places",
  "version": 1,
  "input": {
    "places": "Travis County, TX; Texas; California"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@us-census-bureau\",\n  \"visibility\": \"public\",\n  \"operation\": \"compare_places\",\n  \"version\": 1,\n  \"input\": {\n    \"places\": \"Travis County, TX; Texas; California\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@us-census-bureau",
  "visibility": "public",
  "operation": "compare_places",
  "version": 1,
  "input": {
    "places": "Travis County, TX; Texas; California"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@us-census-bureau","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Review population and demographic facts for a city, county, or state.
- Compare population, income, education, and housing across places.
- Match an address to its county, ZIP code, and census tract.
- Identify congressional and state legislative districts for an address.

## FAQ

### Is Fous affiliated with US Census Bureau?

No. Fous is not affiliated with US Census Bureau. This workflow reads the public census.gov website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a US Census Bureau account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from census.gov when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What are a place’s population and median age?

Get place facts returns population and median age for a supplied US city, county, or state.

### How do population and demographics compare across places?

Compare places returns population and demographic facts for 2 to 6 supplied US cities, counties, or states.

### Which census tract and districts match an address?

Get address details returns the matched census tract, congressional district, and state legislative districts when available.

## Related

- [USPS API](https://fous.com/workflows/usps.md): USPS provides latest available package tracking, standardized U.S. addresses with ZIP+4, recommended cities for five-digit ZIP Codes, and estimated domestic postage and delivery dates.
- [FEMA API](https://fous.com/workflows/fema.md): FEMA provides public U.S. flood maps and disaster information, including approximate address-based flood risk details and federal disaster declarations by state or county.
- [House.gov API](https://fous.com/workflows/house-gov.md): Official United States House of Representatives website.
- [Zippopotam.us API](https://fous.com/workflows/zippopotam-us.md): Zippopotam.us returns places, regions and coordinates for postal codes in supported countries, and finds postal codes, places and coordinates by town and region.
- [OpenStreetMap API](https://fous.com/workflows/openstreetmap.md): OpenStreetMap returns place coordinates, address details, nearby readable place information, and ordered place search results from contributor-created data; results reflect mapped features and may be incomplete or differ from landmarks.
- [Zillow API](https://fous.com/workflows/zillow.md): Zillow provides homes for sale, rental listings, home details, estimates, and housing market figures; rental details, history, schools, estimates, and market figures may be missing or reflect different reporting dates.
- [Numbeo API](https://fous.com/workflows/numbeo.md): Numbeo provides current city cost-of-living indices, monthly estimates excluding rent, typical prices, and two-city comparisons of prices, purchasing power, and rent-inclusive salary needs.
- [Walk Score API](https://fous.com/workflows/walk-score.md): Walkability, transit access and bikeability scores for places and addresses.
- [All Data workflows](https://fous.com/workflows/category/data)
