{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-ninjas-com/json-schema/api-ninjas-com-airport-schema.json",
  "title": "Airport",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-ninjas-com-airports-api-openapi.yml#/components/schemas/Airport",
  "type": "object",
  "properties": {
    "icao": {
      "type": "string",
      "description": "International Civil Aviation Organization (ICAO) 4-character airport code."
    },
    "ident": {
      "type": "string",
      "description": "Universal airport identifier. Equals the ICAO code where one exists, otherwise a local or regional code."
    },
    "iata": {
      "type": "string",
      "description": "International Air Transport Association (IATA) 3-character airport code."
    },
    "name": {
      "type": "string",
      "description": "Airport name."
    },
    "city": {
      "type": "string",
      "description": "Airport city."
    },
    "region": {
      "type": "string",
      "description": "Administrative region such as state or province within a country."
    },
    "region_code": {
      "type": "string",
      "description": "ISO 3166-2 region code (e.g. US-CA)."
    },
    "country": {
      "type": "string",
      "description": "Airport country. Must be 2-character ISO-2 country code."
    },
    "country_name": {
      "type": "string",
      "description": "Full country name."
    },
    "continent": {
      "type": "string",
      "enum": [
        "AF",
        "AN",
        "AS",
        "EU",
        "NA",
        "OC",
        "SA"
      ],
      "description": "Continent code (AF, AN, AS, EU, NA, OC, SA)."
    },
    "elevation_ft": {
      "type": "integer",
      "description": "Airport elevation in feet."
    },
    "elevation_m": {
      "type": "number",
      "format": "double",
      "description": "Airport elevation in meters."
    },
    "latitude": {
      "type": "number",
      "format": "double",
      "description": "Latitude of the airport."
    },
    "longitude": {
      "type": "number",
      "format": "double",
      "description": "Longitude of the airport."
    },
    "timezone": {
      "type": "string",
      "description": "Airport timezone."
    },
    "type": {
      "type": "string",
      "enum": [
        "large_airport",
        "medium_airport",
        "small_airport",
        "heliport",
        "seaplane_base",
        "balloonport",
        "closed"
      ],
      "description": "Facility type: large_airport, medium_airport, small_airport, heliport, seaplane_base, balloonport, or closed."
    },
    "size": {
      "type": "string",
      "description": "Airport size.",
      "enum": [
        "large",
        "medium",
        "small"
      ]
    },
    "scheduled_service": {
      "type": "boolean",
      "description": "Whether the airport has scheduled airline service."
    },
    "is_closed": {
      "type": "boolean",
      "description": "Whether the facility is permanently closed."
    },
    "gps_code": {
      "type": "string",
      "description": "GPS/navigation database code."
    },
    "local_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "Local/national airport code."
    },
    "home_link": {
      "type": "string",
      "description": "Official airport website URL."
    },
    "wikipedia_link": {
      "type": "string",
      "description": "Wikipedia article URL."
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Array of alternate names and codes used for search."
    },
    "num_runways": {
      "type": "integer",
      "description": "Number of runways at the airport."
    },
    "longest_runway_ft": {
      "type": "integer",
      "description": "Length of the longest runway in feet."
    },
    "runways": {
      "type": "array",
      "description": "Array of runway objects.",
      "items": {
        "$ref": "#/$defs/Runway"
      }
    },
    "estimated_annual_passengers": {
      "type": "integer",
      "description": "Estimated yearly passenger volume."
    }
  },
  "$defs": {
    "Runway": {
      "type": "object",
      "properties": {
        "length": {
          "type": "integer",
          "description": "Runway length in feet."
        },
        "width": {
          "type": "integer",
          "description": "Runway width in feet."
        },
        "has_lights": {
          "type": "boolean",
          "description": "Whether the runway has lights."
        },
        "surface": {
          "type": "string",
          "description": "Raw surface description (e.g. ASP)."
        },
        "surface_category": {
          "type": "string",
          "enum": [
            "paved",
            "unpaved",
            "water",
            "unknown"
          ],
          "description": "Normalized surface: paved, unpaved, water, or unknown."
        },
        "closed": {
          "type": "boolean",
          "description": "Whether the runway is closed."
        },
        "le_ident": {
          "type": "string",
          "description": "Runway low-end designator (e.g. 09L)."
        },
        "he_ident": {
          "type": "string",
          "description": "Runway high-end designator (e.g. 27R)."
        },
        "le_heading_deg": {
          "type": "number",
          "format": "double",
          "description": "True heading of the low runway end in degrees."
        },
        "he_heading_deg": {
          "type": "number",
          "format": "double",
          "description": "True heading of the high runway end in degrees."
        }
      }
    }
  }
}