← Back to all apps

Overview

Tools Available3
CategoryTravel

Book top-rated hotels

Available Tools

Tripadvisor provides 3 tools that can be used to interact with its services.

Compare Hotels

compare_hotels
Full Description

Compares hotels either by explicitly specified hotels or by automatically selecting hotels within a given geographic area. This tool supports two mutually exclusive comparison modes: Explicit hotel comparison – compare a specific list of hotels provided via the locations parameter. Area-based comparison – compare a representative set of hotels automatically selected from a specified hotelArea. You must choose exactly one mode when calling this tool. Useful for comparing the ratings of various hotels' subratings like location, cleanliness, service, value, etc. The response includes key comparison fields like name, rating, price, amenities, etc.

IMPORTANT USAGE RULES: 1. If the user requests to "compare hotels" in a city, area, neighborhood, or near/around a landmark/attraction, and does NOT name specific hotels, you MUST call this tool using the hotelArea parameter. 2. You do NOT need to wait for the user to name specific hotels. When they ask to compare hotels in a location (e.g., "compare hotels in Boston", "compare hotels in Paris", "compare hotels near Times Square"), you should immediately call this tool with the hotelArea parameter set to that location. 3. The tool will automatically select a representative set of hotels from the specified area for comparison. 4. Only use the locations parameter when the user explicitly names 2 or more specific hotels to compare.

Examples of when to use hotelArea:

  • "Compare hotels in Boston"
  • "Compare hotels in Paris for Saturday"
  • "Compare hotels near Tower Bridge, London"
  • "Compare hotels near the Eiffel Tower, Paris"
  • "Compare hotels around Times Square"
  • "Compare hotels in Back Bay, Boston"

Examples of when to use locations (specific hotels named):

  • "Compare Hotel Continental and Grand Hotel in Paris"
  • "Compare these hotels: Marriott Boston, Hilton Boston, and Hyatt Boston"

Parameters

Required
hotelAreastring

Geographic area for automatic hotel comparison. Use this parameter when the user asks to compare hotels near or around a landmark, neighborhood, or geographic area without naming specific hotels. When provided, the tool will resolve the specified area before automatically selecting a representative set of hotels within that area and compare those hotels side-by-side You should provide the most specific location possible (e.g., "Tower Bridge, London" instead of "Tower Bridge"). When using hotelArea, you must NOT specify locations. Hotels will be selected automatically by the tool.

locationIdsarray

Optional Tripadvisor internal hotel IDs. Not expected from LLMs; used by widget when available.

locationsarray

Explicit list of hotels to compare. Each entry should be as specific as possible; it should be a specific hotel name or resolvable hotel location e.g., 'Hotel Continental, Paris, France' rather than just 'Hotel Continental', as many hotels have identical names. The tool will resolve each entry to a hotel ID and the hotels will be compared side-by-side. Use this parameter only when comparing a known list of hotels. At least two hotels must be provided. You must NOT set this parameter if hotelArea is provided.

mcpServerVersionobject

Information about the version of the MCP server you are expecting to use. You must set mcpServerVersion.version to the only available value.

requestContextobject

Metadata about the request, not generally intended to be consumed directly by user, e.g.user-id, session-id etc.Much of this is expected to be echoed back and forth, so if you don't provide some values, we may generate them for you, and you are expected to use them in future requests to ALL endpoints on this API.See each field for more details.

Optional
checkInstring

The date, in YYYY-MM-DD format, to check into the hotels for detailed pricing information, if provided the date must not be in the past and cannot be more than 1 year (365 days) in the future. Defaults to 2 weeks in the future.

checkOutstring

The date, in YYYY-MM-DD format, to check out of the hotels for detailed pricing information. This must be after checkIn and uses the same format, with a default of 2 days after checkIn and a maximum of 30 days apart.

childrenAgesarray

The ages of any children staying, if comparing hotels that include children you should prompt for their ages if you are not provided them.

guestsinteger

The number of adult guests staying at the hotels. You should not include children in this field, if comparing hotels that include children you should prompt for their ages and use the childrenAges parameter. This defaults to 2 adult guests.

pricingModestring

Pricing mode that determines how long to wait for pricing information. NONE - returns immediately without pricing, QUICK - waits a relatively short time for basic pricing, Defaults to QUICK.

