# Suggest hotel and region

URL: https://docs.emergingtravel.com/docs/affiliate-api/hotel-search/suggest-hotel-and-region/

Tags: affiliate

---



**Sandbox**

```
https://api-sandbox.worldota.net/api/b2b/v3/search/multicomplete/
```

**Production**

```
https://api.worldota.net/api/b2b/v3/search/multicomplete/
```




This call enables autocomplete: you can find a region or hotel by entering just part of its name. The response returns no more than 5 results per category.

## Sandbox limitations { #limitations }

> [!WARNING]
> Use only field values, IDs, API keys, and any static content from the sandbox environment within the sandbox. <strong>Do not use sandbox data in test or production environments, and do not mix data or configuration between different environments.</strong>




* The input value for the `language` field is ignored; it is always set to `en`.
* The maximum number of items in `hotels` is `5`.
* The possible values for `hotels.region_id` are: `2011`, `2395`, `2734`, and `6053839`.
* The `regions` field is always `null`.

## Request example


**Sandbox**

```shell
curl --user '<KEY_ID>:<API_KEY>' 'https://api-sandbox.worldota.net/api/b2b/v3/search/multicomplete/' \
--header 'Content-Type: application/json' \
--data '{
  "query": "Ber",
  "language": "en"
}'
```

**Production**

```shell
curl --user '<KEY_ID>:<API_KEY>' 'https://api.worldota.net/api/b2b/v3/search/multicomplete/' \
--header 'Content-Type: application/json' \
--data '{
  "query": "Ber",
  "language": "en"
}'
```




## Request body



- **language** *(String, optional)*

  <p>The language.</p>
  > [!NOTE]
  > The possible values:
  > * `ar` — Arabic.
  > * `bg` — Bulgarian.
  > * `cs` — Czech.
  > * `da` — Danish.
  > * `de` — German.
  > * `el` — Greek.
  > * `en` — English.
  > * `es` — Spanish.
  > * `fi` — Finnish.
  > * `fr` — French.
  > * `he` — Hebrew.
  > * `hu` — Hungarian.
  > * `it` — Italian.
  > * `ja` — Japanese.
  > * `kk` — Kazakh.
  > * `ko` — Korean.
  > * `nl` — Dutch.
  > * `no` — Norwegian Bokmål.
  > * `pl` — Polish.
  > * `pt` — Portuguese.
  > * `pt_PT` — European Portuguese.
  > * `ro` — Romanian.
  > * `ru` — Russian.
  > * `sq` — Albanian.
  > * `sr` — Serbian.
  > * `sv` — Swedish.
  > * `th` — Thai.
  > * `tr` — Turkish.
  > * `uk` — Ukrainian.
  > * `vi` — Vietnamese.
  > * `zh_CN` — Simplified Chinese.
  > * `zh_TW` — Traditional Chinese.


- **query** *(String, required)*

  <p>The part of the hotel or region name.</p>





## Response



[//]: # (hotels)
- **hotels** *(Object)*

  <p>The hotel list.</p>
  > [!NOTE]
  > * The minimum items’ number is `5`.
  <ul>
  <li>
  <p><strong>id</strong> <em>(String, deprecated)</em></p>
  <p>The unique hotel ID in the legacy string format.</p>
  > [!NOTE]
  > * Either this field or the `hid` field is required.
  </li>
  <li>
  <p><strong>hid</strong> <em>(Int)</em></p>
  <p>The unique hotel ID in the new numeric format.</p>
  > [!NOTE]
  > * Each ID is an integer no longer than 10 digits.
  > * We are gradually migrating all clients to use this format.
  </li>
  <li>
  <p><strong>name</strong> <em>(String)</em></p>
  <p>Hotel’s name.</p>
  </li>
  <li>
  <p><strong>region_id</strong> <em>(Int)</em></p>
  <p>The region ID.</p>
  </li>
  </ul>


[//]: # (regions)
- **regions** *(Object)*

  <p>The region list.</p>
  > [!NOTE]
  > * The maximum items’ number is `5`.
  <ul>
  <li>
  <p><strong>id</strong> <em>(String, deprecated)</em></p>
  <p>The unique region ID.</p>
  </li>
  <li>
  <p><strong>name</strong> <em>(String)</em></p>
  <p>The region name.</p>
  </li>
  <li>
  <p><strong>type</strong> <em>(String)</em></p>
  <p>The region type.</p>
  > [!NOTE]
  > * The possible values:
  >   * `Airport`.
  >   * `Bus Station`.
  >   * `City`.
  >   * `Continent`.
  >   * `Country`.
  >   * `Multi-City`.
  >   * `Multi-Railway Station`.
  >   * `Multi-Region`.
  >   * `Neighborhood`.
  >   * `Point of Interest`.
  >   * `Province`.
  >   * `Railway Station`.
  >   * `Street`.
  >   * `Subway`.
  </li>
  <li>
  <p><strong>country_code</strong> <em>(String)</em></p>
  <p>The region country code in the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
  <p>format.</p></p>
  </li>
  </ul>





## Response example

```json
{
  "data": {
    "hotels": [
      {
        "id": "gostinitsa_berlin",
        "hid": 8066022,
        "name": "Berlin Hotel",
        "region_id": 1798
      },
      {
        "id": "bergs_hotel_2",
        "hid": 9974510,
        "name": "Bergs Spa and Сonference Hotel",
        "region_id": 5580
      },
      {
        "id": "rp_bergamo_hotel",
        "hid": 10575679,
        "name": "Bergamo Eco Hotel",
        "region_id": 6057804
      },
      {
        "id": "hotel_dacha_na_berezovoy",
        "hid": 6344433,
        "name": "Dacha Na Berezovoi Apartments",
        "region_id": 965821558
      },
      {
        "id": "travel_hotels_bereg_hotel",
        "hid": 10211188,
        "name": "Hotel Priboi by Sun City Hotels",
        "region_id": 299
      }
    ],
    "regions": [
      {
        "id": 536,
        "name": "Berlin",
        "type": "City",
        "country_code": "DE"
      },
      {
        "id": 965888340,
        "name": "Saint-Philbert-de-Grand-Lieu",
        "type": "City",
        "country_code": "FR"
      },
      {
        "id": 6340759,
        "name": "Montalbert",
        "type": "City",
        "country_code": "FR"
      },
      {
        "id": 965850065,
        "name": "Cote d'Azur",
        "type": "Multi-Region (within a country)",
        "country_code": "FR"
      },
      {
        "id": 966047519,
        "name": "Saint-Philbert-sur-Orne, Normandy",
        "type": "City",
        "country_code": "FR"
      }
    ]
  },
  "debug": {
    "request": {
      "query": "Ber",
      "language": "en"
    },
    "key_id": 7705,
    "validation_error": null
  },
  "status": "ok",
  "error": null
}
```

## Errors

The `error` field has the value specified in the headers below.

### `invalid_params`

The `query` field is required.

### `core_search_error`

An internal search error. Has `500` status code.
