{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Internacia static API",
    "version": "4.2.0",
    "summary": "Countries, international organizations and country groupings from internacia-db, as static JSON.",
    "description": "Read-only JSON files built from internacia-db. No authentication, no rate limit, no query parameters: every resource is a file. Fields starting with an underscore are derived by the site; all other fields are internacia-db export fields. Retired IDs return an alias document instead of an entity.",
    "license": {
      "name": "CC-BY-4.0 (data); country centroids ODbL-1.0",
      "identifier": "CC-BY-4.0"
    },
    "contact": {
      "url": "https://github.com/datenoio/internacia-web"
    }
  },
  "servers": [
    {
      "url": "https://internacia.io/api/v1"
    }
  ],
  "externalDocs": {
    "description": "Guide for AI agents",
    "url": "https://internacia.io/llms.txt"
  },
  "paths": {
    "/index.json": {
      "get": {
        "operationId": "getIndex",
        "summary": "Entry points and counts",
        "responses": {
          "200": {
            "description": "API index",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/index.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/countries.json": {
      "get": {
        "operationId": "listCountries",
        "summary": "All countries and territories (lite)",
        "responses": {
          "200": {
            "description": "Lite list of countries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/countries-list.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/countries/{CODE}.json": {
      "get": {
        "operationId": "getCountry",
        "summary": "One country with memberships, borders and similar countries",
        "parameters": [
          {
            "name": "CODE",
            "in": "path",
            "required": true,
            "description": "Country code, uppercase, as in the data (e.g. FR, XK).",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Country document, or an alias document for a retired code",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/country.schema.json"
                }
              }
            }
          },
          "404": {
            "description": "Unknown code"
          }
        }
      }
    },
    "/blocks.json": {
      "get": {
        "operationId": "listBlocks",
        "summary": "All intblocks (lite)",
        "responses": {
          "200": {
            "description": "Lite list of intblocks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/blocks-list.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/blocks/{ID}.json": {
      "get": {
        "operationId": "getBlock",
        "summary": "One intblock with its resolved roster and structure",
        "parameters": [
          {
            "name": "ID",
            "in": "path",
            "required": true,
            "description": "Exact intblock ID, case-sensitive (e.g. EU, G-20, AfCFTA).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Intblock document, or an alias document for a retired ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/block.schema.json"
                }
              }
            }
          },
          "404": {
            "description": "Unknown ID"
          }
        }
      }
    },
    "/aliases.json": {
      "get": {
        "operationId": "listAliases",
        "summary": "Retired and renamed IDs",
        "responses": {
          "200": {
            "description": "Alias lists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/aliases.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/types.json": {
      "get": {
        "operationId": "listTypes",
        "summary": "All block types with their intblock IDs",
        "responses": {
          "200": {
            "description": "Block types",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/types-list.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/types/{KEY}.json": {
      "get": {
        "operationId": "getType",
        "summary": "One block type",
        "parameters": [
          {
            "name": "KEY",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Block type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/type.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/topics.json": {
      "get": {
        "operationId": "listTopics",
        "summary": "All topics with their intblock IDs",
        "responses": {
          "200": {
            "description": "Topics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/topics-list.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/topics/{KEY}.json": {
      "get": {
        "operationId": "getTopic",
        "summary": "One topic",
        "parameters": [
          {
            "name": "KEY",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Topic",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/topic.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/geography.json": {
      "get": {
        "operationId": "listAreas",
        "summary": "Continents and subregions",
        "responses": {
          "200": {
            "description": "Areas",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/geography-list.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/geography/{SLUG}.json": {
      "get": {
        "operationId": "getArea",
        "summary": "One continent or subregion",
        "parameters": [
          {
            "name": "SLUG",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Area",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/area.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/memberships.json": {
      "get": {
        "operationId": "listMemberships",
        "summary": "Every current membership edge of a country or territory",
        "responses": {
          "200": {
            "description": "Membership edges",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/memberships.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/headquarters.json": {
      "get": {
        "operationId": "listHeadquarters",
        "summary": "Intblock headquarters with coordinates",
        "responses": {
          "200": {
            "description": "Headquarters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/headquarters.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/stats.json": {
      "get": {
        "operationId": "getStats",
        "summary": "Field coverage, with the IDs of records missing each field",
        "responses": {
          "200": {
            "description": "Statistics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/stats.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/search-index.json": {
      "get": {
        "operationId": "getSearchIndex",
        "summary": "Names, acronyms and codes in all languages",
        "responses": {
          "200": {
            "description": "Finder index",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://internacia.io/api/v1/schemas/search-index.schema.json"
                }
              }
            }
          }
        }
      }
    }
  }
}
