Skip to content

Last updated

Changelog

trip.com API

HealthyRead-only

Structured data from trip.com. Generated from www.trip.com.

Base URL
https://api.maviapi.com/v1/sites/trip
3
Endpoints
13 min ago
Last verified
3110ms
p50 latency
GET/search_hotels5 credits per call

Search Hotels

Hotels on Trip.com for a destination or a map area and stay dates, 10 per site page. Each hotel has its id, English name, WGS-84 latitude/longitude (plus GCJ-02 ones for mainland China), property type, star class, review score and count, the total price of the whole stay with currency and whether taxes and fees are included, a free-cancellation flag when Trip.com shows one, photo URLs and a hotel page URL carrying the same dates, guests and rooms. Bookable hotels come first, then sold-out ones (available=false, no price). A destination search is in Trip.com's recommended order; a map-area search is nearest-first from the area's centre and carries distance_km.

Bearer auth. Pass your key as Authorization: Bearer <key> on every request.
stringOptionalin query

free text - a city, region, country, district, landmark, station or hotel name (e.g. "Tokyo", "Eiffel Tower"); ignored when a map area is given

stringOptionalin query

check-in date YYYY-MM-DD (default: 30 days from today)

stringOptionalin query

check-out date YYYY-MM-DD (default: 2 nights after checkin)

integerOptionalin query

number of adults in total

integerOptionalin query

number of children (ages taken from child_ages, missing ages count as 8)

stringOptionalin query

comma-separated child ages, e.g. "4,9"

integerOptionalin query

number of rooms

stringOptionalin query

ISO currency code for prices, e.g. USD, EUR, JPY

integerOptionalin query

page number, starting at 1 (in a bounding-box search a page can hold fewer than 10 hotels: those outside the box are left out)

stringOptionalin query

bounding box northern latitude, WGS-84 decimal degrees (give all four of north, south, east, west)

stringOptionalin query

bounding box southern latitude

stringOptionalin query

bounding box eastern longitude

stringOptionalin query

bounding box western longitude

stringOptionalin query

centre latitude, WGS-84 decimal degrees (with lng; used instead of a bounding box)

stringOptionalin query

centre longitude

stringOptionalin query

radius around lat/lng in km (default 2)

