Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

YouTube Subscriptions Analyzer

A production-ready, fully static single-page app that analyzes your YouTube subscriptions from a Google Takeout CSV — enriched with live data from the YouTube Data API v3.

Everything runs in the browser. Your API key is stored only in localStorage. Your CSV never leaves your device except for calls to Google’s API.

Link - Try Here

Features

  • Upload Google Takeout subscriptions.csv (Channel Id / Url / Title)
  • Client-side CSV parsing with Papa Parse
  • Enrich each channel with:
    • Name, thumbnail, banner
    • Creation date (publishedAt)
    • Subscriber count, total videos, views
    • Country / region (flag + ISO code from snippet.country)
  • Summary stats: totals, average age, most/least subscribers, oldest/newest
  • Top countries breakdown (bar chart of top 5)
  • Search/filter (name or country), sortable table + card grid views
  • Progress UI with cancel; batched API calls for quota friendliness
  • Export enriched data as CSV or JSON
  • Dark, minimalist UI inspired by openai.com

Tech stack

  • Vite + React 19 + TypeScript
  • Tailwind CSS v4
  • Radix UI primitives + CVA (shadcn-style)
  • Lucide icons
  • date-fns

Quick start

npm install
npm run dev

Open the URL Vite prints (usually http://localhost:5173).

npm run build    # production build → dist/
npm run preview  # preview the production build

Getting a YouTube Data API key

  1. Open Google Cloud Console
  2. Create or select a project
  3. APIs & Services → Library → enable YouTube Data API v3
  4. Credentials → Create credentials → API key
  5. (Recommended) Restrict the key to YouTube Data API v3
  6. Paste the key into the app — it is saved in localStorage only

Quota notes

Call Approx. cost Notes
channels.list (up to 50 IDs) 1 unit Name, stats, country, thumbnails, banner

Default free quota is typically 10,000 units/day. A few hundred subscriptions use only a handful of units.

Country comes from the channel’s public settings (snippet.country). Channels that never set a region show as — / Unknown.

Exporting subscriptions from Google Takeout

  1. Go to Google Takeout
  2. Select YouTube and YouTube Music
  3. Click All YouTube data included → deselect all → enable only subscriptions
  4. Download the archive and open subscriptions.csv (or nested under a YouTube folder)

Expected columns (names are flexible):

  • Channel Id
  • Channel Url
  • Channel Title

A small sample file is available at /sample-subscriptions.csv after starting the app.

Project structure

src/
  components/     # UI + feature components
  hooks/          # API key + analysis orchestration
  lib/            # CSV parse, YouTube API, countries, format, export, stats
  types/          # Shared TypeScript types
  App.tsx
  main.tsx
  index.css       # Tailwind + design tokens

Privacy

  • No backend, no analytics SDK, no accounts
  • API key: localStorage only
  • Network: browser → googleapis.com only (with your key)

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages