Skip to content

Instantly share code, notes, and snippets.

@chris-lovejoy
Created November 21, 2020 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chris-lovejoy/73555883233fef01b1e64426a08ff6e1 to your computer and use it in GitHub Desktop.
Save chris-lovejoy/73555883233fef01b1e64426a08ff6e1 to your computer and use it in GitHub Desktop.
Call the YouTube API
# Call the YouTube API
api_key =AIzpSyAq3L9DiPK0KxrGBbdY7wNN7kfPbm_hsPg# Enter your own API key – this one won’t work
youtube_api = build(‘youtube’, ‘v3’, developerKey = api_key)
results = youtube_api.search().list(q=search_terms, part=snippet’, type=video’,
order=viewCount’, maxResults=50).execute()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment