Skip to main content
POST
/
api
/
trip
/
hotels
/
search
/trip/hotels/search
curl --request POST \
  --url https://api.anysite.io/api/trip/hotels/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "city_id": 2,
  "count": 2,
  "timeout": 300,
  "check_in": "2023-12-25",
  "check_out": "2023-12-25"
}
'
[
  {
    "id": "<string>",
    "@type": "@trip_search_hotel",
    "name": "<string>",
    "star": 123,
    "category": "<string>",
    "score": 123,
    "score_description": "<string>",
    "review_count": 123,
    "score_details": [],
    "price": 123,
    "currency": "<string>",
    "city_id": 123,
    "city_name": "<string>",
    "province_id": 123,
    "country_id": 123,
    "address": "<string>",
    "position_desc": "<string>",
    "zone_names": [],
    "latitude": 123,
    "longitude": 123,
    "review_snippet": "<string>",
    "image": "<string>",
    "images": [],
    "url": "<string>"
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
city_id
integer
required

Trip.com numeric city id to search hotels in

Required range: x >= 1
Example:

633

count
integer
required

Max number of hotels to return

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
check_in
string<date> | null

Check-in date (YYYY-MM-DD); defaults to a near-future date

check_out
string<date> | null

Check-out date (YYYY-MM-DD); defaults to the day after check-in

Response

Successful Response

id
string
required
@type
string
default:@trip_search_hotel
name
string | null
star
integer | null
category
string | null
score
number | null
score_description
string | null
review_count
integer | null
score_details
TripSearchScoreDetail · object[]
price
number | null
currency
string | null
city_id
integer | null
city_name
string | null
province_id
integer | null
country_id
integer | null
address
string | null
position_desc
string | null
zone_names
string[]
latitude
number | null
longitude
number | null
review_snippet
string | null
image
string | null
images
string[]
url
string | null