hk.trip.com APIhk.trip.com ↗
Search flights and hotels on hk.trip.com, fetch guest reviews, and get trending destinations via 4 structured API endpoints returning live pricing and ratings.
curl -X POST 'https://api.parse.bot/scraper/9bcbfcea-6ec6-48ea-91e3-b149077443a0/search_flights' \
-H 'X-API-Key: $PARSE_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"origin": "HKG",
"trip_type": "2",
"depart_date": "2026-05-15",
"destination": "TYO",
"return_date": "2026-05-22"
}'Search for flights between two cities. Returns flight itineraries with pricing, segments, and airline information.
| Param | Type | Description |
|---|---|---|
| originrequired | string | Origin airport or city code (e.g., HKG, NYC, PEK) |
| trip_type | integer | Trip type: 1 for one-way, 2 for round-trip |
| depart_daterequired | string | Departure date in YYYY-MM-DD format |
| destinationrequired | string | Destination airport or city code (e.g., NRT, TYO, HKG) |
| return_date | string | Return date in YYYY-MM-DD format, used when trip_type is 2 |
{
"type": "object",
"fields": {
"currency": "string, currency code (e.g., HKD)",
"lowestPrice": "number, lowest total price found",
"recordCount": "integer, total number of flights found",
"flightItineraryList": "array of flight itinerary objects with airline, price, segments, and flags"
},
"sample": {
"data": {
"currency": "HKD",
"lowestPrice": 1671,
"recordCount": 2,
"flightItineraryList": [
{
"flags": [
"SAME_AIRLINE_COMBINE"
],
"price": 1671,
"airline": "TW",
"segments": [
{
"duration": 230,
"flightNo": "TW644",
"airlineCode": "TW",
"arrivePoint": {
"cityCode": "SEL",
"cityName": "首爾",
"terminal": "T1",
"airportCode": "ICN"
},
"departPoint": {
"cityCode": "HKG",
"cityName": "香港",
"terminal": "T1",
"airportCode": "HKG"
},
"arriveDateTime": "2026-05-15 18:05:00",
"departDateTime": "2026-05-15 13:15:00"
}
]
}
]
},
"status": "success"
}
}About the hk.trip.com API
The hk.trip.com API exposes 4 endpoints covering flight search, hotel search, hotel reviews, and trending destinations from Hong Kong's Trip.com travel marketplace. The search_flights endpoint returns full itinerary lists with per-flight pricing, airline data, and segment details, while search_hotels delivers hotel listings with ratings, room info, and location data — all in structured JSON ready to query programmatically.
Flight and Hotel Search
The search_flights endpoint accepts an origin and destination (IATA airport or city codes), a depart_date, and an optional trip_type (1 for one-way, 2 for round-trip). Responses include a flightItineraryList array with per-itinerary airline identifiers, segment breakdowns, pricing, and flags — plus a top-level lowestPrice and recordCount so you can surface the cheapest option without iterating the full list. For round-trip searches, pass a return_date alongside trip_type: 2.
The search_hotels endpoint takes a city_id, checkin, and checkout date pair, and an optional adults count. Each hotel object in the returned hotelList contains four sub-objects: hotelBasicInfo (name, star rating, thumbnail), commentInfo (aggregate score), positionInfo (address and coordinates), and roomInfo (rate and room-type snapshot). City IDs follow Trip.com's internal scheme — use get_hot_destinations to resolve readable city names to their numeric IDs before querying.
Reviews and Destination Discovery
get_hotel_reviews returns paginated guest reviews for a specific hotel identified by hotel_id. Each entry in commentList carries a content string, numeric rating, createDate, userInfo, and an imageList of attached photos. The totalCount field tells you how many pages to expect when paginating with the page parameter.
get_hot_destinations requires no inputs and returns destination groups, each containing a hotDestination list of city names and their corresponding IDs. This endpoint is the practical starting point when building city-aware hotel search flows — map names to IDs here, then pass them to search_hotels.
- Build a flight price tracker comparing round-trip fares between HKG and multiple destinations using
lowestPricefromsearch_flights. - Aggregate hotel ratings and review counts across a city by combining
commentInfofromsearch_hotelswith paginatedcommentListfromget_hotel_reviews. - Populate a destination picker UI with city names and IDs from
get_hot_destinationsto drive hotel search queries. - Analyze guest review sentiment by ingesting
contentandratingfields fromget_hotel_reviewsacross multiple properties. - Display cheapest available hotel room rates for a city break by querying
roomInfoinsearch_hotelsfor a givencheckin/checkoutwindow. - Filter one-way versus round-trip flight availability using the
trip_typeparameter insearch_flightsfor the same city pair.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Trip.com offer an official developer API?+
What does `search_flights` return beyond price — can I get baggage or fare-class details?+
flightItineraryList includes airline identifiers, flight segments, total pricing, and per-itinerary flags. Baggage allowance details and fare-class breakdowns are not currently exposed in the response shape. You can fork this API on Parse and revise it to add an endpoint targeting those details.Does the API cover train or bus searches available on hk.trip.com?+
How does pagination work for hotel reviews?+
page parameter to get_hotel_reviews alongside the required hotel_id. The response includes a totalCount field indicating the total number of reviews, which you can use to calculate how many pages exist before iterating.How do I find the correct `city_id` for a hotel search?+
get_hot_destinations with no parameters. It returns grouped destination lists, each entry containing a city name and its numeric ID. Pass that ID as city_id to search_hotels. The endpoint documents example IDs — 228 for Tokyo, 58 for Hong Kong, 30 for Shenzhen — as reference points.