---
title: "All statistics for one postal code area"
method: GET
path: "/api/v1/postal-codes/{postalCode}/stats"
tags: ["Areas"]
---

# All statistics for one postal code area

`GET /api/v1/postal-codes/{postalCode}/stats`

## Request

- Base URL: `https://suomiatlas.com`
- URL: `https://suomiatlas.com/api/v1/postal-codes/{postalCode}/stats`
- Auth: one of:
  - none
  - HTTP bearer

The main area endpoint: every published metric for one area, with national, municipal and regional percentiles, plus an embedded crime block. **Entirely free** — including the latest dwelling sale prices and crime figures. History is what costs money, not the current picture.

Two things to read carefully. A null inside `variables` means Statistics Finland suppressed that figure for this area, usually because too few people or dwellings lie behind it — nothing is withheld here for payment. And `nationalMedians` is a median only for some metrics: check `nationalBenchmarkBasis` for the same key before describing any of these numbers, because for average-type metrics (mean incomes, dwelling prices) the value is a weighted mean.

Housing metrics carry their own, usually newer, vintage — see `housingPricesYear`.

Example request: https://suomiatlas.com/api/v1/postal-codes/00120/stats

## Path parameters

- `postalCode` string, required

## Query parameters

- `year` integer

## Response `200`

Statistics for the resolved year.

- PostalCodeStats
  - `postalCode` string, required
  - `year` integer, required: The year actually served, which may differ from the one requested.
  - `variables` NullableNumberMap, required: Metric code to value. A key may be present with a null value — Statistics Finland suppresses figures resting on too few people or dwellings.
  - `variableNames` StringMap, required
  - `variableGroups` object, required: Group name to the metrics in that group, for laying out a panel.
  - `nationalMedians` NullableNumberMap, required: Metric code to value. A key may be present with a null value — Statistics Finland suppresses figures resting on too few people or dwellings.
  - `nationalBenchmarkBasis` StringMap, required
  - `nationalBenchmarkCoverage` NullableNumberMap, required: Metric code to value. A key may be present with a null value — Statistics Finland suppresses figures resting on too few people or dwellings.
  - `ratioBenchmarks` object, required: National benchmarks for numerator/denominator pairs, keyed `"numeratorCode:denominatorCode"`.
  - `percentiles` NullableNumberMap, required: Metric code to value. A key may be present with a null value — Statistics Finland suppresses figures resting on too few people or dwellings.
  - `kuntaPercentiles` NullableNumberMap, required: Metric code to value. A key may be present with a null value — Statistics Finland suppresses figures resting on too few people or dwellings.
  - `maakuntaPercentiles` NullableNumberMap, required: Metric code to value. A key may be present with a null value — Statistics Finland suppresses figures resting on too few people or dwellings.
  - `maakuntaName` string, nullable, required
  - `crime` CrimeStats, nullable, required: Crime is published per municipality, never per postal area, so this block describes the area's whole municipality.
    - `kuntaCode` string, required
    - `kuntaName` string, required
    - `year` integer, required
    - `maakuntaName` string, nullable, required
    - `metrics` CrimeMetric[], required
      - `code` string, required
      - `name` string, required
      - `unit` string, required
      - `value` number, double, nullable, required
      - `nationalPercentile` number, double, nullable, required
      - `maakuntaPercentile` number, double, nullable, required
      - `trend` TrendPoint[], required
        - `year` integer, required
        - `value` number, double, required
  - `housingPricesYear` integer, nullable, required: Dwelling-price metrics carry their own, usually newer, vintage than `year`.
  - `groupYears` object, required: Data group → the year its values are from, for every group not at `year`: dwelling prices and each capital-region (HRI) group. A group absent here is at `year`.
  - `benchmarkScope` object, required: Variables that exist only for part of the country: `pks` (Helsinki, Espoo, Vantaa, Kauniainen) or `hr14` (the 14-municipality Helsinki region). Their benchmark and percentile are within that region, never national. Outside its region such a variable is absent from `variableGroups`.
  - `variableUnits` object, required: Variable → unit token (`k-m²` floor area, `€/m²`, `%`, …) for the variables in this response that have one. Most Paavo counts have none.

## Other responses

- `404`: No such place, or no data for it. Also what a non-numeric `year` produces, because query-parameter conversion fails before the operation runs.

---

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