- Home
- Skills
- Data & Databases
- YouTube Channel ETL
Works with the AI Agents you already use
YouTube Channel ETL
Extract video analytics from any YouTube channel into JSON and an idempotent SQLite database.
Free
YouTube Channel ETL
Example session with this skill installed
Pull the YouTube stats for @MrBeastGaming. I need the full channel history in the database.
- Read your context and instructions
- Compiled the youtube channel etl
I have successfully executed the YouTube ETL for channel @MrBeastGaming. The extraction fetched the full channel history and updated the local SQLite database.
YouTube ETL Results
| Metric | Details |
|---|---|
| Channel Handle | @MrBeastGaming |
| Records Extracted | 142 |
| JSON Output | data/YT_data_MrBeastGaming_2024-05-20.json |
| Database Path | data/youtube.db |
| Table Name | video_stats |
| Status | Success (Idempotent Upsert) |
Data Sample (First 3 Videos)
[
{
"video_id": "z9LzS5JshfA",
"title": "I Spent 100 Hours in a Cardboard Box",
"publishedAt": "2024-05-15T16:00:10Z",
"duration": "PT12M45S",
"viewCount": "12500432",
"likeCount": "850200",
"commentCount": "42001"
},
{
"video_id": "XY7b2vD1r4s",
"title": "Extreme Hide and Seek for $10,000",
"publishedAt": "2024-05-08T16:05:00Z",
"duration": "PT15M20S",
"viewCount": "9800500",
"likeCount": "620000",
"commentCount": "31500"
},
{
"video_id": "j9S7fP1kM2w",
"title": "Don't Leave This Circle or You Lose",
"publishedAt": "2024-05-01T15:55:22Z",
"duration": "PT18M10S",
"viewCount": "15400900",
"likeCount": "980500",
"commentCount": "55000"
}
]
Next steps
- Query the
video_statstable inyoutube.dbto calculate average engagement rates. - Run the ETL with
--no-dbif you only need the latest JSON dump. - Check Google Cloud Console if you receive a quotaExceeded 403 error.
Connects securely to your tools. The creator never sees your data.
About this skill
Manually scraping YouTube video data is tedious and prone to API quota mismanagement. This skill automates the extraction of video-level analytics from any public channel and structures it for immediate use in databases or data science workflows.
What it does
- Channel extraction: Pulls comprehensive video metadata using any public YouTube handle or channel ID.
- Analytics capture: Extracts
viewCount,likeCount,commentCount,duration, andpublishedAtfor every video. - SQLite integration: Loads data into a local SQLite database with idempotent upserts to prevent duplicate records.
- JSON serialization: Generates pretty-printed JSON files for easy consumption by other scripts or web apps.
- Quota optimization: Uses efficient API paths to minimize unit consumption against the daily 10,000 unit limit.
How it works
- API configuration: Set your
YOUTUBE_API_KEYas an environment variable or in a.envfile. - Execution: Run the ETL script via the agent, specifying the target channel handle or ID.
- Data processing: The skill fetches data in pages, processing up to 500 videos by default (configurable).
- Validation: It checks for exit codes to handle quota limits, missing keys, or invalid channel handles gracefully.
Frameworks & tools
The skill is built with Python and utilizes the requests library for API communication, python-dotenv for configuration, and the native sqlite3 module for data persistence.
Why this beats prompting it yourself
Writing a custom script to handle YouTube's paginated API and quota logic is time-consuming. This skill provides a battle-tested ETL pipeline with built-in idempotent database logic, ensuring your data remains clean even after multiple runs.
Use cases
- Build a local database of competitor video performance for trend analysis.
- Export channel metadata to JSON for custom dashboard visualization.
- Track engagement metrics over time by running scheduled refreshes.
- Archive video titles and durations for content audits or SEO research.
Known limitations
Requires a valid Google Cloud YouTube Data API v3 key. Performance is subject to YouTube's daily API quota limits.
Requires a valid Google Cloud YouTube Data API v3 key. Performance is subject to YouTube's daily API quota limits.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed today
- Free with an Agensi account
Requires
Permissions
Allowed Hosts