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
{ data: [...], meta: { total, limit, offset, sort, order } }/api/v1/statsReturns aggregate national housing statistics.
Example
curl https://openhousing.org/api/v1/statsResponse
{
"data": {
"medianHomePrice": 412000,
"medianRent": 1850,
"medianHouseholdIncome": 80610,
"affordableHomeShortage": 7300000,
"homelessPeople": 770000,
...
}
}/api/v1/statesReturns housing data for all 50 states + DC.
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
| sort | string | affordabilityScore | Field to sort by |
| order | string | desc | asc or desc |
| limit | integer | 100 | Max results (1–500) |
| offset | integer | 0 | Pagination offset |
| state | string | — | Filter 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" }
}/api/v1/metrosReturns housing data for the 100 largest metro areas.
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
| sort | string | affordabilityScore | Field to sort by |
| order | string | desc | asc or desc |
| limit | integer | 100 | Max results (1–500) |
| offset | integer | 0 | Pagination offset |
| state | string | — | Filter 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" }
}/api/v1/countiesReturns housing data for 200 U.S. counties.
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
| sort | string | affordabilityScore | Field to sort by |
| order | string | desc | asc or desc |
| limit | integer | 100 | Max results (1–500) |
| offset | integer | 0 | Pagination offset |
| state | string | — | Filter 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" }
}/api/v1/citiesReturns housing data for 243 U.S. cities.
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
| sort | string | affordabilityScore | Field to sort by |
| order | string | desc | asc or desc |
| limit | integer | 100 | Max results (1–500) |
| offset | integer | 0 | Pagination offset |
| state | string | — | Filter 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.