#
YouTube
Monitor your favorite YouTube channels, track new uploads, analyze your subscriptions, and discover content with AI-powered insights.
#
Overview
Connect Weavestream to YouTube to monitor:
- 📺 Channel Videos - Latest uploads from any channel
- 🔔 Subscriptions - New videos from channels you follow
- 👍 Liked Videos - Your liked video history
- 📝 Playlists - Videos in any playlist
- 🎬 Your Channel - Your own uploads and analytics
- 💬 Comments - Comments on videos
- 🔥 Trending - Popular videos in your region
Estimated Setup Time: 10 minutes
#
Prerequisites
- Google account
- YouTube account (if monitoring your own content)
- Weavestream installed on your Mac
#
Part 1: Get Your YouTube API Key
#
Step 1: Go to Google Cloud Console
- Go to https://console.cloud.google.com
- Sign in with your Google account
#
Step 2: Create a New Project
- Click the project dropdown at the top (says "Select a project")
- Click "New Project"
- Project name:
Weavestream YouTube Monitor - Click "Create"
- Wait for project creation (takes a few seconds)
- Select your new project from the dropdown
#
Step 3: Enable YouTube Data API v3
- In the left sidebar, click "APIs & Services" → "Library"
- Search for "YouTube Data API v3"
- Click on "YouTube Data API v3"
- Click "Enable"
- Wait for API to be enabled
#
Step 4: Create API Credentials
- Go to "APIs & Services" → "Credentials"
- Click "+ Create Credentials"
- Select "API key"
- Your API key will be created and displayed
📋 Copy your API key:
- Example:
AIzaSyAbc123XyZ789-RandomString456 - Click the copy icon or manually copy it
Important: Click "Restrict Key" to secure it.
#
Step 5: Restrict Your API Key (Recommended)
- After creating, click "Edit API key" (or find it in credentials list)
- Under "API restrictions":
- Select "Restrict key"
- Check "YouTube Data API v3"
- Under "Application restrictions" (optional but recommended):
- Select "HTTP referrers (web sites)"
- Or "IP addresses" if you want to lock it to your network
- Or leave as "None" for testing
- Click "Save"
#
Part 2: Find Channel IDs
To monitor specific YouTube channels, you need their Channel ID.
#
Method 1: Via Channel URL
If channel URL looks like:
youtube.com/channel/UC4PooiX37Pld1T8J5SYT-SQ
Channel ID is: UC4PooiX37Pld1T8J5SYT-SQ (everything after /channel/)
#
Method 2: Via Custom URL
If channel URL looks like:
youtube.com/@mkbhd
youtube.com/c/Mkbhd
youtube.com/user/marquesbrownlee
You need to convert it to a Channel ID:
Steps:
- Go to the channel's page
- View page source (Right-click → View Page Source)
- Search for
"channelId"or"externalId" - Copy the ID (starts with
UC)
Or use this trick:
- Visit:
https://www.youtube.com/@CHANNEL_HANDLE - Click any video
- Look at video description → Click channel name
- URL will now show:
youtube.com/channel/UC...
#
Method 3: Via API
Use YouTube API to search:
GET https://www.googleapis.com/youtube/v3/search?part=snippet&q=MKBHD&type=channel&key=YOUR_API_KEY
Look for channelId in response.
#
Method 4: Use Online Tool
Go to: https://commentpicker.com/youtube-channel-id.php
- Enter any channel URL
- Get the Channel ID instantly
#
Part 3: Find Playlist IDs
To monitor specific playlists, you need Playlist IDs.
#
From Playlist URL:
URL format:
youtube.com/playlist?list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf
Playlist ID is: PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf (everything after list=)
#
Special Playlists:
Every channel has automatic playlists:
- Uploads:
UU+ rest of Channel ID- Example: Channel
UC4PooiX37Pld1T8J5SYT-SQ→ UploadsUU4PooiX37Pld1T8J5SYT-SQ - (Replace first
UCwithUU)
- Example: Channel
- Liked Videos (Your Own): Use authenticated API call to get your liked videos
#
Part 4: Configure Weavestream
#
Step 1: Add YouTube as a Source
- Open Weavestream
- Click the "+" button in the sidebar
- Select "Add Source"
- Fill in the source details:
- Name:
YouTube - Base URL:
https://www.googleapis.com/youtube/v3 - Auth Type:
Query Parameter - Query Param Name:
key - Query Param Value: Paste your API key
- Icon: Select
play.rectangleor customyoutubeicon if available - Color: Choose your preference (suggested:
#FF0000- YouTube red, or#FF4500) - Refresh Interval:
120minutes (2 hours - YouTube doesn't change constantly)
- Name:
- Click "Add" or "Save"
#
Step 2: Add Endpoints
Now we'll add endpoints to monitor different YouTube content.
#
Endpoint 1: Channel Latest Videos
Get the latest uploads from any channel.
Configuration:
- Name:
[Channel Name] - Latest Videos - Path:
/search - Method:
GET
Query Parameters:
part:snippet,idchannelId:UC4PooiX37Pld1T8J5SYT-SQ(replace with your channel ID)order:date(newest first)type:videomaxResults:25(up to 50 max)
Field Mapping:
- Array Path:
items - ID Field:
id.videoId - Title Field:
snippet.title - Date Field:
snippet.publishedAt - Summary Fields:
snippet.description,snippet.channelTitle - Status Field: (none)
Retention Mode: Keep All (preserve video history)
Repeat this endpoint for each channel you want to monitor.
#
Endpoint 2: Playlist Videos
Get all videos from a specific playlist.
Configuration:
- Name:
[Playlist Name] Videos - Path:
/playlistItems - Method:
GET
Query Parameters:
part:snippet,contentDetailsplaylistId:PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf(your playlist ID)maxResults:50
Field Mapping:
- Array Path:
items - ID Field:
id - Title Field:
snippet.title - Date Field:
snippet.publishedAt - Summary Fields:
snippet.description,snippet.channelTitle,snippet.position(position in playlist) - Status Field: (none)
Retention Mode: Delete on Sync (playlist changes)
#
Endpoint 3: Trending Videos
See what's trending in your region.
Configuration:
- Name:
Trending Videos - Path:
/videos - Method:
GET
Query Parameters:
part:snippet,statistics,contentDetailschart:mostPopularregionCode:US(or your country:GB,CA,AU, etc.)maxResults:25
Field Mapping:
- Array Path:
items - ID Field:
id - Title Field:
snippet.title - Date Field:
snippet.publishedAt - Summary Fields:
snippet.description,statistics.viewCount,statistics.likeCount - Status Field: (none)
Retention Mode: Delete on Sync (trending changes frequently)
#
Endpoint 4: Search Videos
Search YouTube for specific topics.
Configuration:
- Name:
Search - [Topic] - Path:
/search - Method:
GET
Query Parameters:
part:snippetq:machine learning(your search term)type:videoorder:relevance(ordate,viewCount,rating)maxResults:25
Optional Parameters:
publishedAfter:2024-01-01T00:00:00Z(ISO 8601 format - only recent videos)videoDuration:medium(any, short, medium, long)videoDefinition:high(any, high)
Field Mapping: Same as "Channel Latest Videos"
Use Case: Create separate endpoints for topics you're interested in:
- "Machine Learning Tutorials"
- "Guitar Lessons"
- "Cooking Recipes"
#
Endpoint 5: Channel Statistics
Get detailed stats about a channel (subscribers, video count, views).
Configuration:
- Name:
[Channel Name] - Stats - Path:
/channels - Method:
GET
Query Parameters:
part:snippet,statistics,contentDetailsid:UC4PooiX37Pld1T8J5SYT-SQ(channel ID)
Field Mapping:
- Array Path:
items - ID Field:
id - Title Field:
snippet.title - Date Field:
snippet.publishedAt - Summary Fields:
statistics.subscriberCountstatistics.videoCountstatistics.viewCount
- Status Field: (none)
Retention Mode: Keep All (track subscriber growth over time)
#
Endpoint 6: Video Details
Get detailed information about specific videos.
Configuration:
- Name:
Video Details - Path:
/videos - Method:
GET
Query Parameters:
part:snippet,statistics,contentDetails,statusid:dQw4w9WgXcQ,jNQXAC9IVRw(comma-separated video IDs)
Field Mapping:
- Array Path:
items - ID Field:
id - Title Field:
snippet.title - Date Field:
snippet.publishedAt - Summary Fields:
statistics.viewCountstatistics.likeCountstatistics.commentCountcontentDetails.duration(ISO 8601 format)
- Status Field: (none)
#
Endpoint 7: Video Comments
Get comments from a specific video.
Configuration:
- Name:
Comments - [Video Title] - Path:
/commentThreads - Method:
GET
Query Parameters:
part:snippetvideoId:dQw4w9WgXcQ(the video ID)order:relevance(ortime)maxResults:100
Field Mapping:
- Array Path:
items - ID Field:
id - Title Field:
snippet.topLevelComment.snippet.authorDisplayName - Date Field:
snippet.topLevelComment.snippet.publishedAt - Summary Fields:
snippet.topLevelComment.snippet.textDisplay - Status Field: (none)
#
Endpoint 8: Your Subscriptions (Requires OAuth)
Note: This requires OAuth authentication, not just API key.
If you set up OAuth (see Advanced section):
Configuration:
- Path:
/subscriptions - Query Parameters:
part:snippetmine:truemaxResults:50
Gets channels you're subscribed to.
#
Part 5: Understanding YouTube API Data
#
Video Search Result Structure
{
"items": [
{
"kind": "youtube#searchResult",
"id": {
"kind": "youtube#video",
"videoId": "dQw4w9WgXcQ"
},
"snippet": {
"publishedAt": "2009-10-25T06:57:33Z",
"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
"title": "Rick Astley - Never Gonna Give You Up",
"description": "The official video for...",
"thumbnails": {
"default": { "url": "https://i.ytimg.com/..." },
"high": { "url": "https://i.ytimg.com/..." }
},
"channelTitle": "Rick Astley"
}
}
],
"nextPageToken": "CAUQAA",
"pageInfo": {
"totalResults": 1000000,
"resultsPerPage": 5
}
}
#
Video Details Structure
{
"items": [
{
"id": "dQw4w9WgXcQ",
"snippet": {
"publishedAt": "2009-10-25T06:57:33Z",
"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
"title": "Rick Astley - Never Gonna Give You Up",
"description": "...",
"thumbnails": {...},
"channelTitle": "Rick Astley",
"tags": ["rick astley", "never gonna give you up"],
"categoryId": "10"
},
"statistics": {
"viewCount": "1400000000",
"likeCount": "15000000",
"commentCount": "2500000"
},
"contentDetails": {
"duration": "PT3M33S",
"definition": "hd",
"caption": "false"
}
}
]
}
Key Fields:
id.videoIdorid- Unique video identifiersnippet.title- Video titlesnippet.publishedAt- Upload timestampsnippet.description- Video descriptionstatistics.viewCount- Number of viewscontentDetails.duration- Video length (ISO 8601 format: PT3M33S = 3 min 33 sec)
#
Part 6: Create Useful Filters
#
Filter 1: Videos This Week
- Under YouTube source, click "+" → "New Filter"
- Name:
Uploaded This Week - Select Endpoints: All channel endpoints
- Add Condition:
- Field:
snippet.publishedAt - Operator:
in last - Value:
7 days
- Field:
- Save
#
Filter 2: High View Count (Viral Videos)
- Create new filter
- Name:
Viral Videos (1M+ views) - Select Endpoint: Trending or Video Details endpoints
- Add Condition:
- Field:
statistics.viewCount - Type: Number
- Operator:
greater than - Value:
1000000
- Field:
- Save
#
Filter 3: Short Videos (<5 minutes)
- Create new filter
- Name:
Short Videos - Select Endpoints: Video Details endpoint
- Add Condition:
- Field:
contentDetails.duration - Operator:
contains - Value:
PT(all durations start with this)
- Field:
Note: Duration filtering is complex with ISO 8601 format. Better to ask AI: "Show me videos under 5 minutes"
#
Filter 4: Specific Channel
- Create new filter
- Name:
[Channel Name] Videos - Select Endpoints: All video search endpoints
- Add Condition:
- Field:
snippet.channelTitle - Operator:
equals - Value:
MKBHD(channel name)
- Field:
- Save
#
Filter 5: High Engagement (Likes/Views Ratio)
Complex - use AI for this: Ask: "Show me videos where likes are more than 5% of views"
#
Part 7: Use AI to Discover Content
Now you can ask intelligent questions about YouTube!
#
Example Questions:
Discovery:
- "What videos did MKBHD upload this week?"
- "Show me trending tech videos"
- "Find cooking tutorials under 10 minutes"
- "What's the most viewed video from [channel]?"
Channel Analysis:
- "How many subscribers does [channel] have?"
- "Compare view counts between [channel A] and [channel B]"
- "What's the average video length for [channel]?"
- "Which channel uploads most frequently?"
Content Planning (for creators):
- "What topics are trending in my niche?"
- "Show me videos with high engagement ratios"
- "Find successful video titles in [category]"
- "What's the best upload time based on trending videos?"
Watch Planning:
- "Find highly rated videos I haven't seen"
- "Show me educational content from today"
- "What short videos can I watch during lunch?"
- "Recommend videos based on [topic]"
Research:
- "Find all videos mentioning 'ChatGPT'"
- "Show me videos with over 1M views about Python"
- "What are the most commented videos this month?"
- "Find videos with specific tags"
#
Part 8: Advanced Configuration
#
Query Parameter Options
YouTube API supports many parameters:
Search Filters:
q: search term - What to search for
channelId: UC... - Limit to specific channel
channelType: any - any, show (official channels)
eventType: live - Only live streams
order: date - date, rating, relevance, title, viewCount
publishedAfter: ISO 8601 - Only videos after date
publishedBefore: ISO 8601 - Only videos before date
regionCode: US - Country code
relevanceLanguage: en - Language preference
safeSearch: moderate - none, moderate, strict
type: video - video, channel, playlist
videoCategoryId: 10 - Category (10=Music, 20=Gaming, etc.)
videoDefinition: high - any, high, standard
videoDuration: medium - any, short (<4min), medium (4-20min), long (>20min)
videoEmbeddable: true - Only embeddable videos
videoLicense: creativeCommon - any, creativeCommon, youtube
Pagination:
maxResults: 50 - Results per page (max 50)
pageToken: CAUQAA - For next/prev page
#
Video Duration Format
YouTube uses ISO 8601 duration format:
Format: PT[hours]H[minutes]M[seconds]S
Examples:
PT3M33S= 3 minutes 33 secondsPT1H30M= 1 hour 30 minutesPT45S= 45 secondsPT2H5M10S= 2 hours 5 minutes 10 seconds
Parsing: You'll need to parse this format for filtering. Let AI handle duration queries.
#
Video Categories
Common category IDs:
1- Film & Animation2- Autos & Vehicles10- Music15- Pets & Animals17- Sports19- Travel & Events20- Gaming22- People & Blogs23- Comedy24- Entertainment25- News & Politics26- Howto & Style27- Education28- Science & Technology
Get full list:
GET /videoCategories?part=snippet®ionCode=US
#
Pagination Handling
YouTube uses token-based pagination:
Response includes:
{
"nextPageToken": "CAUQAA",
"prevPageToken": "CAIQAA",
"pageInfo": {
"totalResults": 1000000,
"resultsPerPage": 25
}
}
To get next page:
Add pageToken=CAUQAA to your next request.
Weavestream should handle this automatically.
#
Part 9: OAuth Setup (Optional - For Personal Data)
If you want to access your own subscriptions, liked videos, or upload to your channel, you need OAuth instead of just an API key.
#
When to Use OAuth:
API Key (Simple): Public data only
- Any channel's videos
- Public playlists
- Trending videos
- Search results
OAuth (Advanced): Personal data
- Your subscriptions
- Your liked videos
- Your watch history
- Your channel analytics
- Commenting/liking (write access)
#
OAuth Setup Steps:
- Google Cloud Console → Your project → "Credentials"
- Create Credentials → "OAuth 2.0 Client ID"
- Application type: "Desktop app"
- Download the credentials JSON
- In Weavestream:
- Auth Type: OAuth
- OAuth Flow: Authorization Code
- Authorization URL:
https://accounts.google.com/o/oauth2/v2/auth - Token URL:
https://oauth2.googleapis.com/token - Scopes:
https://www.googleapis.com/auth/youtube.readonly - Add Client ID and Client Secret from downloaded JSON
#
Troubleshooting
#
Issue: "API key not valid"
Solution:
- Verify API key is correct (no extra spaces)
- Check API key restrictions don't block your request
- Ensure YouTube Data API v3 is enabled in your project
- Try creating a new unrestricted API key for testing
#
Issue: "Quota exceeded"
Solution: YouTube API has daily quota limits:
- Free tier: 10,000 units/day
- Most read operations cost 1-5 units
- Search costs 100 units per request!
Best practices:
- Increase refresh interval (2-4 hours minimum)
- Use
/videosinstead of/searchwhen possible (cheaper) - Reduce
maxResultsparameter - Consider caching results
- Request quota increase: https://support.google.com/youtube/contact/yt_api_form
#
Issue: "The request cannot be completed because you have exceeded your quota"
Solution:
- Wait until midnight Pacific Time (quota resets daily)
- Check quota usage: Google Cloud Console → APIs & Services → YouTube Data API v3 → Quotas
- Optimize endpoints to use fewer units
- Request quota increase (can take days to approve)
#
Issue: "No results returned" or empty items array
Solution:
- Verify channel ID is correct (starts with
UC) - Check
partparameter includessnippetandid - Ensure
type=videofor video searches - Try increasing
maxResults - Check array path is set to
items
#
Issue: "Channel ID not found"
Solution:
- Verify you're using Channel ID (UC...), not username
- Use one of the methods in Part 2 to find correct Channel ID
- Try accessing channel via browser first to confirm it exists
- Some private channels may not be accessible via API
#
API Rate Limits & Costs
#
Quota Costs (per request):
Daily limit: 10,000 units (free tier)
Example daily usage:
- 100 searches = 10,000 units (limit reached!)
- 100 video listings = 100 units
- 50 searches + 50 video lists = 5,050 units
Recommendation:
- Minimize use of
/searchendpoint (costs 100 units!) - Use direct endpoints when possible (
/videos,/channels,/playlistItems) - Increase refresh intervals
- Request quota increase if needed
#
Security Best Practices
#
✅ Do:
- Restrict API key to YouTube Data API v3 only
- Add IP address restrictions if accessing from fixed location
- Create separate API keys for different uses
- Monitor quota usage regularly
- Rotate API keys every 90 days
- Store credentials securely (Weavestream uses macOS Keychain)
#
❌ Don't:
- Share API keys publicly (GitHub, forums, etc.)
- Embed keys in public websites
- Use same key for multiple unrelated projects
- Leave keys unrestricted
- Commit keys to version control
#
Additional Resources
#
YouTube API Documentation:
- Main Docs: https://developers.google.com/youtube/v3
- API Explorer: https://developers.google.com/youtube/v3/docs
- Quota Calculator: https://developers.google.com/youtube/v3/determine_quota_cost
- Support: https://support.google.com/youtube/
#
Useful Endpoints:
#
Summary Checklist
Before you finish, verify:
- ✅ Google Cloud project created
- ✅ YouTube Data API v3 enabled
- ✅ API key created and copied
- ✅ API key restrictions configured
- ✅ Channel IDs found for channels you want to monitor
- ✅ YouTube source added to Weavestream
- ✅ At least one endpoint configured (Channel Latest Videos)
- ✅ Array path set to
items - ✅ Field mappings working (video titles and dates visible)
- ✅ Refresh interval set to 2+ hours (to preserve quota)
- ✅ Smart filters created for content discovery
- ✅ Tested AI questions about your YouTube content
You're all set! Discover and monitor YouTube content with AI-powered insights! 📺
Last updated: February 2026 YouTube Data API version: v3