destinationobject5 fields
namestringe.g."Paris"
typestringe.g."CT"
trip_idstringe.g."192"
citystringe.g."Paris"
countrystringe.g."France"
checkinstringe.g."2026-12-28"
checkoutstringe.g."2026-12-30"
adultsintegere.g.2
childrenintegere.g.0
roomsintegere.g.1
currencystringe.g."USD"
pageintegere.g.1
page_sizeintegere.g.10
total_resultsintegere.g.6661
is_last_pagebooleane.g.false
hotelsobject[]25 fields
hotel_idstringe.g."2171570"
namestringe.g."Hotel des Grands Voyageurs"
latitudenumbere.g.48.84698
longitudenumbere.g.2.32594
coordinate_systemstringe.g."WGS-84"
latitude_gcj02null
longitude_gcj02null
property_typestringe.g."Hotel"
star_ratingintegere.g.4
review_scorenumbere.g.9.3
review_score_maxnumbere.g.10
review_countintegere.g.141
areastringe.g."Near Paris Montparnasse Station | Jardin du Luxembourg"
citystringe.g."Paris"
availablebooleane.g.true
availability_notenull
room_namestringe.g."Classic Room"
total_pricenumbere.g.610.77
prepay_onlinenumbere.g.573.81
currencystringe.g."USD"
taxes_and_fees_includedbooleane.g.true
price_notestringe.g."Total price: $611 1 room × 2 nights incl. taxes & fees"
free_cancellationnull
photosstring[]
urlstringe.g."https://us.trip.com/hotels/detail/?hotelId=2171570&checkIn=2026-12-28&checkOut=2026-12-30&adult=2&children=0&ages=&crn=1&curr=USD"
paginationobject3 fields
countintegere.g.10
has_morebooleane.g.true
next_cursorstringe.g."WzEsIjBjNmYwZjFlIixudWxsLDAseyJwYWdlIjoyfV0"
fetched_atstringe.g."2026-11-28T14:50:45.093Z"
ageintegere.g.0
Try itLive
GET
https://api.maviapi.com/v1/sites/trip/search_hotels?destination=Paris&adults=2&children=0&rooms=1&currency=USD&page=1
Request
curl "https://api.maviapi.com/v1/sites/trip/search_hotels?destination=Paris&adults=2&children=0&rooms=1&currency=USD&page=1" \
-H "Authorization: Bearer $MAVI_KEY"
Example1.6 KB
{
  "destination": {
    "name": "Paris",
    "type": "CT",
    "trip_id": "192",
    "city": "Paris",
    "country": "France"
  },
  "checkin": "2026-12-28",
  "checkout": "2026-12-30",
  "adults": 2,
  "children": 0,
  "rooms": 1,
  "currency": "USD",
  "page": 1,
  "page_size": 10,
  "total_results": 6661,
  "is_last_page": false,
  "hotels": [
    {
      "hotel_id": "2171570",
      "name": "Hotel des Grands Voyageurs",
      "latitude": 48.84698,
      "longitude": 2.32594,
      "coordinate_system": "WGS-84",
      "latitude_gcj02": null,
      "longitude_gcj02": null,
      "property_type": "Hotel",
      "star_rating": 4,
      "review_score": 9.3,
      "review_score_max": 10,
      "review_count": 141,
      "area": "Near Paris Montparnasse Station | Jardin du Luxembourg",
      "city": "Paris",
      "available": true,
      "availability_note": null,
      "room_name": "Classic Room",
      "total_price": 610.77,
      "prepay_online": 573.81,
      "currency": "USD",
      "taxes_and_fees_included": true,
      "price_note": "Total price: $611 1 room × 2 nights incl. taxes & fees",
      "free_cancellation": null,
      "photos": [
        "https://ak-d.tripcdn.com/images/0226e12000bkg26ckC720_R_600_600_R5_D.jpg"
      ],
      "url": "https://us.trip.com/hotels/detail/?hotelId=2171570&checkIn=2026-12-28&checkOut=2026-12-30&adult=2&children=0&ages=&crn=1&curr=USD"
    }
  ],
  "pagination": {
    "count": 10,
    "has_more": true,
    "next_cursor": "WzEsIjBjNmYwZjFlIixudWxsLDAseyJwYWdlIjoyfV0"
  },
  "fetched_at": "2026-11-28T14:50:45.093Z",
  "age": 0
}

Get all the data, no code

Collect every page of GET /search_hotels into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.

Use trip.com API from Claude, ChatGPT and your coding tools

Add this URL as a custom connector and sign in to maviapi. Nothing to install.

How to connect
https://mcp.maviapi.com/mcp

Or run it locally, with each endpoint of trip.com API as its own tool:

claude mcp add maviapi -e MAVIAPI_TOOLS=trip -- npx -y '@maviapi/mcp'

Import trip.com API into Postman and other tools

How to import

Paste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.

  • OpenAPI 3.1
    https://api.maviapi.com/v1/apis/trip/openapi.json
  • Postman
    https://api.maviapi.com/v1/apis/trip/postman.json

The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.

Build with the trip.com API

