JDBC Driver for YouTube Analytics

Build 23.0.8839


Query Ad Performance Reports. Ad Performance Reports provide impression-based metrics for ads that ran during video playbacks. These metrics account for each ad impression, and each video playback can yield multiple impressions.

Table Specific Information


Get GrossRevenue for a video in a specific country grouped by ad type and day:

SELECT Country, AdType, Day, GrossRevenue, StartDate, EndDate FROM AdPerformanceReports WHERE video = 'vid123' AND continent = '019'

Select Rules

Ad performance reports for content owners:

Dimensions Required adType
Optional day
Metrics Use 1 or more grossRevenue,adImpressions,cpm
Filter Use exactly one video, group, or a supported combination of uploaderType and claimedStatus
Use 0 or one country,continent,subContinent


Name Type Dimension DefaultMetric DefaultDimension Description
Video String True The Id of a YouTube video.
Group String True (filter only) The Id of a YouTube Analytics group.
Country String The country associated with the metrics in the report row. The dimension value is a two-letter ISO-3166-1 country code, such as US, CN (China), or FR (France). The country code ZZ is used to report metrics for which YouTube could not identify the associated country.
Continent String (filter only) A United Nations (U.N.) statistical region code. The allowed values are 002 Africa, 019 Americas (Northern America, Latin America, South America, and the Caribbean), 142 Asia, 150 Europe, 009 Oceania. This dimension can only be used to filter data.
SubContinent String (filter only) A U.N. statistical region code that identifies a geographical subregion.
AdType String True The AdType dimension is used in ad performance reports and aggregates the requested metrics based on the types of ads that ran during video playbacks: auctionDisplay, auctionInstream, auctionTrueviewInslate, auctionTrueviewInstream, auctionUnknown, reservedClickToPlay, reservedDisplay, reservedInstream, reservedInstreamSelect, reservedMasthead, reservedUnknown.
Day String True When you use this dimension, data in the report is aggregated on a daily basis and each row contains data for one day.
ClaimedStatus String (only used in content owner reports) This dimension lets you indicate that a result set should only contain metrics for claimed content. The allowed value is claimed.
UploaderType String (only used in content owner reports) This dimension lets you indicate whether a result set should contain metrics for content uploaded by the specified content owner or content uploaded by third parties, such as user-uploaded videos. The allowed values are self and thirdParty.
GrossRevenue Decimal False The estimated gross revenue, in USD, from all Google-sold or DoubleClick-partner-sold advertising for the selected date range and region. Gross revenue is subject to month-end adjustment and does not include partner-served advertising. Gross revenue should not be confused with earnings, or net revenue, which factors in your share of ownership and revenue-sharing agreements.
Cpm Decimal False The estimated gross revenue per thousand ad impressions.
AdImpressions Double False The number of verified ad impressions served.
StartDate Date Start date for fetching Analytics data.
EndDate Date End date for fetching Analytics data.


Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Segments String Segments the data returned for your request. Either a SegmentId or a custom segment.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839