REST Countries · JSON Structure

Rest Countries Country Structure

A country resource as returned by the REST Countries API (restcountries.com v3.1).

Type: object Properties: 35
CountriesGeocodingGeographyISO 3166Open-SourcePublic APIsReference DataCurrencyLanguageCapitalsRegionsSubregionsTranslations

Country is a JSON Structure definition published by REST Countries, describing 35 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

name tld cca2 ccn3 cca3 cioc independent status unMember currencies idd capital altSpellings region subregion languages translations latlng landlocked borders area demonyms flag maps population gini fifa car timezones continents flags coatOfArms startOfWeek capitalInfo postalCode

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/rest-countries/main/json-structure/rest-countries-country-structure.json",
  "name": "Country",
  "description": "A country resource as returned by the REST Countries API (restcountries.com v3.1).",
  "type": "object",
  "properties": {
    "name": {
      "type": "object",
      "description": "Country name including official and common forms plus per-language native names.",
      "properties": {
        "common": { "type": "string", "description": "Common country name in English." },
        "official": { "type": "string", "description": "Official country name in English." },
        "nativeName": {
          "type": "object",
          "description": "Native names keyed by ISO 639-3 language code.",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "official": { "type": "string" },
              "common": { "type": "string" }
            }
          }
        }
      }
    },
    "tld": { "type": "array", "items": { "type": "string" } },
    "cca2": { "type": "string", "minLength": 2, "maxLength": 2 },
    "ccn3": { "type": "string" },
    "cca3": { "type": "string", "minLength": 3, "maxLength": 3 },
    "cioc": { "type": "string" },
    "independent": { "type": "boolean" },
    "status": { "type": "string" },
    "unMember": { "type": "boolean" },
    "currencies": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "symbol": { "type": "string" }
        }
      }
    },
    "idd": {
      "type": "object",
      "properties": {
        "root": { "type": "string" },
        "suffixes": { "type": "array", "items": { "type": "string" } }
      }
    },
    "capital": { "type": "array", "items": { "type": "string" } },
    "altSpellings": { "type": "array", "items": { "type": "string" } },
    "region": { "type": "string" },
    "subregion": { "type": "string" },
    "languages": {
      "type": "object",
      "additionalProperties": { "type": "string" }
    },
    "translations": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "official": { "type": "string" },
          "common": { "type": "string" }
        }
      }
    },
    "latlng": { "type": "array", "items": { "type": "double" }, "minItems": 2, "maxItems": 2 },
    "landlocked": { "type": "boolean" },
    "borders": { "type": "array", "items": { "type": "string" } },
    "area": { "type": "double" },
    "demonyms": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "f": { "type": "string" },
          "m": { "type": "string" }
        }
      }
    },
    "flag": { "type": "string" },
    "maps": {
      "type": "object",
      "properties": {
        "googleMaps": { "type": "uri" },
        "openStreetMaps": { "type": "uri" }
      }
    },
    "population": { "type": "int64" },
    "gini": {
      "type": "object",
      "additionalProperties": { "type": "double" }
    },
    "fifa": { "type": "string" },
    "car": {
      "type": "object",
      "properties": {
        "signs": { "type": "array", "items": { "type": "string" } },
        "side": { "type": "string", "enum": ["left", "right"] }
      }
    },
    "timezones": { "type": "array", "items": { "type": "string" } },
    "continents": { "type": "array", "items": { "type": "string" } },
    "flags": {
      "type": "object",
      "properties": {
        "png": { "type": "uri" },
        "svg": { "type": "uri" },
        "alt": { "type": "string" }
      }
    },
    "coatOfArms": {
      "type": "object",
      "properties": {
        "png": { "type": "uri" },
        "svg": { "type": "uri" }
      }
    },
    "startOfWeek": { "type": "string", "enum": ["monday", "sunday", "saturday"] },
    "capitalInfo": {
      "type": "object",
      "properties": {
        "latlng": { "type": "array", "items": { "type": "double" }, "minItems": 2, "maxItems": 2 }
      }
    },
    "postalCode": {
      "type": "object",
      "properties": {
        "format": { "type": "string" },
        "regex": { "type": "string" }
      }
    }
  }
}

Work with this as data

Every JSON Structure 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 json structure

4 MCP tools reach this
  • find_json_structuresBrowse and filter every JSON Structure in the catalog.
  • 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 JSON Structure
curl "https://apis.io/api/v1/json-structures/rest-countries-country-structure"
All json structure
curl "https://apis.io/api/v1/json-structures?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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