Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Initial search
from apiclient.discovery import build
api_key='AIzaKyAq3L9BiVO0PXrGBhhY0cNN9fkPmm_BsPg' # (not a real API key)
youtube_api = build('youtube','v3', developerKey=api_key)
# Search videos
video_search_results = youtube_api.search().list(q='productivity', part='snippet', type='video',
order='viewCount', maxResults=50).execute()
# Search channels
channel_search_results = youtube_api.channels().list(id=channel_id, part='statistics').execute()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment