ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Track YouTube Playlist Removals
Tutorial

How to Track YouTube Playlist Removals

Monitor YouTube playlists for removed videos using Scavio's playlist endpoint. Daily diffs surface takedowns and availability changes.

Get Free API KeyAPI Docs

Channels that relied on curated YouTube playlists lose content constantly as videos are removed, age-restricted, or deleted. This tutorial tracks playlist removals daily via Scavio's YouTube playlist endpoint and emits a diff so you can replace removed videos before your viewers notice.

Prerequisites

  • Python 3.10+
  • A Scavio API key
  • A YouTube playlist URL or ID
  • SQLite for daily snapshots

Walkthrough

Step 1: Fetch the playlist

Scavio returns all videos with status flags.

Python
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']

def playlist(pid):
    r = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY},
        json={'platform': 'youtube_playlist', 'query': pid})
    return r.json().get('videos', [])

Step 2: Snapshot to SQLite

One row per video per day.

Python
import sqlite3
conn = sqlite3.connect('pl.db')
conn.execute('CREATE TABLE IF NOT EXISTS snap (date TEXT, playlist TEXT, video_id TEXT, title TEXT, status TEXT)')

def snapshot(pid, videos):
    for v in videos:
        conn.execute('INSERT INTO snap VALUES (date(\'now\'), ?, ?, ?, ?)',
            (pid, v['id'], v['title'], v.get('status', 'available')))
    conn.commit()

Step 3: Diff against yesterday

New removals = yesterday - today.

Python
def diff(pid):
    y = set(r[0] for r in conn.execute('SELECT video_id FROM snap WHERE date = date(\'now\', \'-1 day\') AND playlist = ?', (pid,)))
    t = set(r[0] for r in conn.execute('SELECT video_id FROM snap WHERE date = date(\'now\') AND playlist = ?', (pid,)))
    return y - t

Step 4: Alert on removals

Slack or email when removals > 0.

Python
def alert(removed):
    if removed:
        print(f'ALERT: {len(removed)} videos removed: {list(removed)}')

Step 5: Schedule daily run

cron or GitHub Actions at 6am UTC.

Bash
0 6 * * * /usr/bin/python3 /path/to/playlist_watch.py

Python Example

Python
import os, requests, sqlite3

API_KEY = os.environ['SCAVIO_API_KEY']
PID = 'PLxxxxxxxx'
conn = sqlite3.connect('pl.db')
conn.execute('CREATE TABLE IF NOT EXISTS snap (date TEXT, video_id TEXT)')

r = requests.post('https://api.scavio.dev/api/v1/search',
    headers={'x-api-key': API_KEY},
    json={'platform': 'youtube_playlist', 'query': PID})
for v in r.json().get('videos', []):
    conn.execute('INSERT INTO snap VALUES (date(\'now\'), ?)', (v['id'],))
conn.commit()
print('snapshot saved')

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
export async function snap(playlistId) {
  const r = await fetch('https://api.scavio.dev/api/v1/search', {
    method: 'POST',
    headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({ platform: 'youtube_playlist', query: playlistId })
  });
  return (await r.json()).videos;
}

Expected Output

JSON
Daily diff per playlist, highlighting removed video IDs and titles. Typical finding: 1-5% of a 200-video playlist goes unavailable per month.

Related Tutorials

  • How to Get YouTube Video Metadata via API
  • How to Extract YouTube Transcripts in n8n
  • How to Build a YouTube Transcript Pipeline for Summarization

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Python 3.10+. A Scavio API key. A YouTube playlist URL or ID. SQLite for daily snapshots. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Best Of

Best YouTube Data API in 2026

Read more
Best Of

Best APIs for YouTube Video Summary Bots (2026)

Read more
Solution

Find YouTube Influencers via API Instead of Scraping

Read more
Workflow

YouTube Playlist Removal Monitor

Read more
Use Case

YouTube Search API for Video SEO Research

Read more
Workflow

YouTube Influencer SERP Research Workflow

Read more

Start Building

Monitor YouTube playlists for removed videos using Scavio's playlist endpoint. Daily diffs surface takedowns and availability changes.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy