UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 14.7 kB
{"openapi":"3.0.0","info":{"description":"\nBefore using this API, we recommend you read our **[Authorization Guide](https://developers.amadeus.com/self-service/apis-docs/guides/authorization-262)** for more information on how to generate an access token.\n\nPlease also be aware that our test environment is based on a subset of the production, this API in test only returns a few selected cities. You can find the list in our **[data collection](https://github.com/amadeus4dev/data-collection)**.","title":"Airport Nearest Relevant","version":"1.1.2","x-logo":{"url":"https://amadeus.com/images/en/technology/mobile-tablet/mobile-woman-office-city.jpg.transform/medium/img.jpg"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/amadeus4dev/amadeus-open-api-specification/main/spec/json/AirportNearestRelevant_v1_swagger_specification.json","version":"2.0"}],"x-providerName":"amadeus.com","x-release-note":{"1.0":["Initial Version"],"1.0.1":["Improvement of relevance calculation","Remove flights and travelers figures","Flights and Travelers score become integer (PTR 14827552)"],"1.0.2":["AFD-1091 - change from \"traveller\" to \"traveler\""],"1.1.0":["Add radius parameter"],"1.1.1":["Correct example"]},"x-serviceName":"amadeus-airport-nearest-relevant","x-status":"validated","x-tags":["#ama-for-dev"]},"paths":{"/reference-data/locations/airports":{"get":{"description":"","operationId":"getNearestRelevantAirports","parameters":[{"description":"latitude location to be at the center of the search circle","in":"query","name":"latitude","required":true,"example":51.57285,"schema":{"type":"number","format":"double"}},{"description":"longitude location to be at the center of the search circle","in":"query","name":"longitude","required":true,"example":-0.44161,"schema":{"type":"number","format":"double"}},{"description":"radius of the search in Kilometer. Can be from 0 to 500, default value is 500 Km.","in":"query","name":"radius","required":false,"schema":{"type":"integer","minimum":0,"maximum":500,"default":500}},{"$ref":"#/components/parameters/pageLimit"},{"$ref":"#/components/parameters/pageOffset"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"$ref":"#/components/responses/nearest-relevant-airports"},"400":{"$ref":"#/components/responses/400"},"default":{"$ref":"#/components/responses/500"}},"summary":"Returns a list of relevant airports near to a given point.","tags":["location"]}}},"x-generatedAt":"2025-04-15T13:49:52.906Z","servers":[{"url":"https://test.api.amadeus.com/v1"}],"components":{"parameters":{"pageLimit":{"description":"maximum items in one page","in":"query","name":"page[limit]","required":false,"schema":{"type":"integer","default":10}},"pageOffset":{"description":"start index of the requested page","in":"query","name":"page[offset]","required":false,"schema":{"type":"integer","default":0}},"sort":{"description":"defines on which attribute the sorting will be done from the best option to the worst one:\n* **relevance** - Score value calculated based on distance and traffic analytics\n* **distance** - Distance from the location to the geo-code given in API request parameters\n* **analytics.flights.score** - Approximate score for ranking purposes calculated based on estimated number of flights from/to airport in one reference year (last year)\n* **analytics.travelers.score** - Approximate score for ranking purposes calculated based on estimated number of travelers in the airport for one reference year (last year)\n","in":"query","name":"sort","required":false,"schema":{"type":"string","enum":["relevance","distance","analytics.flights.score","analytics.travelers.score"],"default":"relevance"}}},"responses":{"400":{"description":"code | title \n------- | ------------------------------------- \n477 | INVALID FORMAT\n572 | INVALID OPTION\n4926 | INVALID DATA RECEIVED \n32171 | MANDATORY DATA MISSING \t \n","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error_400"}}}},"500":{"description":"Unexpected Error","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error_500"}}}},"nearest-relevant-airports":{"description":"Successful Operation","content":{"application/vnd.amadeus+json":{"schema":{"example":{"data":[{"address":{"cityCode":"LON","cityName":"LONDON","countryCode":"GB","countryName":"UNITED KINGDOM","regionCode":"EUROP"},"analytics":{"flights":{"score":39},"travelers":{"score":45}},"detailedName":"LONDON/GB:HEATHROW","distance":{"unit":"KM","value":11},"geoCode":{"latitude":51.47294,"longitude":-0.45061},"iataCode":"LHR","name":"HEATHROW","relevance":350.54587,"subType":"AIRPORT","timeZoneOffset":"+01:00","type":"location"},{"address":{"cityCode":"LON","cityName":"LONDON","countryCode":"GB","countryName":"UNITED KINGDOM","regionCode":"EUROP"},"analytics":{"flights":{"score":27},"travelers":{"score":27}},"detailedName":"LONDON/GB:GATWICK","distance":{"unit":"KM","value":49},"geoCode":{"latitude":51.15609,"longitude":-0.17818},"iataCode":"LGW","name":"GATWICK","relevance":53.62667,"subType":"AIRPORT","timeZoneOffset":"+01:00","type":"location"},{"address":{"cityCode":"LON","cityName":"LONDON","countryCode":"GB","countryName":"UNITED KINGDOM","regionCode":"EUROP"},"analytics":{"flights":{"score":11},"travelers":{"score":10}},"detailedName":"LONDON/GB:LUTON","distance":{"unit":"KM","value":33},"geoCode":{"latitude":51.87472,"longitude":-0.36833},"iataCode":"LTN","name":"LUTON","relevance":33.10184,"subType":"AIRPORT","timeZoneOffset":"+01:00","type":"location"},{"address":{"cityCode":"LON","cityName":"LONDON","countryCode":"GB","countryName":"UNITED KINGDOM","regionCode":"EUROP"},"analytics":{"flights":{"score":16},"travelers":{"score":15}},"detailedName":"LONDON/GB:STANSTED","distance":{"unit":"KM","value":58},"geoCode":{"latitude":51.885,"longitude":0.235},"iataCode":"STN","name":"STANSTED","relevance":27.50241,"subType":"AIRPORT","timeZoneOffset":"+01:00","type":"location"},{"address":{"cityCode":"LON","cityName":"LONDON","countryCode":"GB","countryName":"UNITED KINGDOM","regionCode":"EUROP"},"analytics":{"flights":{"score":8},"travelers":{"score":4}},"detailedName":"LONDON/GB:CITY AIRPORT","distance":{"unit":"KM","value":35},"geoCode":{"latitude":51.50528,"longitude":0.05528},"iataCode":"LCY","name":"CITY AIRPORT","relevance":21.78754,"subType":"AIRPORT","timeZoneOffset":"+01:00","type":"location"},{"address":{"cityCode":"BHX","cityName":"BIRMINGHAM","countryCode":"GB","countryName":"UNITED KINGDOM","regionCode":"EUROP"},"analytics":{"flights":{"score":10},"travelers":{"score":8}},"detailedName":"BIRMINGHAM/GB:BIRMINGHAM","distance":{"unit":"KM","value":132},"geoCode":{"latitude":52.45386,"longitude":-1.74803},"iataCode":"BHX","name":"BIRMINGHAM","relevance":7.73356,"subType":"AIRPORT","timeZoneOffset":"+01:00","type":"location"},{"address":{"cityCode":"MAN","cityName":"MANCHESTER","countryCode":"GB","countryName":"UNITED KINGDOM","regionCode":"EUROP"},"analytics":{"flights":{"score":18},"travelers":{"score":17}},"detailedName":"MANCHESTER/GB:MANCHESTER AIRPO","distance":{"unit":"KM","value":233},"geoCode":{"latitude":53.35374,"longitude":-2.27495},"iataCode":"MAN","name":"MANCHESTER AIRPORT","relevance":7.71084,"subType":"AIRPORT","timeZoneOffset":"+01:00","type":"location"},{"address":{"cityCode":"SOU","cityName":"SOUTHAMPTON","countryCode":"GB","countryName":"UNITED KINGDOM","regionCode":"EUROP"},"analytics":{"flights":{"score":4},"travelers":{"score":2}},"detailedName":"SOUTHAMPTON/GB","distance":{"unit":"KM","value":94},"geoCode":{"latitude":50.95026,"longitude":-1.3568},"iataCode":"SOU","name":"SOUTHAMPTON","relevance":4.4788,"subType":"AIRPORT","timeZoneOffset":"+01:00","type":"location"},{"address":{"cityCode":"BRS","cityName":"BRISTOL","countryCode":"GB","countryName":"UNITED KINGDOM","regionCode":"EUROP"},"analytics":{"flights":{"score":7},"travelers":{"score":5}},"detailedName":"BRISTOL/GB:BRISTOL","distance":{"unit":"KM","value":159},"geoCode":{"latitude":51.38267,"longitude":-2.71909},"iataCode":"BRS","name":"BRISTOL","relevance":4.08617,"subType":"AIRPORT","timeZoneOffset":"+01:00","type":"location"},{"address":{"cityCode":"NQT","cityName":"NOTTINGHAM","countryCode":"GB","countryName":"UNITED KINGDOM","regionCode":"EUROP"},"analytics":{"flights":{"score":4},"travelers":{"score":3}},"detailedName":"NOTTINGHAM/GB:EAST MIDLANDS","distance":{"unit":"KM","value":152},"geoCode":{"latitude":52.83111,"longitude":-1.32806},"iataCode":"EMA","name":"EAST MIDLANDS","relevance":2.66099,"subType":"AIRPORT","timeZoneOffset":"+01:00","type":"location"}],"meta":{"count":32,"links":{"last":"https://test.api.amadeus.com/v1/reference-data/locations/airports?latitude=51.57285&longitude=-0.44161&page%5Boffset%5D=22","next":"https://test.api.amadeus.com/v1/reference-data/locations/airports?latitude=51.57285&longitude=-0.44161&page%5Boffset%5D=10","self":"https://test.api.amadeus.com/v1/reference-data/locations/airports?latitude=51.57285&longitude=-0.44161"}}},"properties":{"data":{"items":{"$ref":"#/components/schemas/Location"},"type":"array"},"meta":{"$ref":"#/components/schemas/Collection_Meta"}},"required":["data"],"title":"Success"}}}}},"schemas":{"Address":{"properties":{"cityCode":{"description":"IATA code of the city of the location; equal to IATAcode if the location is a city","example":"PAR","type":"string"},"cityName":{"description":"name of the city of the location; equal to name if the location is a city","example":"Paris","type":"string"},"countryCode":{"description":"code of the country of the location in ISO standard","example":"FR","type":"string"},"countryName":{"description":"name of the country of the location","example":"France","type":"string"},"regionCode":{"description":"code of the region of the location in ISO standard","example":"EUROP","type":"string"},"stateCode":{"description":"code of the state of the location if any","example":"TO","type":"string"}}},"Analytics":{"properties":{"flights":{"$ref":"#/components/schemas/Flights"},"travelers":{"$ref":"#/components/schemas/Travelers"}}},"Collection_Meta":{"properties":{"count":{"example":1,"type":"integer"},"links":{"example":{"self":"https://test.api.amadeus.com/v1/area/resources?param=value"},"properties":{"first":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"last":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"next":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"previous":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"self":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"up":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"}},"title":"CollectionLinks"}},"title":"Collection_Meta"},"Distance":{"properties":{"unit":{"description":"unit of the distance","enum":["KM","MI"],"example":"KM","type":"string"},"value":{"description":"great-circle distance between two locations. This distance thus do not take into account traffic conditions; international boundaries; mountains; water; or other elements that might make the a nearby location hard to reach.","example":152,"type":"integer"}}},"Error_400":{"example":{"errors":[{"code":477,"detail":"invalid query parameter format","source":{"example":"CDG","parameter":"airport"},"status":400,"title":"INVALID FORMAT"}]},"properties":{"errors":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"}},"required":["errors"]},"Error_500":{"example":{"errors":[{"code":141,"status":500,"title":"SYSTEM ERROR HAS OCCURRED"}]},"properties":{"errors":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"}},"required":["errors"]},"Flights":{"properties":{"score":{"description":"Approximate score for ranking purposes calculated based on number of flights from / to the airport or city","example":56,"format":"integer","type":"number"}}},"GeoCode":{"properties":{"latitude":{"description":"latitude of the location","example":43.580418,"format":"double","type":"number"},"longitude":{"description":"longitude of the location","example":7.125102,"format":"double","type":"number"}}},"Issue":{"properties":{"code":{"description":"an application-specific error code","format":"int64","type":"integer"},"detail":{"description":"explanation of the error","type":"string"},"source":{"description":"an object containing references to the source of the error","maxProperties":1,"properties":{"example":{"description":"a string indicating an example of the right value","type":"string"},"parameter":{"description":"a string indicating which URI query parameter caused the issue","type":"string"},"pointer":{"description":"a JSON Pointer [RFC6901] to the associated entity in the request document","type":"string"}},"title":"Issue_Source","type":"object"},"status":{"description":"the HTTP status code applicable to this error","type":"integer"},"title":{"description":"a short summary of the error","type":"string"}}},"Location":{"properties":{"address":{"$ref":"#/components/schemas/Address"},"analytics":{"$ref":"#/components/schemas/Analytics"},"detailedName":{"description":"detailed name of the location. For a city location it contains city name and country code. For an airport location it contains city name; country code and airport full name","example":"Paris/FR: Charles de Gaulle","type":"string"},"distance":{"$ref":"#/components/schemas/Distance"},"geoCode":{"$ref":"#/components/schemas/GeoCode"},"iataCode":{"description":"IATA code of the location. ([IATA table codes](http://www.iata.org/publications/Pages/code-search.aspx) here)","example":"CDG","type":"string"},"name":{"description":"short name of the location","example":"Paris CDG","type":"string"},"relevance":{"description":"score value calculated based on distance and analytics","example":9.6584,"format":"double","type":"number"},"subType":{"description":"location sub type","enum":["AIRPORT","CITY","POINT_OF_INTEREST","DISTRICT"],"example":"AIRPORT","type":"string"},"timeZoneOffset":{"description":"timezone offset of the location at the date of the API call (including daylight saving time)","example":"+01:00","type":"string"},"type":{"description":"the resource name","example":"location","type":"string"}}},"Travelers":{"properties":{"score":{"description":"Approximate score for ranking purposes calculated based on number of travelers in the location.","example":68,"format":"integer","type":"number"}}}}}}