swagger: "2.0"
schemes:
  - https
host: test.api.amadeus.com
basePath: /v1
info:
  description: |-
    Before 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. 

    Please also be aware that our test environment is based on a subset of the production for this API it may change dynamically. For your tests, use big cities like LON (London) or NYC (New-York).
  title: Hotel Name Autocomplete
  version: 1.0.3
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/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/HotelNameAutocomplete_v1_swagger_specification.json
      version: "2.0"
  x-providerName: amadeus.com
  x-serviceName: amadeus-hotel-name-autocomplete
consumes:
  - application/vnd.amadeus+json
produces:
  - application/vnd.amadeus+json
paths:
  /reference-data/locations/hotel:
    get:
      description: ""
      operationId: gethotels
      parameters:
        - description: Location query keyword
          in: query
          maxLength: 40
          minLength: 4
          name: keyword
          pattern: ^[A-Za-z0-9 *'-]{4,40}$
          required: true
          type: string
          x-example: PARI
        - collectionFormat: multi
          description: |-
            Category of search - To enter several values, repeat the query parameter 
             Use HOTEL_LEISURE to target aggregators or HOTEL_GDS to target directly the chains
          in: query
          items:
            enum:
              - HOTEL_LEISURE
              - HOTEL_GDS
            type: string
          name: subType
          required: true
          type: array
        - description: The country in which you search the subType. Country Code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format
          in: query
          maxLength: 2
          minLength: 2
          name: countryCode
          pattern: "[A-Za-z]{2}$"
          type: string
          x-example: FR
        - default: EN
          description: |-
            The language in which you want the results in following [ISO 639-1](https://fr.wikipedia.org/wiki/Liste_des_codes_ISO_639-1). 

            If the language entered is not available then the results will be shown in the default language, English.
          in: query
          maxLength: 2
          minLength: 2
          name: lang
          pattern: "[A-Za-z]{2}$"
          required: false
          type: string
        - default: 20
          description: The number of results requested from 1 to 20
          in: query
          name: max
          required: false
          type: integer
      responses:
        "200":
          description: Successful Search Operation
          schema:
            example:
              data:
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.88081
                    longitude: 2.33541
                  hotelIds:
                    - CTPARB08
                  iataCode: PAR
                  id: 4630140
                  name: DE PARIS SAINT GEORGES EX KYRIAD PARIS
                  relevance: 74
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.87877
                    longitude: 2.34593
                  hotelIds:
                    - CTPARATH
                  iataCode: PAR
                  id: 4629897
                  name: DE PARIS OPERA EX DE PARIS MAUBEUGE
                  relevance: 74
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.8496
                    longitude: 2.29553
                  hotelIds:
                    - CTPARAPQ
                  iataCode: PAR
                  id: 4629762
                  name: LE PARISIS PARIS TOUR EIFFEL EX RAMADA
                  relevance: 74
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.87646
                    longitude: 2.34884
                  hotelIds:
                    - HVPARBHU
                  iataCode: PAR
                  id: 4316057
                  name: COMFORT HOTEL PARIS LAFAYETTE PARIS
                  relevance: 74
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.85
                    longitude: 2.2884
                  hotelIds:
                    - CTPARAIP
                  iataCode: PAR
                  id: 4629509
                  name: CAMPANILE PARIS 15 EX CAMPANILE PARIS
                  relevance: 74
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.8766
                    longitude: 2.35422
                  hotelIds:
                    - TVPARAB7
                  iataCode: PAR
                  id: 4343671
                  name: THE ORIGINALS PARIS GARE DE L EST PARISI
                  relevance: 74
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.87146
                    longitude: 2.33834
                  hotelIds:
                    - HVPARAPG
                  iataCode: PAR
                  id: 4315654
                  name: CITADINES OPERA PARIS PARIS
                  relevance: 74
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.87661
                    longitude: 2.35417
                  hotelIds:
                    - SJPARALM
                  iataCode: PAR
                  id: 4601316
                  name: THE ORIGINALS PARIS GARE DE L EST PARISI
                  relevance: 74
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.84972
                    longitude: 2.29565
                  hotelIds:
                    - ADPAR093
                  iataCode: PAR
                  id: 4905890
                  name: LE PARISIS PARIS TOUR EIFFEL
                  relevance: 74
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.88004
                    longitude: 2.32894
                  hotelIds:
                    - CTPARB6P
                  iataCode: PAR
                  id: 4630373
                  name: HOTEL R DE PARIS EX DU CASINO PARIS
                  relevance: 74
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.84972
                    longitude: 2.29565
                  hotelIds:
                    - XDPARAYA
                  iataCode: PAR
                  id: 4930258
                  name: LE PARISIS PARIS TOUR EIFFEL
                  relevance: 74
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.87663
                    longitude: 2.35418
                  hotelIds:
                    - XDPARAZM
                  iataCode: PAR
                  id: 4930306
                  name: THE ORIGINALS CITY HOTEL PARISIANA PARIS
                  relevance: 72
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.8738
                    longitude: 2.34993
                  hotelIds:
                    - DGPARACN
                  iataCode: PAR
                  id: 2330480
                  name: HOTEL PARADIS PARIS
                  relevance: 71
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.8774
                    longitude: 2.35609
                  hotelIds:
                    - CTPARB5J
                  iataCode: PAR
                  id: 4630331
                  name: MIDNIGHT HOTEL PARIS EX ARIS NORD
                  relevance: 71
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: THE HAGUE
                    countryCode: AU
                  geoCode:
                    latitude: 55.76364
                    longitude: 37.60079
                  hotelIds:
                    - BKMOWB4L
                  iataCode: MOW
                  id: 4309354
                  name: HOTEL DE PARIS
                  relevance: 70
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.85598
                    longitude: 2.29321
                  hotelIds:
                    - EYPARCQV
                  iataCode: PAR
                  id: 4313435
                  name: PULLMAN PARIS TOUR EIFFEL HOTEL
                  relevance: 70
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.86811
                    longitude: 2.29095
                  hotelIds:
                    - EYPARCRN
                  iataCode: PAR
                  id: 4313453
                  name: MERCURE PARIS CHAMPS ELYSEES
                  relevance: 70
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.86561
                    longitude: 2.32785
                  hotelIds:
                    - ASPARADC
                  iataCode: PAR
                  id: 4448070
                  name: THE WESTIN PARIS VENDOME
                  relevance: 70
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.901
                    longitude: 2.387
                  hotelIds:
                    - GUPARBQV
                  iataCode: PAR
                  id: 2356646
                  name: B B HOTEL PARIS PORTE DE LA VILLETTE
                  relevance: 70
                  subType: HOTEL_LEISURE
                  type: location
                - address:
                    cityName: PARIS
                    countryCode: FR
                  geoCode:
                    latitude: 48.87622
                    longitude: 2.29592
                  hotelIds:
                    - EYPARCRV
                  iataCode: PAR
                  id: 4313461
                  name: TIVOLI HOTEL PARIS
                  relevance: 70
                  subType: HOTEL_LEISURE
                  type: location
            properties:
              data:
                items:
                  properties:
                    address:
                      description: Address of the location containing Cityname, Statecode and countrycode respectively.
                      properties:
                        cityName:
                          description: The name of the city to which the location belongs to.
                          maxLength: 105
                          minLength: 1
                          pattern: ^[A-Za-z0-9 - ]+
                          type: string
                        countryCode:
                          description: The countrycode to which the location belongs to.
                          maxLength: 2
                          minLength: 2
                          pattern: ^[A-Z]+
                          type: string
                        stateCode:
                          description: The statecode to which the location belongs to.
                          maxLength: 2
                          minLength: 2
                          pattern: ^[A-Z]+
                          type: string
                      required:
                        - cityName
                        - countryCode
                      type: object
                    geoCode:
                      description: Geocode of the location containing latitude and longitude respectively.
                      properties:
                        latitude:
                          description: Latitude of the location on Earth.
                          format: double
                          type: number
                        longitude:
                          description: Longitude of the location on Earth.
                          format: double
                          type: number
                      required:
                        - latitude
                        - longitude
                      type: object
                    hotelIds:
                      description: "HotelIDs associated with the location only if it's a hotel. For leisure property dupes ID are listed as well. "
                      items:
                        type: string
                      maxItems: 10
                      minItems: 1
                      type: array
                      uniqueItems: true
                    iataCode:
                      description: "[IATA codes](http://www.iata.org/publications/Pages/code-search.aspx) associated with the location."
                      maxLength: 3
                      minLength: 3
                      pattern: ^[A-Z]+
                      type: string
                    id:
                      description: ID of the resource.
                      maximum: 10
                      minimum: 1
                      type: number
                    name:
                      description: Name of the location (Hotel Name)
                      maxLength: 80
                      minLength: 1
                      pattern: ^[A-Za-z0-9 - * '.]+
                      type: string
                    relevance:
                      description: A no. between 1-100. The higher the number better is the relevant search for that location.
                      type: integer
                    subType:
                      description: The category of the location or Point of reference (HOTEL_LEISURE,HOTEL_GDS).
                      enum:
                        - HOTEL_GDS
                        - HOTEL_LEISURE
                      type: string
                    type:
                      description: Type of resource or the resource name.
                      type: string
                  required:
                    - id
                    - type
                    - name
                    - iataCode
                    - hotelIds
                    - subType
                  type: object
                type: array
            required:
              - data
            title: Success
        "400":
          description: |
            code    | title                                 
            ------- | ------------------------------------- 
            477     | NOT FOUND 
            1797    | INVALID FORMAT
            572     | INVALID LENGTH
            32171   | MANDATORY DATA MISSING 	     
          schema:
            example:
              errors:
                - code: 572
                  detail: invalid query parameter format
                  status: 400
                  title: INVALID FORMAT
            properties:
              errors:
                items:
                  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
                      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
                      type: object
                    status:
                      description: the HTTP status code applicable to this error
                      type: integer
                    title:
                      description: a short summary of the error
                      type: string
                type: array
            required:
              - errors
            type: object
        "500":
          description: Unexpected Error
          schema:
            example:
              errors:
                - code: 141
                  status: 500
                  title: SYSTEM ERROR HAS OCCURRED
            properties:
              errors:
                items:
                  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
                      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
                      type: object
                    status:
                      description: the HTTP status code applicable to this error
                      type: integer
                    title:
                      description: a short summary of the error
                      type: string
                type: array
            required:
              - errors
      summary: Returns a list of hotels matching a given keyword.
      tags:
        - Search
