{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-ninjas-com/json-schema/api-ninjas-com-geocoding-response-schema.json",
  "title": "GeocodingResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-ninjas-com-openapi.json#/components/schemas/GeocodingResponse",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "Name of the city."
      },
      "latitude": {
        "type": "number",
        "format": "double",
        "description": "Latitude coordinate of the city."
      },
      "longitude": {
        "type": "number",
        "format": "double",
        "description": "Longitude coordinate of the city."
      },
      "country": {
        "type": "string",
        "description": "ISO country code of the city."
      },
      "state": {
        "type": "string",
        "description": "State, province, or region of the city (e.g. England)."
      },
      "admin1_name": {
        "type": [
          "string",
          "null"
        ],
        "description": "First-level administrative division name (state, province, region). e.g. \"England\"."
      },
      "admin1_iso": {
        "type": [
          "string",
          "null"
        ],
        "description": "ISO 3166-2 code for the first-level division. e.g. \"GB-ENG\"."
      },
      "admin2_name": {
        "type": [
          "string",
          "null"
        ],
        "description": "Second-level administrative division (county or equivalent)."
      },
      "timezone": {
        "type": [
          "string",
          "null"
        ],
        "description": "IANA timezone name. e.g. \"Europe/London\"."
      },
      "population": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Population of the matched place."
      },
      "elevation_m": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Elevation in metres of the matched place."
      },
      "country_name": {
        "type": [
          "string",
          "null"
        ],
        "description": "Full country name."
      },
      "iso3": {
        "type": [
          "string",
          "null"
        ],
        "description": "ISO 3166-1 alpha-3 country code."
      },
      "iso_numeric": {
        "type": [
          "string",
          "null"
        ],
        "description": "ISO 3166-1 numeric country code."
      },
      "capital": {
        "type": [
          "string",
          "null"
        ],
        "description": "Capital city."
      },
      "continent": {
        "type": [
          "string",
          "null"
        ],
        "description": "Two-letter continent code."
      },
      "region": {
        "type": [
          "string",
          "null"
        ],
        "description": "UN M49 region name."
      },
      "subregion": {
        "type": [
          "string",
          "null"
        ],
        "description": "UN M49 sub-region name."
      },
      "currency": {
        "type": [
          "string",
          "null"
        ],
        "description": "ISO 4217 currency code."
      },
      "currency_name": {
        "type": [
          "string",
          "null"
        ],
        "description": "Currency name."
      },
      "calling_code": {
        "type": [
          "string",
          "null"
        ],
        "description": "International dialling prefix. e.g. \"+44\"."
      },
      "languages": {
        "type": [
          "string",
          "null"
        ],
        "description": "Comma-separated BCP-47 language tags."
      },
      "tld": {
        "type": [
          "string",
          "null"
        ],
        "description": "Country-code top-level domain."
      },
      "driving_side": {
        "type": [
          "string",
          "null"
        ],
        "description": "\"left\" or \"right\"."
      },
      "is_eu": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "Whether the country is an EU member state."
      },
      "is_eea": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "Whether the country is in the European Economic Area."
      },
      "plus_code": {
        "type": [
          "string",
          "null"
        ],
        "description": "Open Location Code (Plus Code) for the coordinate."
      },
      "geohash": {
        "type": [
          "string",
          "null"
        ],
        "description": "9-character geohash."
      },
      "dms": {
        "type": [
          "object",
          "null"
        ],
        "description": "Degrees/minutes/seconds representation.",
        "properties": {
          "latitude": {
            "type": "string"
          },
          "longitude": {
            "type": "string"
          }
        }
      },
      "mercator": {
        "type": [
          "object",
          "null"
        ],
        "description": "Web Mercator (EPSG:3857) coordinates in metres.",
        "properties": {
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          }
        }
      },
      "antipode": {
        "type": [
          "object",
          "null"
        ],
        "description": "The point diametrically opposite on the globe.",
        "properties": {
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          }
        }
      },
      "hemisphere": {
        "type": [
          "object",
          "null"
        ],
        "description": "Hemisphere indicators.",
        "properties": {
          "north_south": {
            "type": "string"
          },
          "east_west": {
            "type": "string"
          }
        }
      },
      "qibla_degrees": {
        "type": [
          "number",
          "null"
        ],
        "description": "Bearing to the Kaaba in Mecca, degrees clockwise from true north."
      },
      "sun": {
        "type": [
          "object",
          "null"
        ],
        "description": "Sunrise, sunset, solar noon and twilight times for today (UTC).",
        "properties": {
          "sunrise": {
            "type": [
              "string",
              "null"
            ]
          },
          "sunset": {
            "type": [
              "string",
              "null"
            ]
          },
          "solar_noon": {
            "type": [
              "string",
              "null"
            ]
          },
          "civil_dawn": {
            "type": [
              "string",
              "null"
            ]
          },
          "civil_dusk": {
            "type": [
              "string",
              "null"
            ]
          },
          "nautical_dawn": {
            "type": [
              "string",
              "null"
            ]
          },
          "nautical_dusk": {
            "type": [
              "string",
              "null"
            ]
          },
          "astronomical_dawn": {
            "type": [
              "string",
              "null"
            ]
          },
          "astronomical_dusk": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "climate_zone": {
        "type": [
          "string",
          "null"
        ],
        "description": "Köppen-Geiger climate classification code. e.g. \"Cfb\". Premium field: Free, Learner and Developer tiers receive a notice string in place of the value."
      },
      "climate_zone_name": {
        "type": [
          "string",
          "null"
        ],
        "description": "Human-readable climate classification. Premium field: Free, Learner and Developer tiers receive a notice string in place of the value."
      },
      "urbanisation": {
        "type": [
          "string",
          "null"
        ],
        "description": "GHSL degree-of-urbanisation class: URBAN_CENTRE, DENSE_URBAN_CLUSTER, SEMI_DENSE_URBAN, SUBURBAN, RURAL_CLUSTER, LOW_DENSITY_RURAL, VERY_LOW_DENSITY_RURAL or WATER. Premium field: Free, Learner and Developer tiers receive a notice string in place of the value."
      },
      "urbanisation_name": {
        "type": [
          "string",
          "null"
        ],
        "description": "Human-readable urbanisation class. Premium field: Free, Learner and Developer tiers receive a notice string in place of the value."
      },
      "is_land": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "Whether the coordinate falls on land. Inland water counts as not land. Premium field: Free, Learner and Developer tiers receive a notice string in place of the value."
      },
      "nearest_airport": {
        "type": [
          "object",
          "null"
        ],
        "description": "Nearest airport carrying an IATA code, with distance and bearing. Premium field: Free, Learner and Developer tiers receive a notice string in place of the value.",
        "properties": {
          "name": {
            "type": "string"
          },
          "iata": {
            "type": "string"
          },
          "icao": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "municipality": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "scheduled_service": {
            "type": "boolean"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "elevation_m": {
            "type": [
              "integer",
              "null"
            ]
          },
          "distance_km": {
            "type": "number"
          },
          "bearing_degrees": {
            "type": "number"
          }
        }
      },
      "county": {
        "type": [
          "string",
          "null"
        ],
        "description": "US county. Business tier and above."
      },
      "zip_code": {
        "type": [
          "string",
          "null"
        ],
        "description": "US ZIP code of the matched place. See zip_code_accuracy — this is not a point-in-polygon result. Premium field: Free, Learner and Developer tiers receive a notice string in place of the value."
      },
      "zip_code_accuracy": {
        "type": [
          "string",
          "null"
        ],
        "description": "How zip_code was derived: \"exact\" (the ZIP was the input), \"place_centroid\" (the matched place's ZIP), or \"nearest\" (nearest ZIP centroid). Premium field: Free, Learner and Developer tiers receive a notice string in place of the value."
      },
      "area_codes": {
        "type": [
          "array",
          "null"
        ],
        "description": "US telephone area codes serving the location. Premium field: Free, Learner and Developer tiers receive a notice string in place of the value.",
        "items": {
          "type": "string"
        }
      }
    },
    "required": [
      "name",
      "latitude",
      "longitude",
      "country"
    ]
  }
}