Trip.com Hotel Detail
tripcom.hotel.get
Get one hotel from its Trip.com link: name, description, address, rating, review count and amenities.
At a glance
- Endpoint ID
tripcom.hotel.get- Price
- 2 credits per call; failed calls are free
- Runs for up to
- 30 seconds
Request
Send the endpoint ID as capability and its fields as input. Set UPSCRAPE_API_KEY to your key first.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "tripcom.hotel.get", "input": { "hotel_url": "https://nz.trip.com/hotels/london-hotel-detail-2985758/royal-national-hotel-london/" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "tripcom.hotel.get", "input": { "hotel_url": "https://nz.trip.com/hotels/london-hotel-detail-2985758/royal-national-hotel-london/" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "tripcom.hotel.get", "input": { "hotel_url": "https://nz.trip.com/hotels/london-hotel-detail-2985758/royal-national-hotel-london/" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
hotel_url |
string | yes | The hotel's Trip.com link, such as one from hotel search. | https://nz.trip.com/hotels/london-hotel-detail-… |
adults |
integer | no | Number of adults. | |
amenities |
array<string> | no | Amenities you are looking for. | |
check_in |
string | no | Check-in date, YYYY-MM-DD. | |
check_out |
string | no | Check-out date, YYYY-MM-DD. | |
children |
integer | no | Number of children. | |
currency |
string | no | Currency code, such as GBP. | |
locale |
string | no | Language, such as en. | |
rooms |
integer | no | Number of rooms. |
Response
A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.
This is results[0].data from a real run:
{ "title": "Royal National Hotel", "rating": 8.2, "reviews": 3139, "location": "London", "address": "38-51 Bedford Way, Camden, London, Greater London WC1H 0DG, United Kingdom", "collected_at": "2026-09-20T20:54:11Z", "hotel_id": "2985758", "image_url": "https://ak-d.tripcdn.com/images/1mc4512000dl5w9gpC200_R_960_660_R5_D.jpg", "rating_text": "Very good", "source_url": "https://nz.trip.com/hotels/london-hotel-detail-2985758/royal-national-hotel-london/", "url": "https://nz.trip.com/hotels/london-hotel-detail-2985758/royal-national-hotel-london/", "amenities": [ "Public parking", "Luggage Storage" ], "facilities": [ "Public parking", "Luggage Storage" ]}
Fields
| Field | Type | What it is | Example |
|---|---|---|---|
title |
string | The hotel's name. | Royal National Hotel |
rating |
number | The hotel's guest rating out of 10. | 8.2 |
reviews |
integer | How many reviews the hotel has. | 3139 |
location |
string | The city the hotel is in. | London |
address |
string | The hotel's address. | 38-51 Bedford Way, Camden, London, Greater London WC1H 0DG, Uni… |
amenities |
array | Amenities the hotel lists. | Public parking, Luggage Storage, Bar |
collected_at |
string | When this result was collected. | 2026-09-20T20:54:11Z |
facilities |
array | Facilities the hotel lists. | Public parking, Luggage Storage, Bar |
hotel_id |
string | Trip.com's ID for the hotel. | 2985758 |
image_url |
string | The hotel's main photo. | https://ak-d.tripcdn.com/images/1mc4512000dl5w9gpC200_R_960_660… |
rating_text |
string | The rating in words, such as Very good. | Very good |
source_url |
string | The Trip.com page this was read from. | https://nz.trip.com/hotels/london-hotel-detail-2985758/royal-na… |
url |
string | The page on Trip.com. | https://nz.trip.com/hotels/london-hotel-detail-2985758/royal-na… |
If a call fails
A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.
Other Trip.com Travel endpoints
Something missing or unclear? Ask the team that builds the Trip.com Travel endpoints.