Skip to content

A basic Python YouTube v3 API to fetch data from YouTube using public API-Key without OAuth

License

Notifications You must be signed in to change notification settings

matianxing1992/python-youtube-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python YouTube API

A basic Python YouTube v3 API to fetch data from YouTube using public API-Key without OAuth

It fetch comments, perform search and return videos, channels and playlist in categorized form.

You are required to get the API key from Google API console in order to use this script

How to use

Pass --c after file name for calling Video Comment function Pass --s after file name for calling Search by Keyword Pass --sc after file name for calling Search videos by YouTube ChannelId
It is mandatory to pass any of the above argument after file name

Video Comments

  • python youtube_api_cmd.py --max --videourl --key
  • --max parameter for defining the maximum result you want (maxlimit = 100, default=20)
  • --videourl parameter for defining the youtube URL
  • --key parameter for defining your developer API key
  • --videourl and --key parameter is mandatory. --max parameter is optional

Search by Keyword

  • python youtube_api_cmd.py --search --max --key
  • --max parameter for defining the maximum result you want (maxlimit = 100, default=20)
  • --search parameter for giving the keyword
  • --r parameter for defining region (Country) For ex. --r=IN (Parameter should be a country code)
  • --key parameter for defining your developer API key Mandatory
  • It will return Videos, Channel and Playlist in the respective category

Search Videos by YouTube ChannelId

  • python youtube_api_cmd.py --channelid --max --key
  • --max parameter for defining the maximum result you want (maxlimit = 100, default=20)
  • --channelid parameter for defining channel id Mandatory
  • --key parameter for defining your developer API key Mandatory
  • It will list of Videos from the defined YouTube ChannelId

YouTube API v3

About

A basic Python YouTube v3 API to fetch data from YouTube using public API-Key without OAuth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%