Request

The hotel pricing endpoint accepts user search data and context metadata about the search and in response returns information for the requested hotels. Hotel Pricing can be requested in two different ways:

  • Hotel IDs - Tripadvisor location ids or partner hotel codes
  • Location Name/ID - Tripadvisor geo ids

The API can be accessed using a GET request with the query parameters mentioned below.

 

Search By Hotel IDs

Search for hotel pricing information using Hotel IDs associated with the property, noting that there are a number of different classes of IDs supported by the API.

 

GET: https://api.tripadvisor.com/api/partner/3.0/synmeta-pricing?{query-params}

 

Field

 Required  Type  Description
 hotel_ids  yes  string

Unique IDs of the hotel (s) for which you are requesting pricing. Used in conjuction with hotel_id_type

Max length - 50

Example - &hotel_ids=12345,67890

 hotel_id_type  no  string

The hotel ID type for corresponding hotel_id. If not provided, defaults to Tripadvisor hotel ID. Supported values include:

  • TA // Tripadvisor
  • EAN // Hotels.com
  • PCLN // Priceline
  • BCOM // Booking.com
  • EXPE // Expedia

Example - &hotel_id_type=EAN

 

Or Search By Location

Search for hotel pricing information using a Tripadvisor location ID.

 

GET - https://api.tripadvisor.com/api/partner/3.0/synmeta-pricing?{query-params}

 

Field

Required

Type

Description

location_id

yes

string

The Tripadvisor location ID of the location for which you are requesting hotels.

limit

no

integer

The maximum number of hotels to return for the given location. For popular destinations the maximum is often returned, for less popular destinations you may get less hotels.

Default value: 30
Max value: 50

 

 

Additional Parameters

Basic Parameters

Field

Required?

Type

Description

key

yes

string

Access key to the API. This value is provided by your Tripadvisor Account Manager.

 

Context Data Parameters

Field

Required?

Type

Description

check_in

yes

date

The check-in date in the YYYY-MM-DD format.

check_out

yes

date

The check-out date in the YYYY-MM-DD format. Note: Tripadvisor limits the maximum number of nights to 30.

num_adults

no

integer

The total number of adults that will stay at the accommodation. Supported values are between 1 to 4. The default value is '1'.

num_rooms

no

integer

The number of rooms to be booked. Supported values are between 1 to 8.

currency

no

string

The currency code to be used to display prices. It should follow ISO 4217 format. The default value is 'USD'.

locale

no

string

The Preferred locale for the current request following the RFC 3066 format.


This should be composed of a ISO 639-1 2-char language code and optional ISO 3166 2-char country code separated by '_' or '-' (e.g. 'en', 'en_US', 'fr-FR').


The locale dictates the language of the response.

 

Request Tracking Parameters

Field

Required?

Type

Description

custom_tracking_var1

no

string

Custom payload which can be used to track performance.
Max length: 100 characters.

Recommend creating and sending a GUID

 

User Tracking Parameters

Field

Required?

Type

Description

user_agent

yes

string

When making this request server side, make sure to pass the browser user-agent.


When making this request client side, set this value to "infer" and the service will automatically resolve the user-agent.

ip_address

yes

string

When making this request server side, make sure to pass the user's ip-address.


When making this request client side, set this value to "infer" and the service will automatically resolve the ip-address.