---
title: "Stat Dispersion"
method: GET
path: "/api/v1/stats/dispersion/{stat_key}"
tags: ["stats"]
---

# Stat Dispersion

`GET /api/v1/stats/dispersion/{stat_key}`

## Request

- Base URL: `https://statsmapped.com`
- URL: `https://statsmapped.com/api/v1/stats/dispersion/{stat_key}`
- Auth: none declared

Generic cross-area dispersion for any stat registered in _DISPERSION_STATS --
see that dict's own comment for which stats qualify and why the rest don't yet.
A distinct path shape from /api/stats/sale_price/dispersion above (stat_key as the
LAST segment, not embedded mid-path) so the two routes can never collide or need a
declaration-order dependency between them. An unregistered/unknown stat_key 404s
rather than silently returning an empty response, so a client bug (a typo'd
stat_key) is distinguishable from "not enough data yet" in the network tab.

## Path parameters

- `stat_key` string, required

## Response `200`

Successful Response

- SalePriceDispersionResponse
  - `country` string
  - `years` SalePriceDispersionYear[], required
    - `country` string
    - `year` integer, required
    - `min` number, required
    - `p25` number, required
    - `median` number, required
    - `p75` number, required
    - `max` number, required
    - `min_area` string, required
    - `max_area` string, required
  - `movers` SalePriceRankMover[], required
    - `country` string
    - `geography_id` string, required
    - `area_name` string, required
    - `from_year` integer, required
    - `from_rank` integer, required
    - `to_year` integer, required
    - `to_rank` integer, required
    - `delta` integer, required
  - `caveats` Caveat[]
    - `country` string
    - `kind` string, required
    - `severity` string, required
    - `label` string, required
    - `body` string, required
    - `source_url` string, nullable
    - `origin` string, required
    - `interpretive` boolean
    - `stats` CaveatStats
      - `country` string
      - `median` number, required
      - `n` integer, required
      - `modified_z` number, required
      - `peer_basis` string, required

## Other responses

- `400`: Bad request
- `401`: Missing or invalid credentials
- `403`: Not authorized for this request
- `404`: Not found
- `422`: Validation error
- `429`: Rate limited

---

[API](https://skmtc.dev/statsmapped/apis/statsmapped-api.md) · [All operations](https://skmtc.dev/statsmapped/apis/statsmapped-api/llms.txt) · [OpenAPI document](https://skmtc.dev/statsmapped/apis/statsmapped-api/revisions/7c5b264d05b7?raw)
