Gen6

YouTube

Search for videos on 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 Gen6, 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 Consolehttps://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.

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

Search for videos on YouTube using the YouTube Data API.

Input

ParameterTypeRequiredDescription
querystringYesThe search query (e.g., "AI tutorials")
maxResultsnumberNoMaximum number of videos to return (default: 5, max: 50)
apiKeystringYesYour YouTube Data API v3 key

Output

ParameterTypeDescription
itemsjsonArray of search result objects including title, description, video ID, and snippet metadata
totalResultsnumberTotal number of matching results

Screenshot

YouTube block screenshot

Notes

  • Category: tools
  • Type: youtube
YouTube