StatCite Compare API

The Compare API from StatCite — 1 operation(s) for compare.

GitHub OpenAPI

Operations 1

GET /v1/compare Compare one indicator across every official source in its chain (per-source… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/statcite-com:statcite-com-compare-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

statcite-com-compare-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: StatCite Compare API
  version: 1.17.0
  description: Official economic statistics with full citations, built for AI agents. Every numeric response includes a citation object (source, dataset, series_id, source_url, license, attribution, retrieved_at, citation_text). Free, no auth, read-only. MCP endpoint at https://statcite.com/mcp.
  contact:
    email: hello@statcite.com
    url: https://statcite.com
  license:
    name: Service terms
    url: https://statcite.com/terms
servers:
- url: https://statcite.com
tags:
- name: Compare
paths:
  /v1/compare:
    get:
      operationId: compareSources
      summary: Compare one indicator across every official source in its chain (per-source…
      parameters:
      - name: indicator
        in: query
        required: true
        schema:
          type: string
        description: Registry key, e.g. govt_debt_gdp
      - name: country
        in: query
        required: true
        schema:
          type: string
      - name: period
        in: query
        schema:
          type: string
        description: Optional year; default = latest period all responding sources share
      responses:
        '200':
          description: Per-source values with citations and a spread; differences are methodological, never a source error
          content:
            application/json:
              schema:
                type: object
                required:
                - indicator
                - country
                - results
                properties:
                  indicator:
                    type: string
                  label:
                    type: string
                  country:
                    type: object
                    properties:
                      iso3:
                        type: string
                      iso2:
                        type: string
                      name:
                        type: string
                  period:
                    type: string
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        source:
                          type: string
                        ok:
                          type: boolean
                        period:
                          type: string
                        value:
                          type:
                          - number
                          - 'null'
                        unit:
                          type:
                          - string
                          - 'null'
                        note:
                          type: string
                          description: About this observation, e.g. that it is an IMF projection, or the definition of a related series.
                        error:
                          type: string
                          description: 'Present when ok is false: why this source returned nothing.'
                        excluded_from_comparison:
                          type: boolean
                          description: 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:
                          $ref: '#/components/schemas/Citation'
                      required:
                      - source
                      - ok
                  comparison:
                    type: object
                    description: Present when two or more sources have a value for the compared period.
                    properties:
                      period:
                        type: string
                      n_sources:
                        type: integer
                      min:
                        type: number
                      max:
                        type: number
                      spread_abs:
                        type: number
                      spread_pct:
                        type:
                        - number
                        - 'null'
                        description: Spread as a percent of the mid-point, null when the mid-point is about zero.
                    required:
                    - period
                    - n_sources
                    - min
                    - max
                    - spread_abs
                    - spread_pct
                  notes:
                    type: array
                    items:
                      type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '422':
          $ref: '#/components/responses/Unprocessable'
      tags:
      - Compare
components:
  schemas:
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              enum:
              - invalid_parameter
              - invalid_body
              - invalid_request
              - unknown_endpoint
              - method_not_allowed
              - unsupported_media_type
              - unknown_indicator
              - unknown_country
              - no_published_data
              - out_of_range
              - data_gap
              - primary_source_unavailable
              - upstream_unavailable
              - internal_error
              description: Stable machine-readable code. Branch on this, not on the message.
            message:
              type: string
              description: What went wrong and what to do instead, written for a person or an agent.
            details:
              type: object
              additionalProperties: true
              description: Structured context, e.g. suggestions, available_range, no_published_data, related_series.
    Citation:
      type: object
      description: Every numeric payload carries one of these. Reproduce citation_text when presenting the number.
      properties:
        source:
          type: string
        dataset:
          type: string
        series_id:
          type: string
        series_name:
          type: string
        source_url:
          type: string
        api_url:
          type: string
        license:
          type: string
        attribution:
          type: string
        retrieved_at:
          type: string
        citation_text:
          type: string
        notices:
          type: array
          items:
            type: string
        export_formats:
          type: object
          description: Ready-to-paste citation strings derived from this citation's own fields, so they can never disagree with citation_text.
          properties:
            bibtex:
              type: string
            apa:
              type: string
  responses:
    MethodNotAllowed:
      description: Method not supported on this endpoint. The Allow header lists what is.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unprocessable:
      description: The request was well formed but cannot be answered, e.g. the source does not publish this series for this economy.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Malformed, missing, unknown or repeated query parameter. The message names the parameter and lists what the route accepts.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'