Retrieve hotel IDs by filter

Retrieve hotel IDs by filter

#content-api

https://api.worldota.net/api/content/v1/hotel_ids_by_filter/

The call gets the identifiers for all required hotels. Use fields to search only for the desired hotels.

ℹ️

Request example

curl --user '<KEY_ID>:<API_KEY>' 'https://api.worldota.net/api/content/v1/hotel_ids_by_filter/' \
--header 'Content-Type: application/json' \
--data '{
    "country": [52]
}'

Request body

country [Int] optional

The country.

ℹ️
kind [String] optional

The hotel type.

ℹ️
star_rating [Int] optional

The hotel rating on a scale from 1 to 5. Has the 0 value for no available rating.

ℹ️
serp_filters [Srting] optional

The list of amenities at the hotel.

ℹ️
updated_since String optional

Hotels where the information has been updated.

ℹ️
The format of this field is: “2006-01-02 15:04:05”.
supplier_type String optional

Which suppliers to search for.

ℹ️
preferable Boolean optional
All sellable hotels with availability within last 6 months.
top Boolean optional
500k best hotels by their paid bookings.

Response

hids [Int]
A list of hotel IDs filtered by the criteria specified in the request.
ids [String]
A list of unique hotel ID.

Response example

{
  "data": {
    "hids": [
      6325458,
      6445894,
      6493239,
      6526863,
      13350497
    ],
    "ids": [
      "hotel_1",
      "hotel_2",
      "hotel_3",
      "hotel_4",
      "hotel_5"
    ]
  },
  "debug": {
    "request": {
      "serp_filter": [
        "air_conditioning",
        "has_airport_transfer",
        "beach",
        "has_internet",
        "has_kids",
        "kitchen"
      ],
      "kind": [
        "Mini-hotel"
      ],
      "country": [
        153
      ],
      "updated_since": "2006-01-02 15:04:05"
    },
    "key_id": 1234,
    "validation_error": null
  },
  "status": "ok",
  "error": null
}

Errors

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

invalid_params

One or more input parameters are incorrect. For more details, see the response field debug validation_error.

no_hotel_ids

An internal search error. Has 500 status code.