Choose a starting endpoint

  • Search Hotels GET /search_hotels

    Hotels on Trip.com for a destination or a map area and stay dates, 10 per site page. Each hotel has its id, English name, WGS-84 latitude/longitude (plus GCJ-02 ones for mainland China), property type, star class, review score and count, the total price of the whole stay with currency and whether taxes and fees are included, a free-cancellation flag when Trip.com shows one, photo URLs and a hotel page URL carrying the same dates, guests and rooms. Bookable hotels come first, then sold-out ones (available=false, no price). A destination search is in Trip.com's recommended order; a map-area search is nearest-first from the area's centre and carries distance_km.

    Parameters and response fields for GET /search_hotels
    Request parameters
    NameType / locationRequiredDescription
    destinationstring / queryNofree text - a city, region, country, district, landmark, station or hotel name (e.g. "Tokyo", "Eiffel Tower"); ignored when a map area is given
    checkinstring / queryNocheck-in date YYYY-MM-DD (default: 30 days from today)
    checkoutstring / queryNocheck-out date YYYY-MM-DD (default: 2 nights after checkin)
    adultsinteger / queryNonumber of adults in total
    childreninteger / queryNonumber of children (ages taken from child_ages, missing ages count as 8)
    child_agesstring / queryNocomma-separated child ages, e.g. "4,9"
    roomsinteger / queryNonumber of rooms
    currencystring / queryNoISO currency code for prices, e.g. USD, EUR, JPY
    pageinteger / queryNopage number, starting at 1 (in a bounding-box search a page can hold fewer than 10 hotels: those outside the box are left out)
    northstring / queryNobounding box northern latitude, WGS-84 decimal degrees (give all four of north, south, east, west)
    southstring / queryNobounding box southern latitude
    eaststring / queryNobounding box eastern longitude
    weststring / queryNobounding box western longitude
    latstring / queryNocentre latitude, WGS-84 decimal degrees (with lng; used instead of a bounding box)
    lngstring / queryNocentre longitude
    radius_kmstring / queryNoradius around lat/lng in km (default 2)
    Response fields
    FieldTypeDescription
    destinationobject
    destination.namestring
    destination.typestring
    destination.trip_idstring
    destination.citystring
    destination.countrystring
    checkinstring
    checkoutstring
    adultsinteger
    childreninteger
    roomsinteger
    currencystring
    pageinteger
    page_sizeinteger
    total_resultsinteger
    is_last_pageboolean
    hotelsobject[]
    hotels[].hotel_idstring
    hotels[].namestring
    hotels[].latitudenumber
    hotels[].longitudenumber
    hotels[].coordinate_systemstring
    hotels[].latitude_gcj02null
    hotels[].longitude_gcj02null
    hotels[].property_typestring
    hotels[].star_ratinginteger
    hotels[].review_scorenumber
    hotels[].review_score_maxnumber
    hotels[].review_countinteger
    hotels[].areastring
    hotels[].citystring
    hotels[].availableboolean
    hotels[].availability_notenull
    hotels[].room_namestring
    hotels[].total_pricenumber
    hotels[].prepay_onlinenumber
    hotels[].currencystring
    hotels[].taxes_and_fees_includedboolean
    hotels[].price_notestring
    hotels[].free_cancellationnull
    hotels[].photosstring[]
    hotels[].urlstring
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • Search Hotels V2 GET /search_hotels-v2

    Hotels on Trip.com for a destination, a map bounding box or a point and radius, for given stay dates, in pages of up to 100. Same fields as /search_hotels: id, English name, WGS-84 latitude/longitude (plus GCJ-02 for mainland China), property type, star class, review score and count, total price of the whole stay with currency and whether taxes and fees are included, photo URLs and a hotel page URL. In addition every bookable row has free_cancellation (true/false for the offer priced) and rooms_priced (how many rooms total_price covers - the asked number of rooms whenever the hotel sells an offer for that many rooms that fits the guests; otherwise the site's suggested room count, also stated in price_note). Sold-out rows have available=false and no price fields (total_price, price_note, free_cancellation and rooms_priced are null). Bookable hotels come first, then sold-out ones. A destination search is in Trip.com's recommended order. A bounding-box search returns only hotels inside the box, bookable first and each group nearest-first from the box centre, with total_results = the number of hotels inside the box (total_results_exact=false when the area is too dense to count fully: then rows and count cover the hotels nearest the box's centre). A point search is nearest-first within the radius. Map searches carry distance_km.

    Parameters and response fields for GET /search_hotels-v2
    Request parameters
    NameType / locationRequiredDescription
    destinationstring / queryNofree text - a city, region, country, district, landmark, station or hotel name (e.g. "Tokyo", "Eiffel Tower"); ignored when a map area is given
    checkinstring / queryNocheck-in date YYYY-MM-DD (default: 30 days from today)
    checkoutstring / queryNocheck-out date YYYY-MM-DD (default: 2 nights after checkin)
    adultsinteger / queryNonumber of adults in total
    childreninteger / queryNonumber of children (ages taken from child_ages, missing ages count as 8)
    child_agesstring / queryNocomma-separated child ages, e.g. "4,9"
    roomsinteger / queryNonumber of rooms
    currencystring / queryNoISO currency code for prices, e.g. USD, EUR, JPY
    pageinteger / queryNopage number, starting at 1
    page_sizeinteger / queryNohotels per page, 1 to 100 (default 10)
    northstring / queryNobounding box northern latitude, WGS-84 decimal degrees (give all four of north, south, east, west)
    southstring / queryNobounding box southern latitude
    eaststring / queryNobounding box eastern longitude
    weststring / queryNobounding box western longitude
    latstring / queryNocentre latitude, WGS-84 decimal degrees (with lng; used instead of a destination, ignored with a bounding box)
    lngstring / queryNocentre longitude
    radius_kmstring / queryNoradius around lat/lng in km (default 2)
    Response fields
    FieldTypeDescription
    destinationobject
    destination.namestring
    destination.typestring
    destination.trip_idstring
    destination.citystring
    destination.countrystring
    checkinstring
    checkoutstring
    adultsinteger
    childreninteger
    roomsinteger
    currencystring
    pageinteger
    page_sizeinteger
    total_resultsinteger
    total_results_exactboolean
    is_last_pageboolean
    hotelsobject[]
    hotels[].hotel_idstring
    hotels[].namestring
    hotels[].latitudenumber
    hotels[].longitudenumber
    hotels[].coordinate_systemstring
    hotels[].latitude_gcj02null
    hotels[].longitude_gcj02null
    hotels[].property_typestring
    hotels[].star_ratinginteger
    hotels[].review_scorenumber
    hotels[].review_score_maxnumber
    hotels[].review_countinteger
    hotels[].areastring
    hotels[].citystring
    hotels[].availableboolean
    hotels[].availability_notenull
    hotels[].room_namestring
    hotels[].total_pricenumber
    hotels[].prepay_onlinenumber
    hotels[].currencystring
    hotels[].taxes_and_fees_includedboolean
    hotels[].price_notestring
    hotels[].free_cancellationboolean
    hotels[].photosstring[]
    hotels[].urlstring
    hotels[].rooms_pricedinteger
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • Hotel Details GET /hotel_details

    One Trip.com hotel: name, description, address, WGS-84 coordinates (plus GCJ-02 for mainland China), star class, every photo in the hotel's album, amenities by category, review score and count, check-in and check-out times, other policies, and the lowest total price for the whole stay (null with available=false when nothing can be booked for those dates).

    Parameters and response fields for GET /hotel_details
    Request parameters
    NameType / locationRequiredDescription
    hotel_idstring / queryNoTrip.com hotel id, as returned by the search endpoints
    checkinstring / queryNocheck-in date YYYY-MM-DD (default: 30 days from today)
    checkoutstring / queryNocheck-out date YYYY-MM-DD (default: 2 nights after checkin)
    adultsinteger / queryNonumber of adults in total
    childreninteger / queryNonumber of children (ages taken from child_ages, missing ages count as 8)
    child_agesstring / queryNocomma-separated child ages, e.g. "4,9"
    roomsinteger / queryNonumber of rooms
    currencystring / queryNoISO currency code for prices, e.g. USD, EUR, JPY
    Response fields
    FieldTypeDescription
    hotel_idstring
    namestring
    local_namestring
    star_ratinginteger
    star_rating_typestring
    descriptionstring
    addressstring
    areastring
    citystring
    provincestring
    countrystring
    latitudenumber
    longitudenumber
    coordinate_systemstring
    latitude_gcj02null
    longitude_gcj02null
    openedstring
    renovatedstring
    review_scorenumber
    review_score_maxnumber
    review_countinteger
    review_subscoresobject
    review_subscores.Cleanlinessnumber
    review_subscores.Amenitiesnumber
    review_subscores.Locationnumber
    review_subscores.Servicenumber
    check_in_timestring
    check_out_timestring
    front_desk_hoursstring
    policiesobject[]
    policies[].titlestring
    policies[].textstring[]
    amenitiesobject[]
    amenities[].categorystring
    amenities[].descriptionnull
    amenities[].itemsobject[]
    amenities[].items[].namestring
    amenities[].items[].notestring
    photosobject[]
    photos[].urlstring
    photos[].categorystring
    photos[].titlestring
    photos[].sourcestring
    checkinstring
    checkoutstring
    adultsinteger
    childreninteger
    roomsinteger
    availableboolean
    lowest_priceobject
    lowest_price.total_pricenumber
    lowest_price.currencystring
    lowest_price.taxes_and_fees_includedboolean
    lowest_price.pay_nownumber
    lowest_price.room_namestring
    lowest_price.mealstring
    lowest_price.cancellationstring
    lowest_price.free_cancellationboolean
    lowest_price.price_notestring
    urlstring
    fetched_atstring
    ageinteger

Export trip.com data to CSV

Each list below downloads as a CSV file with one row per record. Collect it into a dataset with "Get all the data, no code" under the console above. The dataset reads the list page by page, and you download it as CSV, JSON or JSONL.

ListCSV columns
Search HotelsGET /search_hotelshotel_id, name, latitude, longitude, coordinate_system, latitude_gcj02, longitude_gcj02, property_type, star_rating, review_score, review_score_max, review_count, area, city, available, availability_note, room_name, total_price, prepay_online, currency, taxes_and_fees_included, price_note, free_cancellation, photos, url
Search Hotels V2GET /search_hotels-v2hotel_id, name, latitude, longitude, coordinate_system, latitude_gcj02, longitude_gcj02, property_type, star_rating, review_score, review_score_max, review_count, area, city, available, availability_note, room_name, total_price, prepay_online, currency, taxes_and_fees_included, price_note, free_cancellation, photos, url, rooms_priced

A nested value (a list or an object) is written as JSON in one cell. How datasets and exports work

trip.com API questions

What you get, what it costs and how to call it.

Is there an official trip.com API?

This trip.com API is not official. It is an independent, hosted API from maviapi for the public data on trip.com, and it is not made, endorsed or supported by trip.com. Whether trip.com offers a developer API of its own is a question for trip.com. This one is ready to call with a maviapi key, and every endpoint and field it returns is documented on this page.

What data can I get from the trip.com API?

The trip.com API has 3 endpoints. Each returns JSON with the parameters and fields documented above:

  • GET /search_hotels: Hotels on Trip.com for a destination or a map area and stay dates, 10 per site page.
  • GET /search_hotels-v2: Hotels on Trip.com for a destination, a map bounding box or a point and radius, for given stay dates, in pages of up to 100.
  • GET /hotel_details: One Trip.com hotel: name, description, address, WGS-84 coordinates (plus GCJ-02 for mainland China), star class, every photo in the hotel's album, amenities…

How much does the trip.com API cost?

Calls are paid in credits from your maviapi plan, and only successful calls are charged. Every endpoint of this API costs 5 credits per call. On the Hobby plan ($49 a month for 250,000 credits), 1,000 calls cost about $0.98. Failed calls are free. The Free plan gives you 1,000 credits a month, with no credit card required. See plans and credit prices for everything after that.

How do I call the trip.com API?

Send an HTTPS request to the endpoint with your API key in the Authorization header. For example, GET /search_hotels:

cURL
curl 'https://api.maviapi.com/v1/sites/trip/search_hotels' \
  -H "Authorization: Bearer $MAVI_KEY"

Create a key on your API keys page, or try any endpoint first in the console above with the free test key.

What are the ways to get trip.com data as JSON?

Each way to get trip.com data as JSON fits a different need:

  • Your own scraper: Full control and no vendor, but the parsing, the blocked requests and the repairs after every change on trip.com are yours. Better for a one-off pull from a page that rarely changes.
  • Apify: A marketplace of Actors you run, where input, output and price are set by each Actor. Better when an Actor already returns what you need, or you want to host your own code. See maviapi vs Apify.
  • RapidAPI: A hub of APIs added by many providers, called with one RapidAPI key and priced per API. Better when you already use the hub and one of its APIs covers what you need. Source: RapidAPI docs.
  • maviapi: The trip.com API on this page: 3 documented endpoints, a published response schema and one key for the whole catalog. Better when this data is part of your product and you do not want to maintain a scraper.

What happens when trip.com changes its layout?

Your code does not change. maviapi keeps the trip.com API working when trip.com changes its pages, so you keep calling the same endpoints and get JSON in the shape documented here. See its current health on the status page and what changed in its changelog.

Will an update break my trip.com API integration?

No. An endpoint you use never changes shape: new fields, optional parameters and endpoints are added beside it, and a change that would break a call ships as a new endpoint. Ignore response fields you do not know, and follow the changelog for what is new.

  • Tripadvisor API

    Trip-planning data from Tripadvisor: geo search plus attractions, restaurants and hotels by location (geo_id), with…

  • Songkick Concerts API

    Upcoming concerts and music festivals in any city from Songkick, for a date window, with venues, performers, prices…

  • Google Maps API

    Structured data from maps.google.com.