APIs / Travel / Trip.com

1 credit per call20 endpoints27 datapointsChecked working 6 Dec 2026

Trip.com API

Trip.com API for hotels, rooms, reviews, flights, trains, buses, car rental, cruises, packages and attractions as JSON, from 1 credit per call.

Trip.com
GET/v1/trip-com/hotels-search?city_id=192&check_in=2027-03-14&check_out=2027-03-16&adults=2&stars[]=4&stars[]=5&currency=USD
{
  "success": true,
  "data": {
    "city_id": "192",
    "check_in": "2027-03-14",
    "check_out": "2027-03-16",
    "adults": 2,
    "currency": "USD",
    "locale": "en",
    "sort": "popularity",
    "page": 1,
    "total": 2413,
    "count": 12,
    "hotels": [
      {
        "position": 1,
        "hotel_id": "718146",
        "name": "Hotel Régence Etoile",
        "name_en": "Hotel Régence Etoile",
        "category": "Hotel",
        "stars": 4,
        "guest_score": 9.2,
        "guest_score_label": "Great",
        "review_count": 564,
        "city": "Paris",
        "city_id": "192",
        "address": "Champs Elysées",
        "zone": "Champs Elysées",
        "location_hint": "Near Arc de Triomphe de l’Etoile | Charles de Gaulle - étoile Metro Station",
        "latitude": 48.876537,
        "longitude": 2.292983,
        "price_per_night": 221,
        "original_price_per_night": 367,
        "total_price": 524.39,
        "currency": "USD",
        "nights": 2,
        "room_name": "Classic Room",
        "bed": "1 queen bed",
        "free_cancellation": true,
        "is_ad": false,
        "images": [
          "https://ak-d.tripcdn.com/images/0582t12000jbiuxe0A6C0_R_600_600_R5_D.jpg_.webp",
          "https://ak-d.tripcdn.com/images/200v11000000rkn07BFC6_R_600_600_R5_D.jpg_.webp",
          "https://ak-d.tripcdn.com/images/1mc3s12000dtpdp508E3C_R_600_600_R5_D.jpg_.webp"
        ],
        "url": "https://www.trip.com/hotels/detail/?hotelId=718146"
      },
      {
        "position": 2,
        "hotel_id": "730417",
        "name": "Hotel des Comédies",
        "name_en": "Hotel des Comédies",
        "category": "Hotel",
        "stars": 4,
        "guest_score": 9.2,
        "guest_score_label": "Great",
        "review_count": 130,
        "city": "Paris",
        "city_id": "192",
        "zone": "Near Palais Garnier|Le Marais",
        "location_hint": "Near Palais Garnier | Le Marais",
        "latitude": 48.871065,
        "longitude": 2.34991,
        "price_per_night": 98,
        "original_price_per_night": 156,
        "total_price": 253.94,
        "currency": "USD",
        "nights": 2,
        "room_name": "Standard Double Room",
        "bed": "1 queen bed or 2 single beds",
        "free_cancellation": false,
        "is_ad": false,
        "images": [
          "https://ak-d.tripcdn.com/images/1mc1g12000u940tbi281D_R_600_600_R5_D.jpg_.webp",
          "https://ak-d.tripcdn.com/images/1mc3l12000u94061pE573_R_600_600_R5_D.jpg_.webp",
          "https://ak-d.tripcdn.com/images/1mc3i12000u93zg02CF6E_R_600_600_R5_D.jpg_.webp"
        ],
        "url": "https://www.trip.com/hotels/detail/?hotelId=730417"
      },
      {
        "position": 3,
        "hotel_id": "717730",
        "name": "Norman Paris Hôtel & Spa",
        "name_en": "Norman Paris Hôtel & Spa",
        "category": "Hotel",
        "stars": 5,
        "guest_score": 9.3,
        "guest_score_label": "Great",
        "review_count": 55,
        "city": "Paris",
        "city_id": "192",
        "address": "Champs Elysées",
        "zone": "Champs Elysées",
        "location_hint": "Champs Elysées | Near Arc de Triomphe de l’Etoile",
        "latitude": 48.873745,
        "longitude": 2.300357,
        "price_per_night": 373,
        "original_price_per_night": 410,
        "total_price": 798.04,
        "currency": "USD",
        "nights": 2,
        "room_name": "Cozy Room",
        "bed": "1 queen bed",
        "free_cancellation": false,
        "is_ad": false,
        "images": [
          "https://ak-d.tripcdn.com/images/1mc5d12000dpe7bqtEEDB_R_600_600_R5_D.jpg_.webp",
          "https://ak-d.tripcdn.com/images/1mc5612000cfah2ml7B51_R_600_600_R5_D.jpg_.webp",
          "https://ak-d.tripcdn.com/images/1mc6912000c4abom9EC13_R_600_600_R5_D.jpg_.webp"
        ],
        "url": "https://www.trip.com/hotels/detail/?hotelId=717730"
      }
    ]
  },
  "meta": {
    "endpoint_family": "hotel_search",
    "request_id": "req_c053a719c0d3413799df9eff810fba17",
    "credits_charged": 1,
    "credits_remaining": 1793
  }
}
200 OKJSONX-Credits-Used: 1
Recorded from our API and shortened.

