Using the Travel Partner 1.x APIs

The Travel Partner Application Programming Interface (API) is a service that lets you programmatically access pricing, hotel, and diagnostic reporting data about your Hotel Ads data. The service makes it easier to track properties and, if you participate in bidding, to assess the performance of your account.

API Summary

The Travel Partner API endpoints accept HTTP GET requests. The base URL for all requests is:

  • Version 1.2:
    https://www.googleapis.com/travelpartner/v1.2/

The following table summarizes the API endpoints for the Travel Partner API:

Name Endpoint Available to Description
Bids API /bids Hotel Ads only Lists your submitted bids. The result includes information about each bid and that bid's multipliers.

Reports API /reports Hotel Ads only Lists available reports or gets a report for the specified date.
Scorecard API /scorecard Hotel Ads Only Gets Scorecard data for the specified partner.
Hotels API /hotels Hotel Ads & Hotel Prices Lists properties that are in your Hotel List Feed, including those that are over-clustered or have other data quality issues.
Prices API /prices Hotel Ads & Hotel Prices Returns itineraries and their associated prices for your properties.
Feed Status API /feedStatus Hotel Ads & Hotel Prices Gets a report of your feeds, including errors and warnings that Google encountered when processing those feeds.

Deprecation

Google supports at least the two most recent API versions at any given time. When a new version is released, the version that is now two releases back will be deprecated and scheduled for sunsetting.

  • Deprecated indicates that the version of the API will continue to function as expected, but may not be updated with new features or bug fixes. In addition, when a version is deprecated, a sunset date is determined.
  • Sunsetted indicates that the version of the API is removed and is no longer available. The minimum amount of time between deprecation and sunsetting is 3 months.

Partners should consider this fair warning that they should update their code to use a more recent version. Partners will be given a date by which the newly-deprecated API will no longer be supported.

The following table shows the current schedule of API versions, as well as expected deprecation and sunset dates:

Version Deprecation Date Sunset Date
v1.2 N/A N/A
v1.1 June 2016 October 2016
v1.0 April 2015 October 2015

Formatting the Results

The results of Travel Partner API calls are returned as either JSON or CSV. JSON is the default. To get a response as a CSV, add the alt query string parameter to the URL and set its value to "csv", as the following example shows:

https://www.googleapis.com/travelpartner/v1.2/hotels?partner=42&alt=csv&type=all

You can explicitly get results as JSON by setting alt to "json" in the request URL.

Using Offsets

Some endpoints in the Travel Partner API let you page through the results using the nextrow query string parameter, as the following example shows:

https://www.googleapis.com/travelpartner/v1.2/hotels?partner=partner42&nextrow=131073

The nextrow parameter specifies an offset value which is a unique token that you pass to the API on your second and subsequent requests. When you include nextrow in your query, the Travel Partner API applies it to the request and gives you the next set of results, starting with the value of nextrow.

The value of nextrow is not an integer that simply defines an index offset. Instead, it is a unique identifier that the Travel Partner API uses to determine which set of result to use. As a result, your first request should never set the value of this parameter. APIs that support the nextrow parameter include NEXTROW:value as the first line in each response; for example:

NEXTROW: 131073

To offset your next request, you extract the value of NEXTROW from the response body and set it as the value of the nextrow query string parameter in your next request.

Authentication

To access the Travel Partner API, clients must authenticate using OAuth2 authentication.

For an example application and additional information about using OAuth to connect to the Travel Partner API, see API Authentication.

Specifying a Partner

Most endpoints let you specify a "technical" partner name for which to get results. The technical name is a string, but it is not the same as the partner name in the Hotel Ads Center or the partner ID (which is a number).

To specify the partner name in a request, use the partner query string parameter, as the following example shows:

https://www.googleapis.com/travelpartner/v1.2/hotels?partner=reiner42

If you do not know the technical name, contact us to request it.