---
title: "Housing cost and affordability by country"
method: GET
path: "/api/housing.json"
---

# Housing cost and affordability by country

`GET /api/housing.json`

## Request

- Base URL: `https://geo-parity.com`
- URL: `https://geo-parity.com/api/housing.json`
- Auth: one of:
  - none
  - HTTP bearer
  - API key in query parameter `key`

Rent measured against two different incomes at once: the caller's remote income and the local median wage. The gap between those shares is the arbitrage. Also price-to-income and price-to-rent, each expressed as a percentage of that country's own long-run average (127% means 27% less affordable than its historical norm) rather than as an absolute ratio, so comparing two countries' percentages against each other is meaningless. Euro-area mortgage rates from the ECB; outside the euro area the field is absent rather than approximated. Every row carries rentBasis: measured rows use real published Eurostat city rents (Spain, Portugal, Switzerland), modelled rows are derived from the site's price basket, which against Eurostat's housing price level errs in both directions - understating by up to ~36% where housing has decoupled from the general price level (Ireland, Denmark, Czechia) and overstating by ~60% in Turkiye. National averages; not a quote for any tenancy, and not financial advice.

## Query parameters

- `sort` 'affordability' | 'rent' | 'localBurden' | 'priceToIncome'
- `country` string
- `remoteIncome` number
- `maxRentPctOfIncome` number
- `flatM2` number

## Response `200`

Ranked countries with rentBasis, per-metric reference years, a count of countries excluded for want of the sorted metric, and an attribution block.

## Other responses

- `400`: Invalid parameter (bad sort, or a non-positive income, filter or flat size).
- `422`: Unknown country code.

---

[API](https://skmtc.dev/geo-parity/apis/geo-parity-api.md) · [All operations](https://skmtc.dev/geo-parity/apis/geo-parity-api/llms.txt) · [OpenAPI document](https://skmtc.dev/geo-parity/apis/geo-parity-api/revisions/8ddff47a0806?raw)