Options:NONEQUICK
roomsinteger

The number of rooms required for the hotel stays. This defaults to 1 room.

toolRequestMetadataobject

A copy of the fields normally set in the `_meta` section of the request. If you are calling from an LLM, this can be left out.

Get Hotel Details

hotel_details
Full Description

Retrieves comprehensive information for a specific hotel, including optional amenities, photos, live pricing, and guest reviews, based on user locale and stay dates.

Use this tool whenever a user asks about a specific hotel by name, including:

  • Informational queries: "Tell me about X Hotel", "What are the amenities at X Hotel"
  • Qualitative questions: "How is X Hotel?", "Is X Hotel good?", "What do people think about X Hotel?"
  • Evaluative questions: "Is X Hotel a good option?", "Is X Hotel worth staying at?", "Would you recommend X Hotel?"
  • Suitability questions: "Is X Hotel good for families?", "Is X Hotel good for couples?", "Is X Hotel good for business travel?"
  • Any question where the user references a specific hotel and seeks information, opinions, or recommendations about it.

If you do not get pricing details in the first response, you can recall the api with the same parameters (including the echoed back values of userId, sessionId and pageViewId) and it will return any additional pricing details that have become available since the first call. If you want to wait for pricing details to be available, you can set the 'pricingMode' parameter to QUICK, and the api will poll until either pricing details are available, or the timeout for that mode is reached.

Parameters

Required
mcpServerVersionobject

Information about the version of the MCP server you are expecting to use. You must set mcpServerVersion.version to the only available value.

requestContextobject

Metadata about the request, not generally intended to be consumed directly by user, e.g.user-id, session-id etc.Much of this is expected to be echoed back and forth, so if you don't provide some values, we may generate them for you, and you are expected to use them in future requests to ALL endpoints on this API.See each field for more details.

Optional
checkInstring

The date, in YYYY-MM-DD format, to check into the hotel for detailed pricing information, if provided the date must not be in the past and cannot be more than 1 year (365 days) in the future. Defaults to 2 weeks in the future.

checkOutstring

The date, in YYYY-MM-DD format, to check out of the hotel for detailed pricing information. This must be after checkIn and uses the same format, with a default of 2 days after checkIn and a maximum of 30 days apart.

childrenAgesarray

The ages of any children staying, if searching for rooms that includes children you should prompt for their ages if you are not provided them.

guestsinteger

The number of adult guests staying at the hotel. You should not include children in this field, if searching for a hotel that includes children you should prompt for their ages and use the childrenAges parameter. This defaults to 2 adult guests.

hotelIdinteger

The unique Tripadvisor Hotel ID for the hotel. You must use this hotelId if you have it, if you do not have it, you may use the 'hotelName' field to search for the hotel.

hotelNamestring

The name of the hotel. You should only set this if you do not know the TripAdvisor 'hotelId' for the property you're interested in. If, for example, you did a search, and received the hotelId in the response, you must use that as the 'hotelId' parameter instead of setting this; it is the most accurate way to identify the hotel. If you do use this, you must be as specific as possible, as many hotels have identical names, e.g. 'Hotel Continental', could mean 'Hotel Continental, In Ho Chi Minh City (Vietnam)', or 'Hotel Continental, Oslo, Norway' of 'Hotel Continental, Venice, Italy' etc. If this is NOT set, you MUST supply a hotelId.

includeAmenitiesboolean

When true returns a detailed list of property amenities (e.g. pool, Wi-Fi, gym) this adds significant details about the hotel and its rooms. Useful for feature comparison or display. Defaults to false.

includePhotosboolean

When true include image data, such as URLs, captions and resolutions. Note: enabling this increases response size. Defaults to false.

includePricingboolean

When true include pricing information for specific stay dates, this may slightly increase latency due to live data fetching. Defaults to false.

includeReviewsboolean

When true include recent reviews and ratings in details, will default to including 10 full reviews from previous guests. Defaults to false.

pricingModestring

Pricing mode that determines how long to wait for pricing information. NONE - returns immediately without pricing, QUICK - waits a relatively short time for basic pricing, Defaults to QUICK.

Options:NONEQUICK
requestNumberinteger

Request number id will be used if pricing mode is NONE

