Last updated
Changelogtrip.com API
HealthyRead-onlyStructured data from trip.com. Generated from www.trip.com.
/search_hotels5 credits per callSearch 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.
Authorization: Bearer <key> on every request.Parameters
free text - a city, region, country, district, landmark, station or hotel name (e.g. "Tokyo", "Eiffel Tower"); ignored when a map area is given
check-in date YYYY-MM-DD (default: 30 days from today)
check-out date YYYY-MM-DD (default: 2 nights after checkin)
number of adults in total
number of children (ages taken from child_ages, missing ages count as 8)
comma-separated child ages, e.g. "4,9"
number of rooms
ISO currency code for prices, e.g. USD, EUR, JPY
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)
bounding box northern latitude, WGS-84 decimal degrees (give all four of north, south, east, west)
bounding box southern latitude
bounding box eastern longitude
bounding box western longitude
centre latitude, WGS-84 decimal degrees (with lng; used instead of a bounding box)
centre longitude
radius around lat/lng in km (default 2)
Response fields
destination
namee.g."Paris"typee.g."CT"trip_ide.g."192"citye.g."Paris"countrye.g."France"checkine.g."2026-12-28"checkoute.g."2026-12-30"adultse.g.2childrene.g.0roomse.g.1currencye.g."USD"pagee.g.1page_sizee.g.10total_resultse.g.6661is_last_pagee.g.falsehotels
hotel_ide.g."2171570"namee.g."Hotel des Grands Voyageurs"latitudee.g.48.84698longitudee.g.2.32594coordinate_systeme.g."WGS-84"latitude_gcj02longitude_gcj02property_typee.g."Hotel"star_ratinge.g.4review_scoree.g.9.3review_score_maxe.g.10review_counte.g.141areae.g."Near Paris Montparnasse Station | Jardin du Luxembourg"citye.g."Paris"availablee.g.trueavailability_noteroom_namee.g."Classic Room"total_pricee.g.610.77prepay_onlinee.g.573.81currencye.g."USD"taxes_and_fees_includede.g.trueprice_notee.g."Total price: $611 1 room × 2 nights incl. taxes & fees"free_cancellationphotosurle.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"pagination
counte.g.10has_moree.g.truenext_cursore.g."WzEsIjBjNmYwZjFlIixudWxsLDAseyJwYWdlIjoyfV0"fetched_ate.g."2026-11-28T14:50:45.093Z"agee.g.0curl "https://api.maviapi.com/v1/sites/trip/search_hotels?destination=Paris&adults=2&children=0&rooms=1¤cy=USD&page=1" \-H "Authorization: Bearer $MAVI_KEY"
{
"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.
https://mcp.maviapi.com/mcpOr 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 importPaste 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_hotelsHotels 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 Name Type / location Required Description destination string / query No free text - a city, region, country, district, landmark, station or hotel name (e.g. "Tokyo", "Eiffel Tower"); ignored when a map area is given checkin string / query No check-in date YYYY-MM-DD (default: 30 days from today) checkout string / query No check-out date YYYY-MM-DD (default: 2 nights after checkin) adults integer / query No number of adults in total children integer / query No number of children (ages taken from child_ages, missing ages count as 8) child_ages string / query No comma-separated child ages, e.g. "4,9" rooms integer / query No number of rooms currency string / query No ISO currency code for prices, e.g. USD, EUR, JPY page integer / query No 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) north string / query No bounding box northern latitude, WGS-84 decimal degrees (give all four of north, south, east, west) south string / query No bounding box southern latitude east string / query No bounding box eastern longitude west string / query No bounding box western longitude lat string / query No centre latitude, WGS-84 decimal degrees (with lng; used instead of a bounding box) lng string / query No centre longitude radius_km string / query No radius around lat/lng in km (default 2) Response fields Field Type Description destination object destination.name string destination.type string destination.trip_id string destination.city string destination.country string checkin string checkout string adults integer children integer rooms integer currency string page integer page_size integer total_results integer is_last_page boolean hotels object[] hotels[].hotel_id string hotels[].name string hotels[].latitude number hotels[].longitude number hotels[].coordinate_system string hotels[].latitude_gcj02 null hotels[].longitude_gcj02 null hotels[].property_type string hotels[].star_rating integer hotels[].review_score number hotels[].review_score_max number hotels[].review_count integer hotels[].area string hotels[].city string hotels[].available boolean hotels[].availability_note null hotels[].room_name string hotels[].total_price number hotels[].prepay_online number hotels[].currency string hotels[].taxes_and_fees_included boolean hotels[].price_note string hotels[].free_cancellation null hotels[].photos string[] hotels[].url string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - Search Hotels V2
GET /search_hotels-v2Hotels 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 Name Type / location Required Description destination string / query No free text - a city, region, country, district, landmark, station or hotel name (e.g. "Tokyo", "Eiffel Tower"); ignored when a map area is given checkin string / query No check-in date YYYY-MM-DD (default: 30 days from today) checkout string / query No check-out date YYYY-MM-DD (default: 2 nights after checkin) adults integer / query No number of adults in total children integer / query No number of children (ages taken from child_ages, missing ages count as 8) child_ages string / query No comma-separated child ages, e.g. "4,9" rooms integer / query No number of rooms currency string / query No ISO currency code for prices, e.g. USD, EUR, JPY page integer / query No page number, starting at 1 page_size integer / query No hotels per page, 1 to 100 (default 10) north string / query No bounding box northern latitude, WGS-84 decimal degrees (give all four of north, south, east, west) south string / query No bounding box southern latitude east string / query No bounding box eastern longitude west string / query No bounding box western longitude lat string / query No centre latitude, WGS-84 decimal degrees (with lng; used instead of a destination, ignored with a bounding box) lng string / query No centre longitude radius_km string / query No radius around lat/lng in km (default 2) Response fields Field Type Description destination object destination.name string destination.type string destination.trip_id string destination.city string destination.country string checkin string checkout string adults integer children integer rooms integer currency string page integer page_size integer total_results integer total_results_exact boolean is_last_page boolean hotels object[] hotels[].hotel_id string hotels[].name string hotels[].latitude number hotels[].longitude number hotels[].coordinate_system string hotels[].latitude_gcj02 null hotels[].longitude_gcj02 null hotels[].property_type string hotels[].star_rating integer hotels[].review_score number hotels[].review_score_max number hotels[].review_count integer hotels[].area string hotels[].city string hotels[].available boolean hotels[].availability_note null hotels[].room_name string hotels[].total_price number hotels[].prepay_online number hotels[].currency string hotels[].taxes_and_fees_included boolean hotels[].price_note string hotels[].free_cancellation boolean hotels[].photos string[] hotels[].url string hotels[].rooms_priced integer pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - Hotel Details
GET /hotel_detailsOne 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 Name Type / location Required Description hotel_id string / query No Trip.com hotel id, as returned by the search endpoints checkin string / query No check-in date YYYY-MM-DD (default: 30 days from today) checkout string / query No check-out date YYYY-MM-DD (default: 2 nights after checkin) adults integer / query No number of adults in total children integer / query No number of children (ages taken from child_ages, missing ages count as 8) child_ages string / query No comma-separated child ages, e.g. "4,9" rooms integer / query No number of rooms currency string / query No ISO currency code for prices, e.g. USD, EUR, JPY Response fields Field Type Description hotel_id string name string local_name string star_rating integer star_rating_type string description string address string area string city string province string country string latitude number longitude number coordinate_system string latitude_gcj02 null longitude_gcj02 null opened string renovated string review_score number review_score_max number review_count integer review_subscores object review_subscores.Cleanliness number review_subscores.Amenities number review_subscores.Location number review_subscores.Service number check_in_time string check_out_time string front_desk_hours string policies object[] policies[].title string policies[].text string[] amenities object[] amenities[].category string amenities[].description null amenities[].items object[] amenities[].items[].name string amenities[].items[].note string photos object[] photos[].url string photos[].category string photos[].title string photos[].source string checkin string checkout string adults integer children integer rooms integer available boolean lowest_price object lowest_price.total_price number lowest_price.currency string lowest_price.taxes_and_fees_included boolean lowest_price.pay_now number lowest_price.room_name string lowest_price.meal string lowest_price.cancellation string lowest_price.free_cancellation boolean lowest_price.price_note string url string fetched_at string age integer
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.
| List | CSV columns |
|---|---|
Search HotelsGET /search_hotels | hotel_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-v2 | hotel_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 '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.
Related APIs
- 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.