---
title: "Compare one indicator across every official source in its chain (per-source values, citations, spread)"
method: GET
path: "/v1/compare"
---

# Compare one indicator across every official source in its chain (per-source values, citations, spread)

`GET /v1/compare`

## Request

- Base URL: `https://statcite.com`
- URL: `https://statcite.com/v1/compare`
- Auth: none declared

## Query parameters

- `indicator` string, required
- `country` string, required
- `period` string

## Response `200`

Per-source values with citations and a spread; differences are methodological, never a source error

- object
  - `indicator` string, required
  - `label` string
  - `country` object, required
    - `iso3` string
    - `iso2` string
    - `name` string
  - `period` string
  - `results` object[], required
    - `source` string, required
    - `ok` boolean, required
    - `period` string
    - `value` number, nullable
    - `unit` string, nullable
    - `note` string: About this observation, e.g. that it is an IMF projection, or the definition of a related series.
    - `error` string: Present when ok is false: why this source returned nothing.
    - `excluded_from_comparison` boolean: A related series on a different definition (for example the Eastern Caribbean Central Bank's own debt measure), shown for context and not counted in the spread.
    - `citation` Citation: Every numeric payload carries one of these. Reproduce citation_text when presenting the number.
      - `source` string
      - `dataset` string
      - `series_id` string
      - `series_name` string
      - `source_url` string
      - `api_url` string
      - `license` string
      - `attribution` string
      - `retrieved_at` string
      - `citation_text` string
      - `notices` string[]
      - `export_formats` object: Ready-to-paste citation strings derived from this citation's own fields, so they can never disagree with citation_text.
        - `bibtex` string
        - `apa` string
  - `comparison` object: Present when two or more sources have a value for the compared period.
    - `period` string, required
    - `n_sources` integer, required
    - `min` number, required
    - `max` number, required
    - `spread_abs` number, required
    - `spread_pct` number, nullable, required: Spread as a percent of the mid-point, null when the mid-point is about zero.
  - `notes` string[]

## Other responses

- `400`: Malformed, missing, unknown or repeated query parameter. The message names the parameter and lists what the route accepts.
- `405`: Method not supported on this endpoint. The Allow header lists what is.
- `422`: The request was well formed but cannot be answered, e.g. the source does not publish this series for this economy.

---

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