YouTube Live Broadcast Checking
by @stevenho1394
Check and manage YouTube channels to find their next scheduled live broadcasts using the YouTube Data API v3 and a Google API key.
clawhub install youtube-live-broadcast-checkingπ About This Skill
YouTube Live Broadcast Checking Skill
Checks upcoming live broadcast schedules and current live status for YouTube channels using the YouTube Data API v3.
Repository: https://github.com/StevenHo1394/openclaw/tree/main/skills/youtube-live-broadcast-checking
Features
get_live_broadcast)Prerequisites
YOUTUBE_API_KEY for the agent sessionTools
add_channel(channel_id)
Add a YouTube channel to the watchlist.
Parameters:
channel_id: Channel ID (e.g., UCabcd1234) or handle/URL (the skill will resolve)Returns: { id, name, status: "added" } or error
remove_channel(channel_id)
Remove a channel from the watchlist.
Parameters:
channel_id: Channel IDReturns: { removed: true } or error
list_channels()
List all channels in the watchlist.
Returns: Array of { id, name, added_at }
get_next_broadcast(channel_id)
Get the next upcoming broadcast for a specific channel.
Parameters:
channel_id: Channel ID or handleReturns: Broadcast object with video_id, title, scheduled_start_time, thumbnail_url, video_url or null if none scheduled.
check_upcoming_broadcasts(channel_ids?)
Check upcoming broadcasts for multiple channels. If channel_ids omitted, checks all watchlist channels. Accepts channel IDs, handles (e.g., @chan22), or display names; these are resolved automatically via YouTube API search.
Parameters:
channel_ids (optional): Array of channel IDs, handles, or display namesReturns: Array of broadcast objects sorted by start time.
get_live_broadcast(channel_id)
Check if a channel is currently live streaming.
Parameters:
channel_id: Channel ID or handleReturns: Live broadcast object with video_id, title, description, actual_start_time, concurrent_viewers, video_url or null if not live.
Usage Example
// Add a channel
await skill.tools.add_channel({ channel_id: 'Sami Live HK' });// Check who's live now
const live = await skill.tools.get_live_broadcast({ channel_id: 'Sami Live HK' });
if (live) {
console.log(Live: ${live.title} (${live.concurrent_viewers} viewers));
}
// Get next scheduled broadcast
const next = await skill.tools.get_next_broadcast({ channel_id: 'UCfYvxA4eSAvoES5fffhnRnA' });
Installation
1. Copy the skill directory to ~/.openclaw/workspace/skills/
2. Run npm install inside the skill folder to install googleapis
3. Add "youtube-live-broadcast-checking" to the desired agent's skills array in openclaw.json
4. Ensure the agent's session has YOUTUBE_API_KEY set (e.g., in auth-profiles.json or gateway environment)
5. Restart the agent or wait for next session
Storage Behavior
The watchlist is persisted to disk in watchlist.json and survives agent restarts, improving performance and consistency across sessions.
Quotas & Limits
channels.list or search.list call costs varying units. Monitor your quota in Google Cloud Console.Troubleshooting
Missing YOUTUBE_API_KEY: Ensure the environment variable is set for the agent session.Quota exceeded: Check your Google Cloud Console quota usage.Version History
v1.3.7 (latest)
v1.3.6
resolveChannelId as public tool resolve_channel_id for external use.v1.3.5
check_upcoming_broadcasts to accept display names (e.g., 'Sami Live HK') or handles (e.g., '@chan22') in addition to channel IDs, resolving them automatically via YouTube API search.v1.3.4
v1.3.3
requiredEnvVars now correctly includes YOUTUBE_API_KEYv1.3.2
config.js isolates env access; store.js provides in-memory watchlist (no file I/O)v1.3.1
v1.3.0
get_live_broadcast β detects if a channel is currently live streamingv1.2.0
get_next_broadcast, and check_upcoming_broadcastsβοΈ Configuration
YOUTUBE_API_KEY for the agent sessionπ Tips & Best Practices
Missing YOUTUBE_API_KEY: Ensure the environment variable is set for the agent session.Quota exceeded: Check your Google Cloud Console quota usage.