{
  "openapi": "3.1.0",
  "info": {
    "title": "Airports API",
    "version": "1.0.0",
    "description": "85,944 airports, heliports and airfields worldwide by IATA or ICAO code, with runways and frequencies.\n\nLook up airports worldwide by IATA or ICAO code, search by name, city, country, or type, and find airports near any coordinate (sorted by distance). 85,000+ airports, heliports, seaplane bases and airfields from the public-domain OurAirports dataset — each with location, elevation, region, codes (IATA/ICAO/GPS/local), Wikipedia link, plus its runways (length, width, surface, lighting, headings) and radio frequencies (tower, approach, ATIS...). Self-hosted and refreshed daily — no third-party calls.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/airports.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/airports"
  },
  "servers": [
    {
      "url": "https://api-airports.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Data",
      "description": "Airports API belongs to the Data category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/airports/{code}": {
      "get": {
        "operationId": "getAirport",
        "summary": "Get Airport",
        "description": "Get Airport endpoint of the Airports API. Costs 2 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/airports/get-airport"
        },
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "LAX"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "id": 3632,
                  "ident": "KLAX",
                  "type": "large_airport",
                  "name": "Los Angeles International Airport",
                  "latitude": 33.942501,
                  "longitude": -118.407997,
                  "elevation_ft": 125,
                  "continent": "NA",
                  "iso_country": "US",
                  "iso_region": "US-CA",
                  "municipality": "Los Angeles",
                  "scheduled_service": "yes",
                  "icao_code": "KLAX",
                  "iata_code": "LAX",
                  "gps_code": "KLAX",
                  "local_code": "LAX",
                  "home_link": "https://www.flylax.com/",
                  "wikipedia_link": "https://en.wikipedia.org/wiki/Los_Angeles_International_Airport",
                  "keywords": null,
                  "runways": [
                    {
                      "length_ft": 8926,
                      "width_ft": 150,
                      "surface": "CON",
                      "lighted": true,
                      "closed": false,
                      "le_ident": "6L",
                      "le_heading_degT": 83,
                      "le_elevation_ft": 112,
                      "he_ident": "24R",
                      "he_heading_degT": 263,
                      "he_elevation_ft": 117
                    }
                  ],
                  "frequencies": [
                    {
                      "type": "APP",
                      "description": "SOCAL APP",
                      "frequency_mhz": 36.07
                    },
                    {
                      "type": "TWR",
                      "description": "LOS ANGELES TOWER",
                      "frequency_mhz": 133.9
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/airports/nearby": {
      "get": {
        "operationId": "nearbyAirports",
        "summary": "Nearby Airports",
        "description": "Nearby Airports endpoint of the Airports API. Costs 2 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/airports/nearby-airports"
        },
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "40.71"
          },
          {
            "name": "lon",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "-74.0"
          },
          {
            "name": "radius",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "100"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "lat": 40.71,
                  "lon": -74,
                  "radius_km": 100,
                  "count": 4,
                  "airports": [
                    {
                      "name": "Newark Liberty International Airport",
                      "iata_code": "EWR",
                      "type": "large_airport",
                      "distance_km": 15.6
                    },
                    {
                      "name": "LaGuardia Airport",
                      "iata_code": "LGA",
                      "type": "large_airport",
                      "distance_km": 12.1
                    },
                    {
                      "name": "John F. Kennedy International Airport",
                      "iata_code": "JFK",
                      "type": "large_airport",
                      "distance_km": 21.4
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/airports/search": {
      "get": {
        "operationId": "searchAirports",
        "summary": "Search Airports",
        "description": "Search Airports endpoint of the Airports API. Costs 2 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/airports/search-airports"
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "US"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "20"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "angeles"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "large_airport"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "query": "angeles",
                  "count": 1,
                  "airports": [
                    {
                      "name": "Los Angeles International Airport",
                      "type": "large_airport",
                      "iata_code": "LAX",
                      "icao_code": "KLAX",
                      "iso_country": "US",
                      "municipality": "Los Angeles"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 2 tokens per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}