Method: targetingTypes.targetingOptions.search

Searches for targeting options of a given type based on the given search terms.

HTTP request

POST https://displayvideo.googleapis.com/v1/targetingTypes/{targetingType}/targetingOptions:search

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
targetingType

enum (TargetingType)

Required. The type of targeting options to retrieve.

Accepted values are:

  • TARGETING_TYPE_GEO_REGION
  • TARGETING_TYPE_POI
  • TARGETING_TYPE_BUSINESS_CHAIN

Request body

The request body contains data with the following structure:

JSON representation
{
  "advertiserId": string,
  "pageSize": integer,
  "pageToken": string,

  // Union field search_terms can be only one of the following:
  "poiSearchTerms": {
    object (PoiSearchTerms)
  },
  "businessChainSearchTerms": {
    object (BusinessChainSearchTerms)
  },
  "geoRegionSearchTerms": {
    object (GeoRegionSearchTerms)
  }
  // End of list of possible types for union field search_terms.
}
Fields
advertiserId

string (int64 format)

Required. The Advertiser this request is being made in the context of.

pageSize

integer

Requested page size. Must be between 1 and 100. If unspecified will default to 100. Returns error code INVALID_ARGUMENT if an invalid value is specified.

pageToken

string

A token identifying a page of results the server should return. Typically, this is the value of nextPageToken returned from the previous call to targetingOptions.search method. If not specified, the first page of results will be returned.

Union field search_terms. Queries by which to search for targeting options. Only one field in search_terms may be filled out, and it must correspond to targeting_type. search_terms can be only one of the following:
poiSearchTerms

object (PoiSearchTerms)

Search terms for POI targeting options. Can only be used when targetingType is TARGETING_TYPE_POI.

businessChainSearchTerms

object (BusinessChainSearchTerms)

Search terms for Business Chain targeting options. Can only be used when targetingType is TARGETING_TYPE_BUSINESS_CHAIN.

geoRegionSearchTerms

object (GeoRegionSearchTerms)

Search terms for geo region targeting options. Can only be used when targetingType is TARGETING_TYPE_GEO_REGION.

Response body

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

Response message for targetingOptions.search.

JSON representation
{
  "targetingOptions": [
    {
      object (TargetingOption)
    }
  ],
  "nextPageToken": string
}
Fields
targetingOptions[]

object (TargetingOption)

The list of targeting options that match the search criteria.

This list will be absent if empty.

nextPageToken

string

A token to retrieve the next page of results. Pass this value in the pageToken field in the subsequent call to targetingOptions.search method to retrieve the next page of results.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/display-video

For more information, see the OAuth 2.0 Overview.

PoiSearchTerms

Search terms for POI targeting options.

JSON representation
{
  "poiQuery": string
}
Fields
poiQuery

string

The search query for the desired POI name, street address, or coordinate of the desired POI. The query can be a prefix, e.g. "Times squar", "40.7505045,-73.99562", "315 W 44th St", etc.

BusinessChainSearchTerms

Search terms for Business Chain targeting options.

At least one of the field should be populated.

JSON representation
{
  "businessChainQuery": string,
  "regionQuery": string
}
Fields
businessChainQuery

string

The search query for the desired business chain. The query must be the full name of the business, e.g. "KFC", "mercedes-benz".

regionQuery

string

The search query for the desired geo region, e.g. "Seattle", "United State".

GeoRegionSearchTerms

Search terms for geo region targeting options.

JSON representation
{
  "geoRegionQuery": string
}
Fields
geoRegionQuery

string

The search query for the desired geo region. The query can be a prefix, e.g. "New Yor", "Seattle", "USA", etc.