Trip.com Hotel Rooms API Documentation Get the room rates of one hotel for one stay. Each room has an id, name, bed, a photo and its rates. Each rate has the price per night and the total for the stay as numbers in the requested currency, taxes, breakfast, cancellation terms, payment type and rooms left. Take the hotel id from the hotel search or suggest endpoint. Rate data is available for a subset of hotels only (about 25 percent in our test): for every other hotel Trip.com publishes no rates and the call answers 404 ROOMS_NOT_AVAILABLE. That answer costs nothing and is remembered for 3 hours, so a repeat call is fast. A call with rates takes up to about 40 seconds because a browser must start first. Only the rates that Trip.com shows on its own page are listed. Cost: 10 credits per successful call. Failed calls, ROOMS_NOT_AVAILABLE and empty answers cost 0.
Run this endpoint
Endpoint
Parameters
Start with the required fields, then add optional filters only when your use case needs them.
Runnable path
3 required parameters needed before sending a request.
4 optional filters available.
string
Required
Trip.com hotel id from the search or suggest endpoint. Example: 436887.
1234567890
string
Required
Check-in date, YYYY-MM-DD, today or later.
example
string
Required
Check-out date, YYYY-MM-DD, after check-in.
example
integer
Optional
Adults, 1 to 9. Defaults to 2.
10
string
Optional
Up to 6 ages from 0 to 17, separated by commas. Example: 4,9.
example
string
Optional
Price currency, for example EUR or USD. Defaults to USD.
USD
string
Optional
Site language, for example en or de. Defaults to en.
en-US
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"data": {
"rooms": [
{
"bed": "3 single beds",
"name": "Triple Room",
"rates": [
{
"meal": "Meals not included",
"payment": "Prepay Online",
"rate_id": "1846957914",
"bookable": true,
"currency": "EUR",
"rooms_left": 4,
"price_total": 490.43,
"cancellation": "Non-refundable",
"taxes_included": 81.74,
"price_per_night": 245.22,
"free_cancellation": false,
"breakfast_included": false
}
],
"room_id": "328536850",
"photo_url": "https://example.com/room.jpg",
"cheapest_price": 490.43
}
],
"total": 1,
"adults": 2,
"locale": "en",
"nights": 2,
"check_in": "2027-03-14",
"currency": "EUR",
"hotel_id": "436887",
"check_out": "2027-03-16",
"children_ages": []
},
"meta": {
"credits": 10,
"billable": true,
"endpoint_family": "hotel_rooms"
},
"success": true
}
Errors
Handle these documented responses before retrying or showing customer-facing failures.
Validation Error
A query parameter is missing or invalid. This response is not billable.
{
"errors": {
"hotel_id": [
"A hotel id is required. Take it from the suggest or search endpoint."
]
},
"message": "The request validation failed"
}Rooms Not Available
Trip.com publishes room rates for a subset of hotels only. This hotel is not in it. This response is not billable and is remembered for 3 hours.
{
"meta": {
"billable": false,
"retryable": false,
"endpoint_family": "hotel_rooms"
},
"error": {
"code": "ROOMS_NOT_AVAILABLE",
"message": "Trip.com does not publish room rates for this hotel. Rate data is available for a subset of hotels only."
},
"success": false
}Unexpected Upstream Answer
Trip.com answered with a page or payload Scrappa cannot read. This response is not billable. Retry later.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "trip_com"
},
"error": {
"code": "PARSER_DRIFT",
"message": "The Trip.com API is temporarily unavailable. Please retry."
},
"success": false
}Upstream Unavailable
Trip.com did not answer after one retry. This response is not billable. Retry later.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "trip_com"
},
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The Trip.com API is temporarily unavailable. Please retry."
},
"success": false
}Generate Code with AI
Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.
Try It Live
Test this endpoint in our interactive playground with real data.