OpenHousing Public API

Free, open access to U.S. housing affordability data. No authentication required.

Overview

Base URL: https://openhousing.org/api/v1

Format: JSON

Authentication: None required

Rate Limit: 100 requests/minute per IP

CORS: Enabled for all origins

All list endpoints return { data: [...], meta: { total, limit, offset, sort, order } }
GET/api/v1/stats

Returns aggregate national housing statistics.

Example

curl https://openhousing.org/api/v1/stats

Response

{
  "data": {
    "medianHomePrice": 412000,
    "medianRent": 1850,
    "medianHouseholdIncome": 80610,
    "affordableHomeShortage": 7300000,
    "homelessPeople": 770000,
    ...
  }
}
GET/api/v1/states

Returns housing data for all 50 states + DC.

Parameters

ParamTypeDefaultDescription
sortstringaffordabilityScoreField to sort by
orderstringdescasc or desc
limitinteger100Max results (1–500)
offsetinteger0Pagination offset
statestringFilter by state name or abbreviation

Example

curl "https://openhousing.org/api/v1/states?sort=medianHomePrice&order=desc&limit=5"

Response

{
  "data": [
    { "abbr": "HI", "name": "Hawaii", "affordabilityScore": 12, "medianHomePrice": 900000, ... },
    ...
  ],
  "meta": { "total": 51, "limit": 5, "offset": 0, "sort": "medianHomePrice", "order": "desc" }
}
GET/api/v1/metros

Returns housing data for the 100 largest metro areas.

Parameters

ParamTypeDefaultDescription
sortstringaffordabilityScoreField to sort by
orderstringdescasc or desc
limitinteger100Max results (1–500)
offsetinteger0Pagination offset
statestringFilter by state abbreviation

Example

curl "https://openhousing.org/api/v1/metros?state=CA&sort=medianRent&order=desc"

Response

{
  "data": [
    { "slug": "san-francisco-ca", "name": "San Francisco", "state": "CA", "affordabilityScore": 12, ... },
    ...
  ],
  "meta": { "total": 7, "limit": 100, "offset": 0, "sort": "medianRent", "order": "desc" }
}
GET/api/v1/counties

Returns housing data for 200 U.S. counties.

Parameters

ParamTypeDefaultDescription
sortstringaffordabilityScoreField to sort by
orderstringdescasc or desc
limitinteger100Max results (1–500)
offsetinteger0Pagination offset
statestringFilter by state abbreviation

Example

curl "https://openhousing.org/api/v1/counties?state=TX&limit=10"

Response

{
  "data": [
    { "slug": "harris-tx", "name": "Harris County", "stateAbbr": "TX", "affordabilityScore": 48, ... },
    ...
  ],
  "meta": { "total": 15, "limit": 10, "offset": 0, "sort": "affordabilityScore", "order": "desc" }
}
GET/api/v1/cities

Returns housing data for 243 U.S. cities.

Parameters

ParamTypeDefaultDescription
sortstringaffordabilityScoreField to sort by
orderstringdescasc or desc
limitinteger100Max results (1–500)
offsetinteger0Pagination offset
statestringFilter by state abbreviation

Example

curl "https://openhousing.org/api/v1/cities?sort=rentBurdenPct&order=desc&limit=5"

Response

{
  "data": [
    { "slug": "miami-fl", "name": "Miami", "stateAbbr": "FL", "affordabilityScore": 14, "rentBurdenPct": 48.0, ... },
    ...
  ],
  "meta": { "total": 243, "limit": 5, "offset": 0, "sort": "rentBurdenPct", "order": "desc" }
}

Usage Examples

Python

import requests

resp = requests.get("https://openhousing.org/api/v1/states", params={
    "sort": "medianHomePrice",
    "order": "desc",
    "limit": 10
})
data = resp.json()
for state in data["data"]:
    print(f"{state['name']}: ${state['medianHomePrice']:,}")

JavaScript

const resp = await fetch(
  "https://openhousing.org/api/v1/metros?state=CA&sort=medianRent&order=desc"
);
const { data, meta } = await resp.json();
console.log(`Found ${meta.total} metros in CA`);
data.forEach(m => console.log(`${m.name}: $${m.medianRent}/mo`));

R

library(httr)
library(jsonlite)

resp <- GET("https://openhousing.org/api/v1/cities",
            query = list(sort = "rentBurdenPct", order = "desc", limit = 20))
data <- fromJSON(content(resp, "text"))$data
head(data[, c("name", "stateAbbr", "rentBurdenPct")])

License & Terms

All data is provided under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.

You are free to use, share, and adapt this data for any purpose — including commercial use — as long as you provide attribution to OpenHousing.

Suggested citation: "Data from OpenHousing (openhousing.org), CC BY 4.0."

Data is sourced from the U.S. Census Bureau, HUD, NLIHC, Zillow, and FRED. See individual data points for specific source notes.