youtube-analytics
YouTube Data API v3 analytics toolkit. Analyze YouTube channels, videos, and search results. Use when the user asks to: check YouTube channel stats, analyze video performance, compare channels, search for videos, get subscriber counts, view engagement metrics, find trending
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
YouTube Data API v3 analytics toolkit. Analyze YouTube channels, videos, and search results. Use when the user asks to: check YouTube channel stats, analyze video performance, compare channels, search for videos, get subscriber counts, view engagement metrics, find trending videos, get channel uploads, or analyze YouTube competition. Requires a YouTube Data API v3 key from Google Cloud Console.
How to use
Przygotuj klucz API: Zaloguj się do Google Cloud Console, utwórz projekt, włącz YouTube Data API v3 i wygeneruj klucz API.
Zainstaluj zależności: W katalogu scripts uruchom npm install, aby pobrać wymagane pakiety.
Skonfiguruj środowisko: W głównym katalogu projektu utwórz plik .env i dodaj YOUTUBE_API_KEY=Twój_klucz_API oraz YOUTUBE_DEFAULT_MAX_RESULTS=50.
Wybierz funkcję analizy: W zależności od celu użyj analyzeChannel() do analizy kanału, analyzeVideo() do sprawdzenia wydajności filmu, compareChannels() do porównania dwóch kanałów, lub searchAndAnalyze() do wyszukania i analizy treści.
Uruchom analizę: Zaimportuj wybraną funkcję z scripts/src/index.ts i uruchom ją z identyfikatorem kanału lub wideo, np. await analyzeChannel('UCxxxxxxxx').
Przejrzyj wyniki: Wszystkie dane automatycznie zapisują się jako pliki JSON w katalogu results, gdzie możesz je analizować i eksportować.