Trip.com API endpoint
Returns a Trip.com hotel-detail page: identity (name, local name, star rating, city/province/country), location (address, zone, latitude/longitude, nearby-transport description), guest rating (overall score plus cleanliness/amenities/location/service breakdown), images, description, check-in/check-out and child policy summaries, and popular facilities. Pricing is not included: Trip.com's detail page only returns per-night rates alongside check-in/check-out dates, which this endpoint does not take as input -- use the search endpoint for a city's current display prices.
/tripcom/hotels/{id}Path parameters:
id (required) — Trip.com hotel id, from a prior search call's
hotel_id field or the numeric segment of a
/hotels/{slug}-hotel-detail-{id}/ URL (e.g. 39371462).Query parameters:
slug (optional) — a slug segment for a nicer canonical source_url
(e.g. the district/city slug from a search result's url). Trip.com's
route only requires some non-empty text before -hotel-detail-{id} and
does not validate its content, so this is cosmetic only.Notable response behavior:
id must be numeric; a non-numeric value returns 400 before any
upstream request is made.200, even for a
nonexistent hotel id — this endpoint detects Trip.com's own
not-found page content and returns 404 instead of an empty 200.images is a list of image URLs from the hotel's photo gallery;
image_count reports the gallery's full photo count, which may be larger
than images.policy.check_in_out and policy.child are short human-readable lines
taken directly from Trip.com's own display text, not a structured rule
schema.| Field | In the sample | Value in the sample |
|---|---|---|
| hotel_id | Has a value | |
| name | Has a value | “Divalux Resort and Spa Bangkok, Suvarnabhumi Airport-Free S…” |
| local_name | Has a value | “Divalux Resort and Spa Bangkok, Suvarnabhumi Airport-Free S…” |
| star_rating | Has a value | 5 |
| city_name | Has a value | “Bang Sao Thong” |
| province_name | Has a value | “Samut Prakan Province” |
| country_name | Has a value | “Thailand” |
| open_year | Has a value | 2,019 |
| highlights | Has a value | 5 entries |
| location.address | Has a value | 149 characters |
| location.zone_name | Has a value | “Suvarnabhumi Airport” |
| location.latitude | Has a value | |
| location.longitude | Has a value | |
| location.traffic_description | Has a value | “4.1 km from Hua Takhe (straight line distance)” |
| rating.score | Has a value | 8.6 |
| rating.score_description | Has a value | “Very good” |
| rating.score_max | Has a value | 10 |
| rating.total_comment | Has a value | 924 |
| rating.recommend | Has a value | “78% Recommended” |
| rating.cleanliness_score | Has a value | 8.6 |
| rating.amenities_score | Has a value | 8.7 |
| rating.location_score | Has a value | 8.3 |
| rating.service_score | Has a value | 8.7 |
| images | Has a value | 10 entries |
| image_count | Has a value | 10 |
| description | Has a value | 316 characters |
| policy.check_in_out | Has a value | 3 entries |
| policy.child | Has a value | 2 entries |
| popular_facilities | Has a value | 16 entries |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| id (path) | string | Yes | Trip.com hotel id, from a prior search call's hotel_id field | 39371462 | |
| slug | string | No | Optional slug segment for a nicer canonical source URL (e.g. the district/city slug from a search result's url). Not required and not validated by Trip.com. | bang-sao-thong-district | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/tripcom/hotels/39371462" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"hotel_id": 39371462,
"name": "Divalux Resort and Spa Bangkok, Suvarnabhumi Airport-Free Shuttle",
"star_rating": 5,
"city_name": "Bang Sao Thong",
"province_name": "Samut Prakan Province",
"country_name": "Thailand",
"open_year": "2019",
"highlights": [
"Free airport transfers",
"Great views"
],
"location": {
"address": "88 Moo3, Sriwaree Road, Sisa Chokhe Noi, Bang Sao Thong District, Samut Prakan Province, 10570, Thailand",
"zone_name": "Suvarnabhumi Airport",
"latitude": 13.69316,
"longitude": 100.793475,
"traffic_description": "15 km from Pra Chom Klao, approx. 27 mins by car"
},
"rating": {
"score": 8.6,
"score_description": "Very good",
"score_max": 10,
"total_comment": 875,
"recommend": "79% Recommended",
"cleanliness_score": 8.7,
"amenities_score": 8.8,
"location_score": 8.3,
"service_score": 8.7
},
"images": [
"https://ak-d.tripcdn.com/images/0585b12000sq6ih4c6345_R_960_660_R5_D.jpg"
],
"image_count": 10,
"description": "With a stay at Divalux Resort & Spa Bangkok, Suvarnabhumi Airport in Bang Sao Thong, you'll be 6.1 mi (9.9 km) from Lakewood Golf And Country Club...",
"policy": {
"check_in_out": [
"Check-in: After 14:00",
"Check-out: Before 12:00",
"Front desk hours: 24/7"
],
"child": [
"Children of all ages are welcome at this property."
]
},
"popular_facilities": [
"Outdoor swimming pool",
"Spa",
"Massage room"
],
"source_url": "https://www.trip.com/hotels/bang-sao-thong-district-hotel-detail-39371462/divalux-resort-and-spa-bangkok-suvarnabhumi-airport-free-shuttle/"
}
}Request schema
No body schema
Response schema
#/definitions/tripcom.DetailResponse
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| city_name | string | No | Bang Sao Thong | |||
| country_name | string | No | Thailand | |||
| description | string | No | ||||
| highlights | array | No | Free airport transfers,Great views | |||
| hotel_id | integer | No | 39371462 | |||
| image_count | integer | No | 10 | |||
| images | array | No | ||||
| local_name | string | No | ||||
| location | tripcom.Location | No | ||||
| location.address | string | No | 88 Moo3, Sriwaree Road, Sisa Chokhe Noi, Bang Sao Thong District, Samut Prakan Province, 10570, Thailand | |||
| location.latitude | number | No | 13.69316 | |||
| location.longitude | number | No | 100.793475 | |||
| location.traffic_description | string | No | 15 km from Pra Chom Klao, approx. 27 mins by car | |||
| location.zone_name | string | No | Suvarnabhumi Airport | |||
| name | string | No | Divalux Resort and Spa Bangkok, Suvarnabhumi Airport-Free Shuttle | |||
| open_year | string | No | 2019 | |||
| policy | tripcom.Policy | No | ||||
| policy.check_in_out | array | No | Check-in: After 14:00,Check-out: Before 12:00,Front desk hours: 24/7 | |||
| policy.child | array | No | Children of all ages are welcome at this property. | |||
| popular_facilities | array | No | Outdoor swimming pool,Spa,Massage room | |||
| province_name | string | No | Samut Prakan Province | |||
| rating | tripcom.Rating | No | ||||
| rating.amenities_score | number | No | 8.8 | |||
| rating.cleanliness_score | number | No | 8.7 | |||
| rating.location_score | number | No | 8.3 | |||
| rating.recommend | string | No | 79% Recommended | |||
| rating.score | number | No | 8.6 | |||
| rating.score_description | string | No | Very good | |||
| rating.score_max | number | No | 10 | |||
| rating.service_score | number | No | 8.7 | |||
| rating.total_comment | integer | No | 875 | |||
| source_url | string | No | https://www.trip.com/hotels/bang-sao-thong-district-hotel-detail-39371462/divalux-resort-and-spa-bangkok-suvarnabhumi-airport-free-shuttle/ | |||
| star_rating | integer | No | 5 |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/definitions/app.Response |
| 500 | Internal Server Error | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/tripcom/hotels/39371462" \
-H "x-api-key: $CRAWLORA_API_KEY"