Airports API v2
    Airports API v2
    • All airports
      GET
    • Airport(s) by country code.
      GET
    • Nearest airport(s) by geo coordinates.
      GET
    • Nearest airport(s) by airport id.
      GET
    • Airport by id.
      GET

      Nearest airport(s) by geo coordinates.

      GET
      /nearest
      Retrieve nearest airports by geo coordinates (latitude/longitude).
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request GET 'https://api.transavia.com/v2/airports/nearest'
      Response Response Example
      200 - Example 1
      [
        {
          "city": "string",
          "country": {
            "code": "string",
            "name": "string"
          },
          "distanceInKm": 0,
          "geoCoordinates": {
            "latitude": 0,
            "longitude": 0
          },
          "id": "string",
          "name": "string",
          "self": {
            "href": "string"
          }
        }
      ]

      Request

      Query Params
      latitude
      string 
      optional
      Latitude in decimals, lower than -90.0 and higher than 90.0 is not allowed.
      longitude
      string 
      optional
      Longitude in decimals, lower than -180.0 and higher than 180.0 is not allowed.
      maxDistanceInKm
      string 
      optional
      Maximum distance in kilometers, lower than 1 and higher than 500 is not allowed. If not set, max value is applied.
      limit
      string 
      optional
      Limits the result, lower than 0 is not allowed. If not set, the result is not limited.

      Responses

      🟢200OK
      application/json
      Body
      array of:
      city
      string 
      optional
      City where the airport is located.
      country
      object (Country) 
      optional
      code
      string 
      optional
      name
      string 
      optional
      distanceInKm
      integer <int32>
      optional
      Distance in kilometers.
      geoCoordinates
      object (GeoCoordinates) 
      optional
      latitude
      number <double>
      optional
      longitude
      number <double>
      optional
      id
      string 
      optional
      Unique identifier.
      name
      string 
      optional
      Name of the airport.
      self
      object (Link) 
      optional
      href
      string 
      optional
      🟠400BadRequest
      🔴500InternalServerError
      Previous
      Airport(s) by country code.
      Next
      Nearest airport(s) by airport id.
      Built with