Last active
March 8, 2021 21:59
-
-
Save chris-lovejoy/153f0e3ac0f0e5c1309201d9115eef53 to your computer and use it in GitHub Desktop.
Initial search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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