Discover/Trip API
live

Trip APIhk.trip.com

Search flights and hotels on hk.trip.com, fetch guest reviews, and get trending destinations via 4 structured API endpoints returning live pricing and ratings.

Endpoint health
verified 4d ago
get_hotel_reviews
search_hotels
search_flights
get_hot_destinations
4/4 passing latest checkself-healing
Endpoints
4
Updated
26d ago

What is the Trip API?

The hk.trip.com API exposes 4 endpoints covering flight search, hotel search, hotel reviews, and trending destinations from Hong Kong's Trip.com travel marketplace. The search_flights endpoint returns full itinerary lists with per-flight pricing, airline data, and segment details, while search_hotels delivers hotel listings with ratings, room info, and location data — all in structured JSON ready to query programmatically.

Try it
Origin airport or city code (e.g., HKG, NYC, PEK)
Trip type: 1 for one-way, 2 for round-trip
Departure date in YYYY-MM-DD format
Destination airport or city code (e.g., NRT, TYO, HKG)
Return date in YYYY-MM-DD format, required when trip_type is 2 (round-trip)
api.parse.bot/scraper/9bcbfcea-6ec6-48ea-91e3-b149077443a0/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X POST 'https://api.parse.bot/scraper/9bcbfcea-6ec6-48ea-91e3-b149077443a0/search_flights' \
  -H 'X-API-Key: $PARSE_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "origin": "HKG",
  "trip_type": "1",
  "depart_date": "2026-08-10",
  "destination": "NRT",
  "return_date": "2026-08-17"
}'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace hk-trip-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

from parse_apis.trip.com_hk_api import TripHK, TripType, FlightItinerary, Hotel, Review, DestinationGroup

client = TripHK()

# Discover destinations to find city IDs for hotel search
for group in client.destinationgroups.list():
    print(group.group_name, group.group_id)
    for dest in group.hot_destination:
        print(dest.display_name, dest.id)

# Search flights from Hong Kong to Tokyo (one-way)
for flight in client.flightitineraries.search(
    origin="HKG",
    destination="NRT",
    depart_date="2026-08-01",
    trip_type=TripType.ONE_WAY,
):
    print(flight.airline, flight.price)
    for seg in flight.segments:
        print(seg.flight_no, seg.depart_date_time, seg.arrive_date_time, seg.duration)

# Search hotels in Hong Kong (city_id=58) and browse reviews
for hotel in client.hotels.search(city_id="58", checkin="2026-08-01", checkout="2026-08-03"):
    print(hotel.hotel_basic_info.hotel_name, hotel.hotel_basic_info.price)
    print(hotel.comment_info.comment_score, hotel.position_info.city_name)
    # Access reviews as a sub-resource of the hotel
    for review in hotel.reviews.list(limit=3):
        print(review.id, review.rating, review.create_date, review.content)
All endpoints · 4 totalmissing one? ·

Search for flights between two cities. Returns flight itineraries with pricing, segments, and airline information. Supports one-way and round-trip searches. Results include lowest price, currency, and detailed segment info including departure/arrival times, airports, and durations.

Input
ParamTypeDescription
originrequiredstringOrigin airport or city code (e.g., HKG, NYC, PEK)
trip_typestringTrip type: 1 for one-way, 2 for round-trip
depart_daterequiredstringDeparture date in YYYY-MM-DD format
destinationrequiredstringDestination airport or city code (e.g., NRT, TYO, HKG)
return_datestringReturn date in YYYY-MM-DD format, required when trip_type is 2 (round-trip)
Response
{
  "type": "object",
  "fields": {
    "currency": "string, currency code (e.g., HKD)",
    "lowestPrice": "number, lowest total price found",
    "recordCount": "integer, total number of flights found",
    "flightItineraryList": "array of flight itinerary objects with airline, price, segments, and flags"
  },
  "sample": {
    "data": {
      "currency": "HKD",
      "lowestPrice": 1743,
      "recordCount": 2,
      "flightItineraryList": [
        {
          "flags": [
            "FASTEST"
          ],
          "price": 1743,
          "airline": "UO",
          "segments": [
            {
              "duration": 205,
              "flightNo": "UO604",
              "airlineCode": "UO",
              "arriveDateTime": "2026-07-01 07:00:00",
              "departDateTime": "2026-07-01 02:35:00"
            }
          ]
        }
      ]
    },
    "status": "success"
  }
}

About the Trip API

Flight and Hotel Search

The search_flights endpoint accepts an origin and destination (IATA airport or city codes), a depart_date, and an optional trip_type (1 for one-way, 2 for round-trip). Responses include a flightItineraryList array with per-itinerary airline identifiers, segment breakdowns, pricing, and flags — plus a top-level lowestPrice and recordCount so you can surface the cheapest option without iterating the full list. For round-trip searches, pass a return_date alongside trip_type: 2.

The search_hotels endpoint takes a city_id, checkin, and checkout date pair, and an optional adults count. Each hotel object in the returned hotelList contains four sub-objects: hotelBasicInfo (name, star rating, thumbnail), commentInfo (aggregate score), positionInfo (address and coordinates), and roomInfo (rate and room-type snapshot). City IDs follow Trip.com's internal scheme — use get_hot_destinations to resolve readable city names to their numeric IDs before querying.

Reviews and Destination Discovery

get_hotel_reviews returns paginated guest reviews for a specific hotel identified by hotel_id. Each entry in commentList carries a content string, numeric rating, createDate, userInfo, and an imageList of attached photos. The totalCount field tells you how many pages to expect when paginating with the page parameter.

get_hot_destinations requires no inputs and returns destination groups, each containing a hotDestination list of city names and their corresponding IDs. This endpoint is the practical starting point when building city-aware hotel search flows — map names to IDs here, then pass them to search_hotels.

Reliability & maintenanceVerified

The Trip API is a managed, monitored endpoint for hk.trip.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when hk.trip.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official hk.trip.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
4d ago
Latest check
4/4 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a flight price tracker comparing round-trip fares between HKG and multiple destinations using lowestPrice from search_flights.
  • Aggregate hotel ratings and review counts across a city by combining commentInfo from search_hotels with paginated commentList from get_hotel_reviews.
  • Populate a destination picker UI with city names and IDs from get_hot_destinations to drive hotel search queries.
  • Analyze guest review sentiment by ingesting content and rating fields from get_hotel_reviews across multiple properties.
  • Display cheapest available hotel room rates for a city break by querying roomInfo in search_hotels for a given checkin/checkout window.
  • Filter one-way versus round-trip flight availability using the trip_type parameter in search_flights for the same city pair.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Trip.com offer an official developer API?+
Trip.com operates a partner/affiliate API program for high-volume travel distribution partners, documented at https://pages.trip.com/intl/en/partner. Access is application-gated and not publicly self-serve. The Parse API provides immediate programmatic access to the same flight and hotel data without a partnership application.
What does `search_flights` return beyond price — can I get baggage or fare-class details?+
Each itinerary in flightItineraryList includes airline identifiers, flight segments, total pricing, and per-itinerary flags. Baggage allowance details and fare-class breakdowns are not currently exposed in the response shape. You can fork this API on Parse and revise it to add an endpoint targeting those details.
Does the API cover train or bus searches available on hk.trip.com?+
Not currently. The four endpoints cover flights, hotels, hotel reviews, and hot destinations. Train and bus route search is not included. You can fork this API on Parse and revise it to add the missing transport endpoints.
How does pagination work for hotel reviews?+
Pass an integer page parameter to get_hotel_reviews alongside the required hotel_id. The response includes a totalCount field indicating the total number of reviews, which you can use to calculate how many pages exist before iterating.
How do I find the correct `city_id` for a hotel search?+
Call get_hot_destinations with no parameters. It returns grouped destination lists, each entry containing a city name and its numeric ID. Pass that ID as city_id to search_hotels. The endpoint documents example IDs — 228 for Tokyo, 58 for Hong Kong, 30 for Shenzhen — as reference points.
Page content last updated . Spec covers 4 endpoints from hk.trip.com.
Related APIs in TravelSee all →
hotels.ctrip.com API
Search and explore hotels on Ctrip (携程), one of China's largest travel platforms. Retrieve hotel listings by city or keyword, access full property details and room options, and read paginated guest reviews — all in real-time.
kayak.com.hk API
Search for flights and compare prices across airlines and routes, including flexible-date searches across multiple origin airports. View monthly price calendars to find the cheapest travel dates and get real-time fare information for any route.
hotels.com API
Search for hotels across millions of properties, view room availability and pricing, and get detailed information about accommodations at specific destinations. Get location suggestions and discover popular travel spots to help plan your next getaway.
expedia.com API
Search for hotels and flights across Expedia while viewing detailed property information to compare prices and amenities for your travel plans. Get comprehensive travel options all from one integration without manually browsing the website.
tripadvisor.com API
Search for travel destinations and discover hotels with detailed information like ratings, reviews, and amenities. Get comprehensive place details to help plan your perfect trip and compare accommodation options.
agoda.com API
agoda.com API
travelocity.com API
Search for travel destinations and browse hotel listings on Travelocity. Compare options by location, dates, and availability to find and book accommodation.
hotelscan.ai API
Search and compare hotels with detailed guest reviews, room availability, and pricing information across flexible dates. Find similar properties, get autocomplete suggestions for locations, and access comprehensive hotel details all in one place.