YouTube Connector
YouTube Connector Help
Version 2
ZappySys Logo File Version: v2
Supported Engine: 5

Examples


On this page you will find some SQL examples which can be used for API ODBC Driver or Data Gateway API Connector.
Example Query
Get videos of my account
SELECT * FROM MyVideos
Get channels of my account
SELECT * FROM MyChannels
Get playlists of my account
SELECT * FROM MyPlaylists
Get comments of a video
SELECT * FROM get_comments WITH (videoId='INPUT_YOUR_VIDEO_ID')
Get comments of a channel
SELECT * FROM get_comments WITH (channelId='INPUT_YOUR_CHANNEL_ID')
Get my playlists of my account
SELECT * FROM MyPlaylists
Get my playlists of specific channel
SELECT * FROM get_playlists WITH (channelId='UCVGOyzms_XJNk_DHqrffXCw')
Search for videos in whole YouTube
SELECT * FROM search WITH (q='ZappySys Tutorials', maxResults='50')
Search for videos in a channel
SELECT * FROM search WITH (q='GPU', maxResults='50', channelId='UCXuqSBlHAE6Xw-yeJA0Tunw')
Get channels by ids
SELECT *
FROM get_channels
WITH(
	  id='UC2d5diIOoCEa47p4PjpIHya,AC2d5diIOoCEa47p4PjpIHyQ,TC2d5diIOoCEa47p4PjpIHyI'
)
Gets a report of specific channel
SELECT *
FROM get_report
WITH(
	  ids='channel==ENTER_CHANNEL_ID'
	, metrics='likes~shares~views'
	, startDate='2022-08-01'
	, endDate='2022-08-30'
)
Gets a report of my channel with relative date
SELECT *
FROM get_report
WITH(
      ids='channel==MINE'
    , metrics='likes~shares~views'
    , startDate='yearstart' --OR put date like '2022-08-01'
    , endDate='today' --OR put date like '2022-08-01'
    , dimensions='country'
)