Sample data

What one call returns

A recorded run of hotels-search: the fields and shapes you will get, shortened to 3 items.

#positionintegerhotel_idstringnamestringname_enstringcategorystringstarsintegerguest_scorenumberguest_score_labelstringreview_countintegercitystringcity_idstringaddressstringzonestringlocation_hintstringlatitudenumberlongitudenumberprice_per_nightintegeroriginal_price_per_nightintegertotal_pricenumbercurrencystringnightsintegerroom_namestringbedstringfree_cancellationbooleanis_adbooleanimagesstring[]urlurl
11718146Hotel Régence EtoileHotel Régence EtoileHotel49.2Great564Paris192Champs ElyséesChamps ElyséesNear Arc de Triomphe de l’Etoile | Charles de Gaulle - étoile Metro Station48.8765372.292983221367524.39USD2Classic Room1 queen bedtruefalse[3 items]https://www.trip.com/hotels/detail/?hotelId=718146
22730417Hotel des ComédiesHotel des ComédiesHotel49.2Great130Paris192—Near Palais Garnier|Le MaraisNear Palais Garnier | Le Marais48.8710652.3499198156253.94USD2Standard Double Room1 queen bed or 2 single bedsfalsefalse[3 items]https://www.trip.com/hotels/detail/?hotelId=730417
33717730Norman Paris Hôtel & SpaNorman Paris Hôtel & SpaHotel59.3Great55Paris192Champs ElyséesChamps ElyséesChamps Elysées | Near Arc de Triomphe de l’Etoile48.8737452.300357373410798.04USD2Cozy Room1 queen bedfalsefalse[3 items]https://www.trip.com/hotels/detail/?hotelId=717730

Recorded from our API · 3 items shown · 27 datapoints per itemGET /v1/trip-com/hotels-search?city_id=192&check_in=2027-03-14&check_out=2027-03-16&adults=2&stars[]=4&stars[]=5&currency=USD

27 datapoints

Identity

  • hotel_idstring
  • namestring
  • name_enstring
  • categorystring
  • room_namestring

Contact

  • urlurl

Location

  • citystring
  • city_idstring
  • addressstring
  • location_hintstring
  • latitudenumber
  • longitudenumber
  • free_cancellationboolean

Reputation

  • starsinteger
  • guest_scorenumber
  • guest_score_labelstring
  • review_countinteger
  • imagesstring[]

Price

  • price_per_nightinteger
  • original_price_per_nightinteger
  • total_pricenumber
  • currencystring

Other

  • positioninteger
  • zonestring
  • nightsinteger
  • bedstring
  • is_adboolean

