CData Python Connector for YouTube Analytics

Build 24.0.9062

TopVideos

Query the TopVideos for a channel. You can also use this view to query playback detail and geographic filters.

テーブル固有の情報

Select

次のクエリは、チャンネルのトップ動画を返します。

SELECT * FROM TopVideos

次のクエリは、特定の国でほとんどが視聴されたチャンネルのトップ動画を返します。

SELECT Video, Views, EstimatedMinutesWatched, AverageViewDuration, AverageViewPercentage FROM TopVideos WHERE Country = 'US'

次のクエリは、ほとんどが視聴されたチャンネルのトップ再生リストを返します。

SELECT Playlist, Views, EstimatedMinutesWatched, PlaylistStarts, AverageViewDuration FROM TopVideos WHERE IsCurated = true

Select Rules

次のテーブルを使用してトップ動画への他のクエリを作成できます。

動画のトップ動画:

ディメンション 必須 video
オプション creatorContentType
指標 1つ以上使用 views、comment、likes、dislikes、videosAddedToPlaylists、videosRemovedFromPlaylists、shares、estimatedMinutesWatched、averageViewDuration、averageViewPercentage、annotationClickThroughRate、annotationCloseRate、annotationImpressions、annotationClickableImpressions、annotationClosableImpressions、annotationClicks、annotationClose、subscribersGained、subscribersLost
フィルタ 0または1つ使用 country、continent、subContinent
Sort 0または1つ以上使用(降順のみ) views、estimatedMinutesWatched、subscribersGained、subscribersLost

再生リストのトップ動画:

ディメンション 必須 playlist
指標 1つ以上使用 views、estimatedMinutesWatched、averageViewDuration、playlistStarts、viewsPerPlaylistStart、averageTimeInPlaylist
フィルタ 必須 isCurated=true
0または1つ使用 country、province、continent、subContinent
0または1つ以上使用 playlist、subscribedStatus、youtubeProduct
Sort 0または1つ以上使用(降順のみ) views、estimatedMinutesWatched、playlistStarts

コンテンツ所有者のトップ動画:

ディメンション 必須 video
オプション creatorContentType
指標 1つ以上使用 views、comments、likes、dislikes、videosAddedToPlaylists、videosRemovedFromPlaylists、shares、estimatedMinutesWatched、averageViewDuration、averageViewPercentage、annotationClickThroughRate、annotationCloseRate、annotationImpressions、annotationClickableImpressions、annotationClosableImpressions、annotationClicks、annotationCloses、subscribersGained、subscribersLost、earnings、adEarnings、grossRevenue、redPartnerRevenue、monetizedPlaybacks、playbackBasedCpm、impressions、impressionBasedCpm
フィルタ 1つだけ使用 channel
0または1つ使用 country、continent、subContinent
Sort 0または1つ以上使用(降順のみ) views、earnings、redPartnerRevenue、estimatedMinutesWatched、subscribersGained、subscribersLost

コンテンツ所有者の再生リストのトップ動画:

ディメンション 必須 playlist
指標 1つ以上使用 views、estimatedMinutesWatched、averageViewDuration、playlistStarts、viewsPerPlaylistStart、averageTimeInPlaylist
フィルタ 必須 isCurated=true
0または1つ使用 playlist、channel
0または1つ使用 country、province、continent、subContinent
0または1つ以上使用 subscribedStatus、youtubeProduct
Sort 0または1つ以上使用(降順のみ) views、estimatedMinutesWatched、playlistStarts

Columns

