# Method: accounts.freeBookingLinksReportViews.query

- [HTTP request](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.freeBookingLinksReportViews/query#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.freeBookingLinksReportViews/query#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.freeBookingLinksReportViews/query#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.freeBookingLinksReportViews/query#body.request_body)
- [Response body](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.freeBookingLinksReportViews/query#body.response_body)
  - [JSON representation](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.freeBookingLinksReportViews/query#body.QueryFreeBookingLinksReportResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.freeBookingLinksReportViews/query#body.aspect)
- [FreeBookingLinksResult](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.freeBookingLinksReportViews/query#FreeBookingLinksResult)
  - [JSON representation](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.freeBookingLinksReportViews/query#FreeBookingLinksResult.SCHEMA_REPRESENTATION)

> [!WARNING]
> This item is deprecated!

**DEPRECATED:** Use `https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.propertyPerformanceReportViews/query#google.travel.travelpartner.v3.PropertyPerformanceReportService.QueryPropertyPerformanceReport`, which also has impression reporting, instead. Provides the ability to query (get, filter, and segment) a free booking links report for a specific account.

### HTTP request

`GET https://travelpartner.googleapis.com/v3/{name=accounts/*}/freeBookingLinksReportViews:query`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` The resource name of the account being queried. Format: accounts/{account_id} |

### Query parameters

| Parameters ||
|---|---|
| `filter` | `string` The conditions (fields and expressions) used to filter the free booking link metrics for the account being queried. The syntax requires spaces surrounding the `in` operator. Otherwise, spaces can be omitted. Conditions can be joined using the `and` operator. The `date` field is required. All other fields are optional. The `date` field values are inclusive and must be in YYYY-MM-DD format. The earliest acceptable date is 2021-03-09; earlier date values will be coerced to 2021-03-09. Values for `partnerHotelDisplayName` are matched case-insensitively. Examples of valid conditions are as follows: - `date = '2021-12-03'` - `date between '2021-12-03' and '2021-12-08'` - `deviceType = 'TABLET'` - `deviceType in ('MOBILE', 'TABLET')` - `partnerHotelId = 'AAA'` - `partnerHotelId in ('AAA', 'BBB')` - `partnerHotelDisplayName = 'hotel A'` - `partnerHotelDisplayName in ('Hotel A', 'HOTEL b')` - `userRegionCode = 'US'` - `userRegionCode in ('US', 'CA')` |
| `aggregateBy` | `string` Specifies how to segment the metrics returned by the query. For example, if `userRegionCode` is specified, the `freeBookingLinksResult` will provide metrics aggregated by user region. The string value is a comma-separated list of fields. Valid fields are: `date`, `userRegionCode`, `deviceType`, `partnerHotelId`, and `partnerHotelDisplayName`. Only fields specified here are included in the FreeBookingLinksResult. |
| `pageSize` | `integer` The maximum number of participation results to return. The service may return fewer than this value. If unspecified, at most 10,000 results will be returned. The maximum value is 10,000; values above 10,000 will be coerced to 10,000. |
| `pageToken` | `string` A page token, received from a previous participationReportViews.query request. Provide this to receive the subsequent page. When paginating, all other parameters provided to participationReportViews.query must match the call that provided the page token. |

### Request body

The request body must be empty.

### Response body

> [!WARNING]
> This item is deprecated!

**DEPRECATED:** Use `QueryPropertyPerformanceReportResponse` with `PropertyPerformanceReportService` instead. Response message for `https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.freeBookingLinksReportViews/query#google.travel.travelpartner.v3.FreeBookingLinksReportService.QueryFreeBookingLinksReport`.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "results": [ { object (`https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.freeBookingLinksReportViews/query#FreeBookingLinksResult`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `results[]` | ``object (`https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.freeBookingLinksReportViews/query#FreeBookingLinksResult`)`` The list of results that match the query. |
| `nextPageToken` | `string` Pagination token used to retrieve the next page of results. If this field is omitted, there are no subsequent pages. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/travelpartner`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).

## FreeBookingLinksResult

> [!WARNING]
> This item is deprecated!

**DEPRECATED:** Use `PropertyPerformanceResult` with `PropertyPerformanceReportService` instead. Represents a result from querying for free booking link stats for an account.

| JSON representation |
|---|
| ``` { "date": { object (`https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/Date`) }, "userRegionCode": string, "deviceType": enum (`https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/Device`), "partnerHotelId": string, "partnerHotelDisplayName": string, "clickCount": string } ``` |

| Fields ||
|---|---|
| `date` | ``object (`https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/Date`)`` A date within the requested date range. Only present if `date` is specified in `aggregateBy` in the request. |
| `userRegionCode` | `string` ISO 3116 region code of the country/region of the user. Only present if `userRegionCode` is specified in `aggregateBy` in the request |
| `deviceType` | ``enum (`https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/Device`)`` The user's device type. Only present if `deviceType` is specified in `aggregateBy` in the request. |
| `partnerHotelId` | `string` Partner's hotel ID. Only present if `partnerHotelId` is specified in `aggregateBy` in the request. |
| `partnerHotelDisplayName` | `string` Partner's hotel name. Only present if `partnerHotelDisplayName` is specified in `aggregateBy` in the request. |
| `clickCount` | `string (https://developers.google.com/discovery/v1/type-format format)` The total number of clicks that were recorded for this result. |