openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 14 kB
JSON
{"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, in test this API only contains data from the United States, Spain, United Kingdom, Germany and India. ","title":"Airport & City Search","version":"1.2.3","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/AirportCitySearch_v1_swagger_specification.json","version":"2.0"}],"x-providerName":"amadeus.com","x-release-note":{"1.0":["Initial Version"],"1.1":["AFD-1091 - change from \"traveller\" to \"traveler\"","change default value of view indicator to FULL","Change search algorithm","Addition of \"id\" for location","New operation GET Airport or City by id","Traveler score become interger (PTR 14827552)","Change the option parameter into view and onlyMajor parameter","add a characters restriction on keyword parameter"],"1.2":["Remove parameter onlyMajor","Correct example"]},"x-serviceName":"amadeus-airport-&-city-search","x-status":"validated","x-tags":["#ama-for-dev"]},"paths":{"/reference-data/locations":{"get":{"description":"","operationId":"getAirportCitySearch","parameters":[{"description":"sub type of the location (AIRPORT and/or CITY)","in":"query","name":"subType","required":true,"example":"CITY","style":"form","explode":false,"schema":{"type":"array","items":{"enum":["AIRPORT","CITY"],"type":"string"}}},{"description":"keyword that should represent the start of a word in a city or airport name or code. \n Supported charaters are: A-Za-z0-9./:-'()\"","in":"query","name":"keyword","required":true,"example":"MUC","schema":{"type":"string","pattern":"[A-Za-z0-9./:()'\"-]"}},{"description":"Country code of the location using [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code format (e.g. US).","in":"query","name":"countryCode","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/pageLimit"},{"$ref":"#/components/parameters/pageOffset"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/view"}],"responses":{"200":{"$ref":"#/components/responses/airport-city-autocomplete"},"400":{"$ref":"#/components/responses/400"},"default":{"$ref":"#/components/responses/500"}},"summary":"Returns a list of airports and cities matching a given keyword.","tags":["location"]}},"/reference-data/locations/{locationId}":{"get":{"description":"","operationId":"getAirportCity","parameters":[{"$ref":"#/components/parameters/locationId"}],"responses":{"200":{"$ref":"#/components/responses/airport-city"},"400":{"$ref":"#/components/responses/400_GET-Id"},"404":{"$ref":"#/components/responses/404"},"default":{"$ref":"#/components/responses/500"}},"summary":"Returns a specific airports or cities based on its id.","tags":["location"]}}},"x-generatedAt":"2025-04-15T13:49:52.893Z","servers":[{"url":"https://test.api.amadeus.com/v1"}],"components":{"parameters":{"locationId":{"description":"identifier of the location","in":"path","name":"locationId","required":true,"example":"CMUC","schema":{"type":"string"}},"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:\n* analytics.travelers.score - sort by the number of travelers by airport or city, the airports and cities with the highest traffic are on top of the results\n","in":"query","name":"sort","required":false,"schema":{"type":"string","enum":["analytics.travelers.score"],"default":"analytics.travelers.score"}},"view":{"description":"select the level of information of the reply:\n* LIGHT - Gives only the IATACode, name, detailedName, cityName and countryName\n* FULL - Adds on top of the LIGHT information the timeZoneOffset, geocode, detailed address and travelers.score\ndefault option is FULL\n","in":"query","name":"view","required":false,"schema":{"type":"string","enum":["LIGHT","FULL"],"default":"FULL"}}},"responses":{"400":{"description":"code | title \n------- | ------------------------------------- \n477 | INVALID FORMAT\n572 | INVALID OPTION \n2781 | INVALID LENGTH\n4926 | INVALID DATA RECEIVED \n32171 | MANDATORY DATA MISSING \t \n","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error_400"}}}},"404":{"description":"Not Found","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error_404"}}}},"500":{"description":"Unexpected Error","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error_500"}}}},"400_GET-Id":{"description":"code | title \n------- | ------------------------------------- \n572 | INVALID OPTION \n","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error_400"}}}},"airport-city":{"description":"Successful Operation","content":{"application/vnd.amadeus+json":{"schema":{"example":{"data":{"address":{"cityCode":"MUC","cityName":"MUNICH","countryCode":"DE","countryName":"GERMANY","regionCode":"EUROP"},"analytics":{"travelers":{"score":27}},"detailedName":"MUNICH/DE:MUNICH INTERNATIONAL","geoCode":{"latitude":48.35378,"longitude":11.78609},"iataCode":"MUC","id":"CMUC","name":"MUNICH INTERNATIONAL","self":{"href":"https://test.api.amadeus.com/v1/reference-data/locations/CMUC","methods":["GET"]},"subType":"CITY","timeZoneOffset":"+02:00","type":"location"},"meta":{"links":{"self":"https://test.api.amadeus.com/v1/reference-data/locations/CMUC"}}},"properties":{"data":{"$ref":"#/components/schemas/Location"},"meta":{"$ref":"#/components/schemas/Collection_Meta"}},"required":["data"],"title":"Success"}}}},"airport-city-autocomplete":{"description":"Successful Operation","content":{"application/vnd.amadeus+json":{"schema":{"example":{"data":[{"address":{"cityCode":"MUC","cityName":"MUNICH","countryCode":"DE","countryName":"GERMANY","regionCode":"EUROP"},"analytics":{"travelers":{"score":27}},"detailedName":"MUNICH/DE:MUNICH INTERNATIONAL","geoCode":{"latitude":48.35378,"longitude":11.78609},"iataCode":"MUC","id":"CMUC","name":"MUNICH INTERNATIONAL","self":{"href":"https://test.api.amadeus.com/v1/reference-data/locations/CMUC","methods":["GET"]},"subType":"CITY","timeZoneOffset":"+02:00","type":"location"},{"address":{"cityCode":"MUC","cityName":"MUNICH","countryCode":"DE","countryName":"GERMANY","regionCode":"EUROP"},"analytics":{"travelers":{"score":27}},"detailedName":"MUNICH/DE:MUNICH INTERNATIONAL","geoCode":{"latitude":48.35378,"longitude":11.78609},"iataCode":"MUC","id":"AMUC","name":"MUNICH INTERNATIONAL","self":{"href":"https://test.api.amadeus.com/v1/reference-data/locations/AMUC","methods":["GET"]},"subType":"AIRPORT","timeZoneOffset":"+02:00","type":"location"}],"meta":{"count":2,"links":{"self":"https://test.api.amadeus.com/v1/reference-data/locations?subType=CITY,AIRPORT&keyword=MUC&countryCode=DE"}}},"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":{"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_404":{"example":{"errors":[{"code":1797,"detail":"no response found for this query parameter","source":{"parameter":"airport"},"status":404,"title":"NOT FOUND"}]},"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"]},"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"}}},"Links":{"example":{"href":"string"},"properties":{"count":{"type":"integer"},"href":{"format":"uri","type":"string"},"methods":{"items":{"enum":["GET","PUT","DELETE","POST","PATCH"],"type":"string"},"type":"array"}},"required":["href"]},"Location":{"properties":{"address":{"$ref":"#/components/schemas/Address"},"analytics":{"$ref":"#/components/schemas/Analytics"},"category":{"description":"category of the location","enum":["SIGHTS","BEACH_PARK","HISTORICAL","NIGHTLIFE","RESTAURANT","SHOPPING"],"example":"HISTORICAL","type":"string"},"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"},"id":{"description":"id of the ressource","type":"string"},"name":{"description":"short name of the location","example":"Paris CDG","type":"string"},"rank":{"description":"the rank is the position compared to other locations based on how famous is a place. 1 being the highest.","example":1,"type":"string"},"relevance":{"description":"score value calculated based on distance and analytics","example":9.6584,"format":"double","type":"number"},"self":{"$ref":"#/components/schemas/Links"},"subType":{"description":"location sub type","enum":["AIRPORT","CITY","POINT_OF_INTEREST","DISTRICT"],"example":"AIRPORT","type":"string"},"tags":{"description":"list of tags related to the location","items":{"example":["grocery","japanese","cafe"],"type":"string"},"type":"array"},"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"}}}}}}