GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - srcecde/python-youtube-api: A basic Python YouTube v3 API to fetch data from YouTube using public API-Key without OAuth

BranchesTags
Open more actions menu

Latest commit

 

History

33 Commits
33 Commits

Folders and files

NameName
Last commit message
Last commit date
output
output
 
 
utils
utils
 
 
youtube
youtube
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
__init__.py
__init__.py
 
 
config.py
config.py
 
 
main.py
main.py
 
 
requirements.txt
requirements.txt
 
 
youtube_api_cmd.py
youtube_api_cmd.py
 
 

Repository files navigation

Python YouTube API

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

It can fetch video comments for a given video URL, keyword based search (returns videos, playlist, channel) and return videos data for a given channelId. It store the data into output directory in CSV files.

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

Install Dependencies

  • pip3 install -r requirements.txt

How to use

  • Pass --c after file name for fetching comments from videos
  • Pass --s after file name for fetching results based on search keyword
  • Pass --sc after file name for fetching videos based on YouTube ChannelId

It is mandatory to pass any of the above argument after file name

Video Comments

  • --max argument for defining the maximum result to return (default=10)
  • --videourl argument for defining the youtube URL Mandatory
  • --key argument for defining API key Mandatory
Example: python3 main.py --c --max 10 --videourl https://www.youtube.com/watch?v=y_j-r8x1FtI --key AAAAAAA

Search by Keyword

  • --max argument for defining the maximum result to return (default=10)
  • --search argument for giving the keyword
  • --r argument for defining region (Country) For ex. --r=IN (Argument should be a country code)
  • --key argument for defining your developer API key Mandatory
Example: python3 main.py --s --search "srce cde" --max 10 --key AAAAAAA

Search Videos by YouTube ChannelId

  • --max argument for defining the maximum result to return (default=10)
  • --channelid argument for defining channel id Mandatory
  • --key argument for defining your developer API key Mandatory
Example: python3 main.py --sc --channelid UCwDlyuX3Fkg5WNBufLnH6dw --max 10 --key AAAAAAA

Video example: https://youtu.be/ooZ98n-ZDUA

YouTube API v3

  • YouTube API v3 Docs
  • Obtain API Key

About

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

Topics

python-youtubeyoutube-api

Resources

Readme
GPL-3.0 license
Activity

Stars

156 stars

Watchers

8 watching

Forks

64 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.