Compare Hotels
compare_hotelsFull 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
hotelAreastringGeographic 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.
locationIdsarrayOptional Tripadvisor internal hotel IDs. Not expected from LLMs; used by widget when available.
locationsarrayExplicit 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.
mcpServerVersionobjectInformation about the version of the MCP server you are expecting to use. You must set mcpServerVersion.version to the only available value.
requestContextobjectMetadata 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.
checkInstringThe 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.
checkOutstringThe 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.
childrenAgesarrayThe ages of any children staying, if comparing hotels that include children you should prompt for their ages if you are not provided them.
guestsintegerThe 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.
pricingModestringPricing 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.
NONEQUICKroomsintegerThe number of rooms required for the hotel stays. This defaults to 1 room.
toolRequestMetadataobjectA 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.