Method: customers.generateTrendingInsights

Returns insights for trending content on YouTube.

List of thrown errors: AuthenticationError AuthorizationError FieldError HeaderError InternalError QuotaError RangeError RequestError

HTTP request

POST https://googleads.googleapis.com/v19/customers/{customerId}:generateTrendingInsights

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
customerId

string

Required. The ID of the customer.

Request body

The request body contains data with the following structure:

JSON representation
{
  "customerInsightsGroup": string,
  "countryLocation": {
    object (LocationInfo)
  },

  // Union field criteria can be only one of the following:
  "searchAudience": {
    object (SearchAudience)
  },
  "searchTopics": {
    object (SearchTopics)
  }
  // End of list of possible types for union field criteria.
}
Fields
customerInsightsGroup

string

Required. The name of the customer being planned for. This is a user-defined value.

countryLocation

object (LocationInfo)

Required. The country to find trends in.

Union field criteria. The criteria used to search for trending content. criteria can be only one of the following:
searchAudience

object (SearchAudience)

An audience to search for trending content in.

searchTopics

object (SearchTopics)

Content topics to return trend information for.

Response body

Response message for [ContentCreatorInsightsService.GenerateTrendingInsights]

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

JSON representation
{
  "trendInsights": [
    {
      object (TrendInsight)
    }
  ]
}
Fields
trendInsights[]

object (TrendInsight)

The list of trending insights for the given criteria.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/adwords

For more information, see the OAuth 2.0 Overview.

SearchAudience

A collection of audience attributes that describe an audience of viewers. This is used to search for topics trending for the defined audience.

JSON representation
{
  "audienceAttributes": [
    {
      object (AudienceInsightsAttribute)
    }
  ]
}
Fields
audienceAttributes[]

object (AudienceInsightsAttribute)

Required. Audience attributes that describe an audience of viewers. This is used to search for topics trending for the defined audience.

SearchTopics

A collection of content topics to return trend information for.

JSON representation
{
  "entities": [
    {
      object (AudienceInsightsEntity)
    }
  ]
}
Fields
entities[]

object (AudienceInsightsEntity)

Required. A list of knowledge graph entities to retrieve trend information for. Supported entities are tagged with [InsightsKnowledgeGraphEntityCapabilities.CONTENT_TRENDING_INSIGHTS][].

TrendInsight

A trend insight for a given attribute.

JSON representation
{
  "trendAttribute": {
    object (AudienceInsightsAttributeMetadata)
  },
  "trendMetrics": {
    object (TrendInsightMetrics)
  },
  "trend": enum (InsightsTrend)
}
Fields
trendAttribute

object (AudienceInsightsAttributeMetadata)

The attribute this trend is for.

trendMetrics

object (TrendInsightMetrics)

Metrics associated with this trend.

trend

enum (InsightsTrend)

The direction of trend (such as RISING or DECLINING).

TrendInsightMetrics

Metrics associated with a trend insight.

JSON representation
{
  "viewsCount": string
}
Fields
viewsCount

string (int64 format)

The number of views for this trend.

InsightsTrend

Describes which direction a trend is moving.

Enums
UNSPECIFIED Not specified.
UNKNOWN The value is unknown in this version.
EMERGING This is a new trend.
RISING This trend has increased recently.
SUSTAINED This trend has remained stable.
DECLINING This trend is declining.