---
title: "Api Stats"
method: GET
path: "/api/v1/{country}/stats"
tags: ["api"]
---

# Api Stats

`GET /api/v1/{country}/stats`

## Request

- Base URL: `https://legalize.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://legalize.dev/api/v1/{country}/stats`
- Auth: API key in header `Authorization`

Get aggregate statistics: reform activity by year, most reformed laws, and law types.

## Path parameters

- `country` string, required

## Query parameters

- `jurisdiction` string, nullable: Scope the statistics to one jurisdiction code, or 'national' for the laws that carry no jurisdiction at all (the national corpus).

## Response `200`

Successful Response

- StatsResponse
  - `country` string, required
  - `jurisdiction` string, nullable
  - `reform_activity_by_year` object[], required
  - `most_reformed_laws` object[], required
  - `law_types` string[], required
  - `article_coverage` ArticleCoverage: How much of a corpus is broken down into articles. ``article_count: 0`` on a law is ambiguous — it can mean the law has no articles, or that nobody ever broke it down — and a caller only finds out the hard way, by asking for one article and getting the whole document. This is the same question asked of a whole corpus, before that happens.
    - `laws_with_articles` integer, required
    - `laws_total` integer, required
    - `articles_total` integer, required

## Other responses

- `401`: Missing, malformed, or invalid API key
- `422`: Validation Error
- `429`: Monthly quota exceeded. Includes Retry-After header.

---

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