Name Type Dimension DefaultMetric DefaultDimension Description
Video String True True The Id of a YouTube video.
CreatorContentType String True This dimension identifies the type of content associated with the user activity metrics in the data row. The allowed values are LIVE_STREAM, SHORTS, STORY, VIDEO_ON_DEMAND, UNSPECIFIED.
Views Double True The number of times that a video was viewed. In a playlist report, the metric indicates the number of times that a video was viewed in the context of a playlist.
RedViews Double True The number of times that a video was viewed by YouTube Premium (previously known as YouTube Red) members.
Comments Double True The number of times that users commented on a video.
Likes Double True The number of times that users indicated that they liked a video by giving it a positive rating.
Dislikes Double True The number of times that users indicated that they disliked a video by giving it a negative rating. This is a core metric and is subject to the Deprecation Policy.
VideosAddedToPlaylists Double True The number of times that videos were added to the video owner playlist or other channel playlists like the Watch Later playlist. Channel uploads playlists and user watch history are not reported. This metric returns an absolute number, meaning that if a user adds a video to a playlist, removes it, and then adds it again, the metric value reflects the video being added to a playlist twice. Data for this metric is not available for dates before October 1, 2014.
VideosRemovedFromPlaylists Double True The number of times that videos were removed from the video owner playlist and other YouTube playlists like the Watch Later playlist. This metric returns an absolute number, meaning that if a user adds a video to a playlist, removes it, adds it again, and then removes it again, the metric value reflects the video being removed from a playlist twice. Data for this metric is not available for dates before October 1, 2014.
Shares Double True The number of times that users shared a video through the Share button.
EstimatedMinutesWatched Double True The number of minutes that users watched videos for the specified channel, content owner, video, or playlist.
EstimatedRedMinutesWatched Double True The number of minutes that YouTube Premium (previously known as YouTube Red) members watched a video.
AverageViewDuration Double True The average length, in seconds, of video playbacks. In a playlist report, the metric indicates the average length, in seconds, of video playbacks that occurred in the context of a playlist.
AverageViewPercentage Double True The average percentage of a video watched during a video playback.
AnnotationClickThroughRate Double True The ratio of annotations that viewers clicked to the total number of clickable annotation impressions.
AnnotationCloseRate Double True The ratio of annotations that viewers closed to the total number of annotation impressions.
AnnotationImpressions Double True The total number of annotation impressions.
AnnotationClickableImpressions Double True The number of annotations that appeared and could be clicked.
AnnotationClosableImpressions Double True The number of annotations that appeared and could be closed.
AnnotationClicks Double True The number of clicked annotations.
AnnotationCloses Double True The number of closed annotations.
CardClickRate Double True The click-through-rate for cards, which is calculated as the ratio of card clicks to card impressions.
CardTeaserClickRate Double True The click-through-rate for card teasers, which is calculated as the ratio of clicks on card teasers to the total number of card teaser impressions.
CardImpressions Double True The number of times cards were displayed. When the card panel is opened, a card impression is logged for each of the video's cards.
CardTeaserImpressions Double True The number of times that card teasers were displayed. A video view can generate multiple teaser impressions.
CardClicks Double True The number of times that cards were clicked.
CardTeaserClicks Double True The number of clicks on card teasers. Card icon clicks are attributed to the last teaser displayed to the user.
SubscribersGained Double True The number of times that users subscribed to a channel or video.
SubscribersLost Double True The number of times that users unsubscribed from a channel or video.
EstimatedRevenue Decimal The total estimated earnings (net revenue) from all Google-sold advertising sources as well as from nonadvertising sources for the selected date range and region. Estimated earnings are subject to month-end adjustment and do not include partner-sold and partner-served advertising.
EstimatedAdRevenue Decimal The total estimated earnings (net revenue) from all Google-sold advertising sources for the selected date range and region. Estimated earnings are subject to month-end adjustment and do not include partner-sold and partner-served advertising.
GrossRevenue Decimal 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.
EstimatedRedPartnerRevenue Decimal The total estimated revenue earned from YouTube Red subscriptions for the selected report dimensions. The value of the metric reflects earnings from both music and nonmusic content and is subject to month-end adjustment.
MonetizedPlaybacks Double The number of instances when a viewer played your video and was shown at least one ad impression. A monetized playback is counted if a viewer is shown a preroll ad but quits watching the ad before your video ever starts. The expected estimated error for this figure is ?2.0%.
PlaybackBasedCpm Decimal The estimated gross revenue per thousand playbacks.
AdImpressions Double The number of verified ad impressions served.
Cpm Decimal The estimated gross revenue per thousand ad impressions.
Channel String (only used in content owner reports) The Id for a YouTube channel. The channel dimension is frequently used in content owner reports because those reports typically aggregate data for multiple channels.
UploaderType String (only used in content owner reports) This dimension lets you indicate whether a result set will 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.
ClaimedStatus String (only used in content owner reports) This dimension lets you indicate that a result set will only contain metrics for claimed content. The allowed value is claimed.
SubscribedStatus String This dimension indicates whether the user activity metrics in the data row are associated with viewers who were subscribed to the video or playlist channel. Possible values are SUBSCRIBED and UNSUBSCRIBED. Note that the dimension value is accurate as of the time that the user activity occurs.
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 API supports the following values: 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.
StartDate Date Start date for fetching Analytics data. Either a date string or a relative date (e.g., today, yesterday, or #daysAgo).
EndDate Date End date for fetching Analytics data. Either a date string or a relative date (e.g., today, yesterday, or #daysAgo).

Pseudo-Columns

SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。

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 24.0.9062