Airports API v2
Returns all airports
COMMUNITYAPI KEY0 INSTALLS
OpenAPI Specificationv3.0
{
"swagger": "2.0",
"schemes": [
"https"
],
"host": "api.transavia.com",
"basePath": "/v2/airports",
"info": {
"contact": {
"x-twitter": "transavia"
},
"description": "Returns all airports",
"title": "Airports API v2",
"version": "1.0",
"x-apisguru-categories": [
"transport"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_transavia_profile_image.jpeg"
},
"x-origin": [
{
"format": "swagger",
"url": "https://developer.transavia.com/docs/services/58d8bca5a9e6241bac7e89d8/export?DocumentFormat=Swagger",
"version": "2.0"
}
],
"x-providerName": "transavia.com"
},
"produces": [
"text/plain",
"application/json",
"text/json"
],
"securityDefinitions": {
"apiKeyHeader": {
"in": "header",
"name": "apikey",
"type": "apiKey"
},
"apiKeyQuery": {
"in": "query",
"name": "subscription-key",
"type": "apiKey"
}
},
"security": [
{
"apiKeyHeader": []
},
{
"apiKeyQuery": []
}
],
"tags": [],
"paths": {
"/": {
"get": {
"description": "Retrieve all airports.",
"operationId": "58d8bcb7a9e6240e200cff24",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/AirportDtoArray"
}
},
"400": {
"description": "BadRequest",
"schema": {
"$ref": "#/definitions/BadRequestResponse"
}
},
"500": {
"description": "InternalServerError",
"schema": {
"$ref": "#/definitions/InternalServerErrorResponse"
}
}
},
"summary": "All airports"
}
},
"/countrycode/{countryCode}": {
"get": {
"description": "Retrieve airports by country code.",
"operationId": "58d8bcb8a9e6240e200cff26",
"parameters": [
{
"description": "Comma-separated list of country codes (2-character ISO 3166-1). More than 3 country codes is not allowed.",
"in": "path",
"name": "countryCode",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/AirportDtoArray"
}
},
"400": {
"description": "BadRequest",
"schema": {
"$ref": "#/definitions/BadRequestResponse"
}
},
"500": {
"description": "InternalServerError",
"schema": {
"$ref": "#/definitions/InternalServerErrorResponse"
}
}
},
"summary": "Airport(s) by country code."
}
},
"/nearest": {
"get": {
"description": "Retrieve nearest airports by geo coordinates (latitude/longitude).",
"operationId": "58d8bcb8a9e6240e200cff27",
"parameters": [
{
"description": "Latitude in decimals, lower than -90.0 and higher than 90.0 is not allowed.",
"in": "query",
"name": "latitude",
"type": "string"
},
{
"description": "Longitude in decimals, lower than -180.0 and higher than 180.0 is not allowed.",
"in": "query",
"name": "longitude",
"type": "string"
},
{
"description": "Maximum distance in kilometers, lower than 1 and higher than 500 is not allowed. If not set, max value is applied.",
"in": "query",
"name": "maxDistanceInKm",
"type": "string"
},
{
"description": "Limits the result, lower than 0 is not allowed. If not set, the result is not limited.",
"in": "query",
"name": "limit",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/NearestAirportDtoArray"
}
},
"400": {
"description": "BadRequest",
"schema": {
"$ref": "#/definitions/BadRequestResponse"
}
},
"500": {
"description": "InternalServerError",
"schema": {
"$ref": "#/definitions/InternalServerErrorResponse"
}
}
},
"summary": "Nearest airport(s) by geo coordinates."
}
},
"/nearest/{id}": {
"get": {
"description": "Retrieve nearest airports by station id.",
"operationId": "58d8bcb8a9e6240e200cff28",
"parameters": [
{
"description": "Airport (IATA code) to search nearest airports for.",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "Maximum distance in kilometers, lower than 1 and higher than 500 is not allowed. If not set, max value is applied.",
"in": "query",
"name": "maxDistanceInKm",
"type": "string"
},
{
"description": "Limits the result, lower than 0 is not allowed. If not set, the result is not limited.",
"in": "query",
"name": "limit",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/NearestAirportDtoArray"
}
},
"400": {
"description": "BadRequest",
"schema": {
"$ref": "#/definitions/BadRequestResponse"
}
},
"500": {
"description": "InternalServerError",
"schema": {
"$ref": "#/definitions/InternalServerErrorResponse"
}
}
},
"summary": "Nearest airport(s) by airport id."
}
},
"/{id}": {
"get": {
"description": "Retrieve airport by id.",
"operationId": "58d8bcb7a9e6240e200cff25",
"parameters": [
{
"description": "Airport code (3-character IATA code).",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/AirportDetailsDto"
}
},
"400": {
"description": "BadRequest",
"schema": {
"$ref": "#/definitions/BadRequestResponse"
}
},
"500": {
"description": "InternalServerError",
"schema": {
"$ref": "#/definitions/InternalServerErrorResponse"
}
}
},
"summary": "Airport by id."
}
}
},
"definitions": {
"AirportDetailsDto": {
"properties": {
"city": {
"description": "City where the airport is located.",
"type": "string"
},
"country": {
"$ref": "#/definitions/Country",
"description": "Country where the airport is located."
},
"geoCoordinates": {
"$ref": "#/definitions/GeoCoordinates",
"description": "GEO coordinates where the airport is located."
},
"id": {
"description": "Unique identifier.",
"type": "string"
},
"inboundRoutes": {
"$ref": "#/definitions/Link",
"description": "Reference to self."
},
"name": {
"description": "Name of the airport.",
"type": "string"
},
"outboundRoutes": {
"$ref": "#/definitions/Link",
"description": "Reference to self."
}
},
"type": "object"
},
"AirportDto": {
"description": "",
"properties": {
"city": {
"description": "City where the airport is located.",
"type": "string"
},
"country": {
"$ref": "#/definitions/Country",
"description": "Country where the airport is located."
},
"geoCoordinates": {
"$ref": "#/definitions/GeoCoordinates",
"description": "GEO coordinates where the airport is located."
},
"id": {
"description": "Unique identifier.",
"type": "string"
},
"name": {
"description": "Name of the airport.",
"type": "string"
},
"self": {
"$ref": "#/definitions/Link",
"description": "Reference to self."
}
},
"type": "object"
},
"AirportDtoArray": {
"items": {
"$ref": "#/definitions/AirportDto"
},
"type": "array"
},
"BadRequestResponse": {
"properties": {
"errorMessages": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"Country": {
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"GeoCoordinates": {
"properties": {
"latitude": {
"format": "double",
"type": "number"
},
"longitude": {
"format": "double",
"type": "number"
}
},
"type": "object"
},
"InternalServerErrorResponse": {
"properties": {
"errorMessage": {
"type": "string"
},
"referenceId": {
"format": "uuid",
"type": "string"
}
},
"type": "object"
},
"Link": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"NearestAirportDto": {
"description": "",
"properties": {
"city": {
"description": "City where the airport is located.",
"type": "string"
},
"country": {
"$ref": "#/definitions/Country",
"description": "Country where the airport is located."
},
"distanceInKm": {
"description": "Distance in kilometers.",
"format": "int32",
"type": "integer"
},
"geoCoordinates": {
"$ref": "#/definitions/GeoCoordinates",
"description": "GEO coordinates where the airport is located."
},
"id": {
"description": "Unique identifier.",
"type": "string"
},
"name": {
"description": "Name of the airport.",
"type": "string"
},
"self": {
"$ref": "#/definitions/Link",
"description": "Reference to self."
}
},
"type": "object"
},
"NearestAirportDtoArray": {
"items": {
"$ref": "#/definitions/NearestAirportDto"
},
"type": "array"
}
}
}