---
title: "Two-country cost-of-living comparison across all datasets"
method: GET
path: "/api/compare.json"
---

# Two-country cost-of-living comparison across all datasets

`GET /api/compare.json`

## Request

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

## Query parameters

- `a` string, required
- `b` string, required

## Response `200`

spreads, ratioAtoB, pctDifference, salary100k both directions

## Other responses

- `400`: Required parameters missing; body includes code, message, and a worked example.
- `422`: Well-formed but invalid input; body includes a machine-readable code (e.g. UNKNOWN_TARGET) and message.
- `429`: A ceiling was exceeded. Body is { ok:false, code, message, retryAfterSeconds } where code is RATE_LIMITED (per-minute burst — back off and retry within the minute) or QUOTA_EXCEEDED (the monthly allowance is spent; retrying will not help until it resets on the 1st). Honour Retry-After.

---

[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)
