Statistics of the World Sparklines API

The Sparklines API from Statistics of the World — 1 operation(s) for sparklines.

GitHub OpenAPI

Operations 1

GET /api/sparklines Recent history for compact charts #

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/statisticsoftheworld-com:statisticsoftheworld-com-sparklines-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

statisticsoftheworld-com-sparklines-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Statistics of the World Sparklines API
  description: REST API for global statistics. Every tier retains the 335-indicator public read catalog for 218 countries. Paid keys add higher request limits; bulk redistribution remains limited to source-cleared datasets, including the 281-indicator reviewed World Bank bundle. See https://statisticsoftheworld.com/pricing.
  version: 2.9.0
  contact:
    name: Statistics of the World
    url: https://statisticsoftheworld.com
    email: api@statisticsoftheworld.com
servers:
- url: https://statisticsoftheworld.com
  description: Production
security:
- {}
- ApiKeyAuth: []
tags:
- name: Sparklines
paths:
  /api/sparklines:
    get:
      operationId: getSparklines
      summary: Recent history for compact charts
      description: Most indicators retain the legacy country-to-number-array response. ECB.EXRATE instead returns schema_version=2, kind=ecb_annual_fx, indicator metadata, from_year/through_year and data mapping each country to EcbAnnualPoint records. Retain years, individual currency units and source context; do not interpret these as equally spaced value-only arrays.
      parameters:
      - name: indicator
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Legacy arrays, or explicitly versioned ECB annual histories.
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  additionalProperties:
                    type: array
                    items:
                      type: number
                - type: object
                  properties:
                    schema_version:
                      const: 2
                    kind:
                      const: ecb_annual_fx
                    data:
                      type: object
                      additionalProperties:
                        type: array
                        items:
                          $ref: '#/components/schemas/EcbAnnualPoint'
        '503':
          description: Required ECB capture unavailable; no-store.
      tags:
      - Sparklines
components:
  schemas:
    EcbAnnualPoint:
      type: object
      required:
      - year
      - value
      - unit
      - measurement
      properties:
        year:
          type: integer
        value:
          type:
          - number
          - 'null'
        unit:
          type: string
          description: Historical quote currency per EUR, such as RON per EUR. Never infer the current national currency.
        measurement:
          type: object
          required:
          - kind
          - quote_currency
          - base_currency
          - series_id
          - aggregation
          - observation_present
          - capture_sha256
          - source_retrieved_at
          properties:
            kind:
              const: ecb_annual_fx
            quote_currency:
              type: string
            base_currency:
              const: EUR
            series_id:
              type: string
            source_url:
              type: string
              format: uri
            aggregation:
              const: annual_average
            observation_present:
              type: boolean
              description: True for an actual source observation, even if its numeric value is null. False means no observation is present in the captured scope; no period or record ID is invented.
            period_start:
              type:
              - string
              - 'null'
            period_end:
              type:
              - string
              - 'null'
              description: Original annual source boundaries and offsets; not proof of complete sampling or final status.
            observation_status:
              type:
              - string
              - 'null'
            observation_status_name:
              type:
              - string
              - 'null'
              description: Publisher status; A/Normal value does not establish final observed data.
            confidentiality:
              type:
              - string
              - 'null'
              description: Source confidentiality code, not a licence grant.
            source_note:
              type:
              - string
              - 'null'
            compilation_note:
              type:
              - string
              - 'null'
            raw_source_value:
              type:
              - string
              - 'null'
            source_record_id:
              type:
              - string
              - 'null'
            capture_sha256:
              type: string
              pattern: ^[a-f0-9]{64}$
            capture_url:
              type: string
              format: uri
            source_retrieved_at:
              type: string
              description: Original retrieval time of this pair’s ECB response, distinct from capture construction, activation and unknown publisher vintage.
            coverage_start_year:
              type: integer
            coverage_end_year:
              type: integer
            missing_years:
              type: array
              items:
                type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Optional. Without a key, requests are limited to 1,000/day per IP. A free key adds a usage dashboard. Paid keys increase throughput without removing public sources. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-RateLimit-Tier headers.