Playground

Run this API

cURLshell
curl "https://api.perceptlayer.com/v1/trip-com/hotels-search?city_id=192&check_in=2027-03-14&check_out=2027-03-16&adults=2&stars[]=4&stars[]=5&currency=USD" \
  -H "X-API-Key: $API_KEY"

Trip.com · 20 endpoints

Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

EndpointRequired parametersReturnsCost
GET/v1/trip-com/attractions-detail
none+4 optional
JSON1 credit
GET/v1/trip-com/attractions-reviews
id+3 optional
JSON1 credit
GET/v1/trip-com/attractions-search
query+4 optional
JSON1 credit
GET/v1/trip-com/buses-search
fromtodate+2 optional
JSON1 credit
GET/v1/trip-com/cars-locations
query+1 optional
JSON1 credit
GET/v1/trip-com/cars-search
pickup_locationpickup_city_idpickup_location_namepickup_latitudepickup_longitudepickup_datetimedropoff_datetime+14 optional
JSON10 credits
GET/v1/trip-com/cruises-detail
id+3 optional
JSON1 credit
GET/v1/trip-com/cruises-search
none+8 optional
JSON1 credit
GET/v1/trip-com/flights-calendar
fromtodate+2 optional
JSON1 credit
GET/v1/trip-com/flights-search
fromtodate+5 optional
JSON1–3 credits
GET/v1/trip-com/hotels-detail
none+3 optional
JSON1 credit
GET/v1/trip-com/hotels-filters
city_idcheck_incheck_out+2 optional
JSON1 credit
GET/v1/trip-com/hotels-reviews
hotel_id+3 optional
JSON1 credit
GET/v1/trip-com/hotels-rooms
hotel_idcheck_incheck_out+4 optional
JSON10 credits
GET/v1/trip-com/hotels-search
city_idcheck_incheck_out+14 optional
city_idcheck_incheck_outadultscurrencylocale+1 more
1–18 credits
GET/v1/trip-com/packages-search
fromtocity_iddatereturn_date+3 optional
JSON3 credits
GET/v1/trip-com/suggest
query+2 optional
JSON1 credit
GET/v1/trip-com/trains-calendar
fromtodate+2 optional
JSON1 credit
GET/v1/trip-com/trains-search
fromtodate+3 optional
JSON3 credits
GET/v1/trip-com/trains-stations
none+3 optional
JSON1 credit

Overview

About the Trip.com API

What you can get

The Trip.com API returns Trip.com travel data as JSON through 20 endpoints. Most take a currency (USD, EUR, GBP, JPY or KRW) and a locale (en, en-gb, de, fr, ja, ko or zh-hk).

  • Hotels: hotels-search takes a city_id, check_in and check_out, with adults, children_ages[], rooms, page, pages, guest_score_min, free_cancellation, breakfast, stars[], min_price, max_price and sort (popularity, price_asc, price_desc, top_reviewed, stars or distance). hotels-filters takes the same city_id, check_in and check_out. hotels-detail takes a hotel_id or a url; hotels-reviews takes a hotel_id, with page, page_size and sort (relevant, recent, rating_desc or rating_asc); hotels-rooms takes a hotel_id, check_in and check_out, with adults and children_ages.
  • Flights: flights-search takes from, to and date, with return_date, adults, cabin_class (economy, premium_economy or business) and policy_id. flights-calendar takes from, to and date, with return_date.
  • Packages: packages-search takes from, to, city_id, date and return_date, with adults and page.
  • Trains and buses: trains-stations takes a query, with country and mode (search or recommend). trains-search takes from, to and date, with adults; trains-calendar takes from, to and date. buses-search takes from, to and date.
  • Car rental: cars-locations takes a query. cars-search takes a pickup_location, pickup_city_id, pickup_location_name, pickup_latitude, pickup_longitude, pickup_datetime and dropoff_datetime, with the matching dropoff fields, driver_age, page, page_size, car_class, supplier, transmission (automatic or manual) and free_cancellation.
  • Cruises: cruises-search takes a destination, with month, start_date, end_date, page and sort (recommended, sales, reviews, price_asc or price_desc); cruises-detail takes an id, with departure_date.
  • Attractions: attractions-search takes a query, with page and sort (recommended, price_asc or price_desc); attractions-detail takes an id or a url; attractions-reviews takes an id, with page and page_size.
  • Suggest: suggest takes a query, with type (all, city, hotel or airport).