roomsinteger

The number of rooms required for the hotel stay. This defaults to 1 room.

toolRequestMetadataobject

A copy of the fields normally set in the `_meta` section of the request. If you are calling from an LLM, this can be left out.

trackingComponentstring

Hotel Detail tracking component.

Search for Hotels

search_hotels
Full Description

Search for hotels matching the given criteria, using either a named location or a TripAdvisor GeoID. If the user has not provided a location, you should ask them for a location. If the user is asking for hotels with a proximity term, like near/within/close to etc, you should only pass the location specified after the proximity term to the API. For example "near the Louvre Museum, Paris" should be passed as "Louvre Museum, Paris" to the API. Likewise if "within 1 mile of London Eye", location should be passed as "London Eye" to the API. Results are displayed directly in an interactive map widget within ChatGPT, which already visualizes all hotels returned by this tool. If 0 hotels are returned - reflect it in your response to the user. Do not ask the user whether they want to see hotels on a map — they are always shown on the map automatically. The map widget already includes hotel details, so do not list or reprint the same hotels as text below the widget. You can ask the user if they want to filter the results, but do not use star rating. Instead you should use the term bubble rating. If you do not get pricing details in the first response, you can recall the api with the same parameters (including the echoed back values of userId, sessionId and pageViewId) and it will return any additional pricing details that have become available since the first call. If you want to wait for pricing details to be available, you can set the 'pricingMode' parameter to QUICK, and the api will poll until either pricing details are available, or the timeout for that mode is reached. The sortBy parameter should be BEST_VALUE by default. It can be set to PRICE_LOW_TO_HIGH if the user is specifically asking for the cheapest hotels. Likewise it can be set to DISTANCE if the user is asking for the hotels closest to a specific location or it can be set to POPULARITY if the user is asking for the most popular hotels. Response requirement: After showing results, the assistant MUST end its message with: "Do you want to compare any of these hotels? If yes, tell me at least 2 hotel names." The assistant MUST NOT end the message without this question

Parameters

Required
locationstring

The name of the location, for example 'Paris, France' or 'near the Louvre Museum, Paris' to find a hotel for

mcpServerVersionobject

Information about the version of the MCP server you are expecting to use. You must set mcpServerVersion.version to the only available value.

requestContextobject

Metadata about the request, not generally intended to be consumed directly by user, e.g.user-id, session-id etc.Much of this is expected to be echoed back and forth, so if you don't provide some values, we may generate them for you, and you are expected to use them in future requests to ALL endpoints on this API.See each field for more details.

Optional
checkInstring

The date, in YYYY-MM-DD format, to check into the hotel for detailed pricing information, if provided the date must not be in the past and cannot be more than 1 year (365 days) in the future. Defaults to 2 weeks in the future.

checkOutstring

The date, in YYYY-MM-DD format, to check out of the hotel for detailed pricing information. This must be after checkIn and uses the same format, with a default of 2 days after checkIn and a maximum of 30 days apart.

childrenAgesarray

The ages of any children staying, if searching for rooms that includes children you should prompt for their ages if you are not provided them.

filtersobject

Filters to apply to the search.

guestsinteger

The number of adult guests staying at the hotel. You should not include children in this field, if searching for a hotel that includes children you should prompt for their ages and use the childrenAges parameter. This defaults to 2 adult guests.

isCompareboolean

After the user has a result from this tool, you MUST ask a follow up question to see if they want to compare any of the hotels returned. If they do you MUST make the same request again but set the isCompare flag to TRUE. If the user does not want to compare you do not need to make a second request.

limitinteger

The maximum number of properties to return for the search. Defaults to 20.

pricingModestring

Pricing mode that determines how long to wait for pricing information. NONE - returns immediately without pricing, QUICK - waits a relatively short time for basic pricing, Defaults to QUICK.

Options:NONEQUICK
roomsinteger

The number of rooms required for the hotel stay. This defaults to 1 room.

sortBystring

How to sort the results, must be one of BEST_VALUE, DISTANCE, FEATURE, PRICE_LOW_TO_HIGH or POPULARITY. Defaults to POPULARITY.

Options:BEST_VALUEDISTANCEFEATUREDPRICE_LOW_TO_HIGHPOPULARITY