---
title: "Search Trip.com hotels by city"
method: GET
path: "/tripcom/hotels/search"
tags: ["Trip.com"]
---

# Search Trip.com hotels by city

`GET /tripcom/hotels/search`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/tripcom/hotels/search`
- Auth: API key in header `x-api-key`

Returns Trip.com's own top-hotels page for a city: 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 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}/.

## Query parameters

- `city_slug` string, required
- `city_id` string, required

## Headers

- `x-api-key` string, required

## Response `200`

OK

- TripcomSearchResponseDoc
  - `code` integer
  - `data` TripcomSearchResponse
    - `city_id` string
    - `city_slug` string
    - `count` integer
    - `hotels` TripcomHotelSummary[]
      - `description` string
      - `hotel_id` integer
      - `image_url` string
      - `location` string
      - `name` string
      - `price` TripcomPrice
        - `amount` number
        - `currency` string
        - `raw` string
        - `unit` string
      - `rating_score` number
      - `review_count` integer
      - `star_rating` integer
      - `url` string
    - `source_url` string
  - `msg` string

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `500`: Internal Server Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/afac9b012a27?raw)