The recorded hotels-search for city_id 192 (Paris), 14 to 16 March 2027, 2 adults, 4 and 5 stars, in USD returns total (2413 in that recording), count, page, sort and hotels, each with position, hotel_id, name, stars, guest_score, guest_score_label, review_count, zone, latitude, longitude, price_per_night, original_price_per_night, total_price, nights, room_name, bed, free_cancellation, is_ad, images and url.

How a call works

Search a city, then look up a hotel: GET /v1/trip-com/hotels-search?city_id=192&check_in=2027-03-14&check_out=2027-03-16&adults=2&currency=USD with your key in the X-API-Key header. Each hotel carries a hotel_id, which hotels-detail, hotels-reviews and hotels-rooms take. Most calls cost 1 credit. hotels-search costs 1 credit for the first page in the default order, and 3 credits per page from page 2, for each page read with pages, or with guest_score_min, free_cancellation, breakfast or another sort, up to 18. flights-search costs 1 credit one way and 3 with return_date. trains-search and packages-search cost 3, and hotels-rooms and cars-search cost 10. Failed calls cost nothing.

TravelJSONRESTMCP

More travel APIs

Use cases

Track nightly hotel prices and discounts for a city and date range

Use the Trip.com API to track nightly hotel prices and discounts for a city and date range

Compare room rates for a hotel across dates with `hotels-rooms`

Use the Trip.com API to compare room rates for a hotel across dates with `hotels-rooms`

Find the cheapest travel dates with `flights-calendar` and `trains-calendar`

Use the Trip.com API to find the cheapest travel dates with `flights-calendar` and `trains-calendar`

Compare flight, train and bus options on the same route

Use the Trip.com API to compare flight, train and bus options on the same route

FAQ

Questions

How much does the Trip.com API cost?

Most calls cost one credit. `hotels-search` costs 1 credit for the first page in the default order and 3 per page after that, or with `pages`, filters such as `guest_score_min`, `free_cancellation` and `breakfast`, or another sort, up to 18. `flights-search` costs 1 credit one way and 3 with `return_date`; `trains-search` and `packages-search` cost 3; `hotels-rooms` and `cars-search` cost 10. Failed calls cost nothing. New accounts get free credits to start, and credit packs bring the price down as you scale.

Can I filter hotels by stars, price or guest score?

Yes. `hotels-search` takes `stars[]`, `min_price`, `max_price`, `guest_score_min`, `free_cancellation` and `breakfast`. Filtering by stars or price keeps the first page at 1 credit; the other three filters cost 3 credits per page.

What format are responses in?

Every endpoint returns JSON, with no HTML parsing on your side.

Do I need a Trip.com account?

No. You call this Trip.com API with your Perceptlayer key in the `X-API-Key` header, with no Trip.com login.

Is this the official Trip.com API?

No. Perceptlayer is an independent service and is not affiliated with Trip.com. It returns Trip.com data as JSON with a Perceptlayer key, so there is no Trip.com developer account, app review or partner approval to get first. It only reads data: if Trip.com has an official API and you need to act on your own Trip.com account, such as posting, managing orders or reading private data, use that one.

Should I build a Trip.com scraper instead?

You can, but a Trip.com scraper is code you maintain: page changes break it, requests get blocked, and Trip.com's terms govern how you collect data. The Trip.com API gives you 20 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.

Try the Trip.com API with 100 free credits

No credit card. Failed calls are never billed.