Endpoint Playground
Test Crawlora's Search Trip.com hotels by city API with realistic prefilled parameters. Generate a cURL request, inspect the expected structured JSON response, and open the full docs or pricing page when you are ready to integrate this public web data extraction endpoint into your application.
curl "https://api.crawlora.net/api/v1/tripcom/hotels/search?city_slug=<city_slug>&city_id=<city_id>" \
-H "x-api-key: $CRAWLORA_API_KEY"| Parameter | Type | Required | Prefilled value | Description |
|---|---|---|---|---|
| city_slug | string | Yes | Trip.com city slug, the text segment of a /hotels/{city_slug}-hotels-list-{city_id}/ URL | |
| city_id | string | Yes | Trip.com numeric city id, the trailing number of a /hotels/{city_slug}-hotels-list-{city_id}/ URL |
{
"code": 200,
"msg": "OK",
"data": {
"city_slug": "bangkok",
"city_id": "359",
"count": 9,
"hotels": [
{
"hotel_id": 39371462,
"name": "Divalux Resort and Spa Bangkok, Suvarnabhumi Airport-Free Shuttle",
"url": "https://www.trip.com/hotels/bang-sao-thong-district-hotel-detail-39371462/divalux-resort-and-spa-bangkok-suvarnabhumi-airport-free-shuttle/",
"image_url": "https://ak-d.tripcdn.com/images/0585b12000sq6ih4c6345.jpg",
"location": "88 Moo3, Sriwaree Road, Sisa Chokhe Noi, Bang Sao Thong District, Srisa Chorakhe Noi, Bang Sao Thong",
"star_rating": 5,
"rating_score": 8.7,
"review_count": 872,
"description": "The hotel has a relaxing wellness atmosphere, and the staff are friendly and provide excellent service.",
"price": {
"raw": "US$38",
"currency": "US$",
"amount": 38,
"unit": "1 night"
}
}
],
"source_url": "https://www.trip.com/hotels/bangkok-hotels-list-359/"
}
}Public Playground
Sample responses, schemas, request previews, and code snippets are visible before sign in. Create an account when you are ready to save an API key and run authenticated requests.
Returns Trip.com's own top-hotels page for a city: normalized hotel summaries (name, location, star rating, guest rating, review count, image, display price) for the hotels Trip.com features on that city's hotel-list page. Trip.com does not expose a credential-free free-text city search, so callers supply the exact city_slug and city_id pair from a known Trip.com hotel-list URL of the form https://www.trip.com/hotels/{city_slug}-hotels-list-{city_id}/. Credential-free public data sourced from Trip.com's own server-rendered hotel-list page.
{
"code": 200,
"msg": "OK",
"data": {
"city_slug": "bangkok",
"city_id": "359",
"count": 9,
"hotels": [
{
"hotel_id": 39371462,
"name": "Divalux Resort and Spa Bangkok, Suvarnabhumi Airport-Free Shuttle",
"url": "https://www.trip.com/hotels/bang-sao-thong-district-hotel-detail-39371462/divalux-resort-and-spa-bangkok-suvarnabhumi-airport-free-shuttle/",
"image_url": "https://ak-d.tripcdn.com/images/0585b12000sq6ih4c6345.jpg",
"location": "88 Moo3, Sriwaree Road, Sisa Chokhe Noi, Bang Sao Thong District, Srisa Chorakhe Noi, Bang Sao Thong",
"star_rating": 5,
"rating_score": 8.7,
"review_count": 872,
"description": "The hotel has a relaxing wellness atmosphere, and the staff are friendly and provide excellent service.",
"price": {
"raw": "US$38",
"currency": "US$",
"amount": 38,
"unit": "1 night"
}
}
],
"source_url": "https://www.trip.com/hotels/bangkok-hotels-list-359/"
}
}curl "https://api.crawlora.net/api/v1/tripcom/hotels/search?city_slug=<city_slug>&city_id=<city_id>" \
-H "x-api-key: $CRAWLORA_API_KEY"