{
  "openapi": "3.1.0",
  "info": {
    "title": "Atlas Geopolitica API",
    "version": "1.0.0",
    "description": "Public API for country intelligence, rankings, and health checks published by Atlas Geopolitica. Public GET access is available anonymously, and OAuth discovery metadata is published for managed machine clients."
  },
  "servers": [
    {
      "url": "https://atlasgeopolitica.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Country Data",
      "description": "Cached country-level economic and institutional data."
    },
    {
      "name": "Rankings",
      "description": "Atlas Geopolitica Nodesteader Index rankings."
    },
    {
      "name": "Health",
      "description": "Operational and discovery metadata."
    }
  ],
  "paths": {
    "/api/rankings": {
      "get": {
        "tags": [
          "Rankings"
        ],
        "summary": "List country rankings",
        "description": "Returns the latest cached Nodesteader Index rankings for every ranked country.",
        "security": []
      }
    },
    "/api/worldbank/{country}": {
      "get": {
        "tags": [
          "Country Data"
        ],
        "summary": "Get country profile data",
        "description": "Returns cached World Bank indicators, time series, and Atlas micro-data for a two- or three-letter country code.",
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "required": true,
            "description": "A two- or three-letter ISO country code, for example CHL or USA.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2,3}$"
            }
          }
        ],
        "security": []
      }
    },
    "/api/health": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Check API health",
        "description": "Returns operational status and links to discovery resources such as the OpenAPI document and API catalog.",
        "security": []
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AtlasOAuth2": {
        "type": "oauth2",
        "description": "Optional machine-to-machine access for managed clients. Public GET endpoints remain anonymously accessible on this deployment.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://atlasgeopolitica.com/oauth/token",
            "scopes": {
              "atlas.read": "Read-only access to rankings, country data, and discovery metadata."
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Atlas Geopolitica API docs",
    "url": "https://atlasgeopolitica.com/docs/api/"
  },
  "links": {
    "apiCatalog": "https://atlasgeopolitica.com/.well-known/api-catalog",
    "openApi": "https://atlasgeopolitica.com/openapi.json",
    "agentSkills": "https://atlasgeopolitica.com/.well-known/agent-skills/index.json",
    "mcpServerCard": "https://atlasgeopolitica.com/.well-known/mcp/server-card.json",
    "oauthAuthorizationServer": "https://atlasgeopolitica.com/.well-known/oauth-authorization-server",
    "oauthProtectedResource": "https://atlasgeopolitica.com/.well-known/oauth-protected-resource"
  },
  "x-site-description": "Atlas Geopolitica is a country intelligence platform for relocation, investment, and resilience planning.",
  "x-oauth-authorization-server": "https://atlasgeopolitica.com/.well-known/oauth-authorization-server",
  "x-oauth-protected-resource": "https://atlasgeopolitica.com/.well-known/oauth-protected-resource"
}