YT-Analytics

YouTube Channel Analytics

A small responsive website for searching YouTube channels and exploring public channel statistics and recent uploads. The Flask server resolves channel names with YouTube Data API v3 and keeps the API key on the server; it is never sent to the browser. No user accounts are required.

Requirements

Configure the API key

Create or select a project in Google Cloud Console, enable YouTube Data API v3, and create an API key under APIs & Services → Credentials. Restrict the key to the YouTube Data API v3 where practical.

Add the key to a .env file in the project directory:

YOUTUBE_API_KEY=your-api-key

Alternatively, set YOUTUBE_API_KEY as an environment variable before starting the server. Do not commit the key or share it publicly.

Run locally on Windows

From the project directory in PowerShell:

py -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
python app.py

Open http://127.0.0.1:5000 in the browser. In VS Code, open the URL in the integrated/shared browser if available. Stop the server with Ctrl+C.

Features

Subscriber counts can be hidden by the channel owner. The application displays public data only. The chart compares current public view totals for recent uploads; it does not show historical growth. Historical channel analytics require the channel owner’s authorization.