Statistics of the World Compare API

The Compare API from Statistics of the World — 1 operation(s) for compare.

GitHub OpenAPI

Operations 1

GET /api/v1/compare Compare multiple countries side by side #

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-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

statisticsoftheworld-com-compare-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Statistics of the World Compare 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: Compare
paths:
  /api/v1/compare:
    get:
      operationId: compareCountries
      summary: Compare multiple countries side by side
      description: Returns selected public indicators for up to 10 countries. Upgrading a key preserves source coverage and raises the request limit. Defaults to key macro indicators if none are specified.
      parameters:
      - name: countries
        in: query
        required: true
        schema:
          type: string
        description: Comma-separated ISO alpha-3 codes (e.g., USA,CHN,JPN). Max 10.
      - name: indicators
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated indicator IDs (max 30). Default: key macro set.'
      responses:
        '200':
          description: Comparison data keyed by country and indicator
        '400':
          description: Missing countries parameter
      tags:
      - Compare
components:
  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.