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:

  1. Go to the Google Cloud Console → https://console.cloud.google.com/

  2. Click “Select a Project” → New Project and give it a name.

  3. After creation, go to APIs & Services → Library.

  4. Search for “YouTube Data API v3” and click Enable.

  5. Navigate to APIs & Services → Credentials.

  6. Click “Create Credentials” → “API Key”.

  7. Copy the generated API key and use it in your block’s apiKey field.

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

Search for videos on YouTube using the YouTube Data API.

Input

Parameter
Type
Required
Description

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

Parameter
Type
Description

items

json

Array of search result objects including title, description, video ID, and snippet metadata

totalResults

number

Total number of matching results

Notes

  • Category: tools

  • Type: youtube

Was this helpful?