A Chrome extension that tracks your YouTube Music listening activity and exposes it via a public API — perfect for “now playing” widgets on your portfolio, blog, or any website.
Think Spotify’s Now Playing API, but for YouTube Music.
YouTube Music Tab → Extension (content script) → Supabase DB → Your Website
chrome://extensions/ in ChromeOnce you’re signed in and listening, anyone can fetch your current song via the REST API. No authentication required for reading.
GET https://uczcbonklkmgzdtqeulx.supabase.co/rest/v1/now_playing?user_id=eq.YOUR_USER_ID&select=*
apikey: sb_publishable_SS1XoSstAPQjgehDEvZfaw_QAmep2_a
{
"title": "Trumpet",
"artist": "Seyi Vibez",
"album": "NAAMij",
"album_art": "https://lh3.googleusercontent.com/...",
"is_playing": true,
"duration": "3:45",
"progress_ms": 45000,
"duration_ms": 225000,
"song_url": "https://music.youtube.com/watch?v=...",
"updated_at": "2026-02-11T20:30:00.000Z"
}
| Field | Type | Description |
|---|---|---|
title |
string | Song title |
artist |
string | Artist name |
album |
string | Album name |
album_art |
string | Album art URL |
is_playing |
boolean | Whether music is currently playing |
duration |
string | Song duration (formatted) |
progress_ms |
integer | Playback progress in milliseconds |
duration_ms |
integer | Total song duration in milliseconds |
song_url |
string | Link to the song on YouTube Music |
updated_at |
string | ISO timestamp of last update |
📖 For integration guides with code snippets (React, Vue, vanilla JS, etc.), see Integration Docs
ytm-extension/
├── manifest.json # Extension config (Manifest V3)
├── config.js # Supabase credentials
├── content-ytm.js # Content script (injected into YouTube Music)
├── background.js # Service worker (auth + Supabase writes)
├── popup.html/css/js # Extension popup UI
├── icons/ # Extension icons
├── privacy-policy.md # Privacy policy
├── integration-docs.md # Developer integration guide
└── supabase-setup.sql # Database schema
This extension:
music.youtube.comSee the full Privacy Policy.
MIT