youtube
YouTube is the world's largest video-sharing platform, hosting billions of videos across countless topics and serving over 2 billion logged-in monthly users.
With YouTube’s Data API, you can:
Search for videos: Find relevant content using keywords, categories, and filters.
Access detailed metadata: Retrieve information such as titles, descriptions, view counts, and engagement stats.
Monitor trends: Identify what’s trending in a region or topic.
Analyze creators: Track uploads, performance, and audience engagement.
In Agent Forge, the YouTube block allows your agents to search for and analyze YouTube content programmatically. It’s ideal for automations like research, content curation, or data enrichment pipelines that require access to live video information.
Setup (one-time)
To use the YouTube block, you need a YouTube Data API v3 key from Google Cloud. Follow these steps:
Go to the Google Cloud Console → https://console.cloud.google.com/
Click “Select a Project” → New Project and give it a name.
After creation, go to APIs & Services → Library.
Search for “YouTube Data API v3” and click Enable.
Navigate to APIs & Services → Credentials.
Click “Create Credentials” → “API Key”.
Copy the generated API key and use it in your block’s
apiKeyfield.
Important: Keep your API key private. Avoid committing it to public repositories or sharing it in plaintext.
Usage Instructions
This block searches for YouTube videos using Google’s YouTube Data API v3. Your agents can programmatically perform searches, filter results, and analyze the metadata of videos returned by the API.
Typical use cases:
Discover educational or tutorial videos automatically.
Retrieve video titles, URLs, and statistics for dashboards.
Research trending topics across regions.
Tools
youtube_search
youtube_searchSearch for videos on YouTube using the YouTube Data API.
Input
query
string
Yes
The search query (e.g., "AI tutorials")
maxResults
number
No
Maximum number of videos to return (default: 5, max: 50)
apiKey
string
Yes
Your YouTube Data API v3 key
Output
items
json
Array of search result objects including title, description, video ID, and snippet metadata
totalResults
number
Total number of matching results
Notes
Category:
toolsType:
youtube
Was this helpful?
