Trip.com API endpoint
Use Crawlora's Get Trip.com hotel detail API to extract supported public Trip.com data as structured JSON. This page includes request parameters, cURL examples, response schema, error behavior, credit cost, and a Playground link for testing before integration.
/tripcom/hotels/{id}Returns a normalized 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. Credential-free public data sourced from Trip.com's own server-rendered hotel-detail page. 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. Developers commonly use this endpoint for data enrichment, monitoring, research dashboards, internal automation, and agent-native workflows that need repeatable structured public web data. Authentication uses the documented Crawlora headers, and usage is metered with the credit cost shown on this page.
Request parameters are generated from the active endpoint catalog. Required values must be sent before Crawlora can call the upstream public web data source.
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| id (path) | string | Yes | Trip.com hotel id, from a prior search call's hotel_id field | ||
| 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. | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/tripcom/hotels/example" \ -H "x-api-key: $CRAWLORA_API_KEY"
Send your scraping API key in the x-api-key header. Use the console API Keys page to rotate or select the active key.
Endpoint usage is metered in credits. The plan prices, included credits, limits, and overage rates below match the active backend billing configuration.
| Plan | Price | Included credits | Daily cap | Rate limit | Overage |
|---|---|---|---|---|---|
| Free | $0/mo | 2,000 | 500 daily credits | 5/min | No overage |
| Starter | $9/mo | 20,000 | 5,000 daily credits | 15/min | $0.75/1,000 overage credits when enabled |
| Growth | $29/mo | 100,000 | 25,000 daily credits | 45/min | $0.45/1,000 overage credits when enabled |
| Pro | $79/mo | 400,000 | No daily cap | 120/min | $0.30/1,000 overage credits |
| Business | $199/mo | 1,200,000 | No daily cap | 300/min | $0.20/1,000 overage credits |
| Enterprise | $499/mo | 5,000,000 | No daily cap | 1,000/min | $0.12/1,000 overage credits |
This endpoint is executed through Crawlora's managed scraping infrastructure.
Some targets require real browser execution because the data is loaded through JavaScript, dynamic rendering, or interaction-like browser behavior.
For supported endpoints, Crawlora can route requests through a managed browser cluster. This allows Crawlora to execute JavaScript, load dynamic content, apply browser-level request behavior, and normalize the rendered result into JSON.
You do not need to operate your own Playwright, Puppeteer, Chrome, proxy, queue, or retry infrastructure.
- `id` must be numeric; a non-numeric value returns `400` before any upstream request is made. - Trip.com's own detail route always returns HTTP `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`. - Pricing is intentionally not included: Trip.com's detail page only returns per-night rates alongside check-in/check-out dates and occupancy, which this endpoint does not take as input. Use the search endpoint for a city's current display prices. - `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. Example response: ```json { "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/" } } ```
Crawlora does not silently return bad data when the upstream page cannot be used.
| Status | Common failure case |
|---|---|
| 400 | Invalid input or missing required parameter |
| 429 | Plan or endpoint rate limit exceeded |
| 500 | Internal execution error |
| 502 | Upstream platform failed, returned unusable HTML, or served a challenge page that could not be resolved |
When possible, Crawlora returns structured error context so your integration can retry, back off, or inspect the request.
| 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 |
{
"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 |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/tripcom/hotels/example" \
-H "x-api-key: $CRAWLORA_API_KEY"Crawlora is designed for responsible structured public web data workflows. Customers are responsible for using Crawlora in compliance with applicable laws, third-party rights, target-platform rules, and Crawlora terms.
Read Crawlora terms