Automatically identifies and excludes YouTube channels that contain kids content, blacklisted keywords in titles, or blacklisted tags from your video campaign placements.
YouTube Kids Channel Cleaner scans your YouTube video placement report for new video IDs, fetches video metadata via the YouTube Data API, and checks each video for 'Made for Kids' status, blacklisted title keywords, and blacklisted tags. Matching channels are bulk-uploaded to an exclusion placement list. All processed videos are logged to a Google Sheet to avoid re-checking.
Setup
1The script requires the YouTube Data API to be enabled in your Google Ads script advanced APIs.
2Create a Google Drive file named according to your FILE_NAME config variable — the script uses this file to track already-checked video IDs.
3On first run the script auto-creates a Google Drive folder structure: '🤖 chiliad scripts / {Account Name} / YouTube Channel Cleaner'.
4On first run it creates a summary spreadsheet with a 'results' sheet (excluded channels) and a 'tags' sheet (blacklist keywords).
5
Ready to Use This Script?
Sign up to install this script with one click and manage it across all your Google Ads accounts.
Add unwanted keywords to the 'tags' sheet (one per row, lowercase) — e.g. 'kids', 'nursery', 'cartoon'. The script matches these against video titles and tags.
6In your Google Ads account, go to Tools & Settings → Scripts.
7Click the + button to create a new script and paste the code.
8Enable the YouTube Data API in the script's advanced APIs section.
9Authorize the script when prompted (it needs access to Google Drive, Sheets, and YouTube).
10Schedule the script to run daily.
Configuration Variables
Variable
Default
Description
FILE_NAME
youtube_checked_ids
Name of the Google Drive file that stores already-checked video IDs
SPREADSHEET
(template spreadsheet ID)
ID of the template spreadsheet to copy on first run (optional — script falls back to a default template)
Expected Output
Link to main file: https://docs.google.com/spreadsheets/d/...
Link to all checked videos: https://docs.google.com/spreadsheets/d/...
Negative channel KidsChannel - UC... Reason: Content for kids
Negative channel CartoonWorld - UC... Reason: cartoon,animation
File has been updated.
Notes
The script requires the YouTube Data API to be enabled in the script's advanced APIs. The exclusion placement list is created automatically if it doesn't exist. Channels are excluded at the channel level, not individual video level.