Skip to main content
YouTube logo

Overview

Add YouTube to any ModuleX agent or workflow. Search videos, inspect channels and playlists, read trending videos and video categories, and fetch public comments against the YouTube Data API v3 (www.googleapis.com/youtube/v3).
Categories: Social Media · Marketing · Content Management · Auth: API Key · Actions: 9

Authentication

API Key Authentication

Authenticate using your YouTube Data API v3 key
1

Step 1

Go to https://console.cloud.google.com and create or select a project
2

Step 2

Open ‘APIs & Services’ > ‘Library’ and enable the ‘YouTube Data API v3’
3

Step 3

Open ‘APIs & Services’ > ‘Credentials’ and create an API key
4

Step 4

Restrict the key to the YouTube Data API v3 (recommended) and copy it
5

Step 5

Paste the API key below

Required Credentials

Available Actions

Parameters

string
required
Search query for YouTube videos
integer
Maximum number of videos to return (1-50) (Default: 5)
string
Page token for pagination (from a previous nextPageToken)
string
Filter results to a specific channel ID (starts with ‘UC’)
string
Only return videos published after this RFC 3339 date (e.g. 2024-01-01T00:00:00Z)
string
Only return videos published before this RFC 3339 date (e.g. 2024-12-31T23:59:59Z)
string
Filter by length: ‘short’ (<4 min), ‘medium’ (4-20 min), ‘long’ (>20 min), ‘any’
string
Sort by: ‘date’, ‘rating’, ‘relevance’ (default), ‘title’, ‘videoCount’, ‘viewCount’
string
Filter by category ID (e.g. ‘10’ Music). Use video_categories to list IDs.
string
Filter by quality: ‘high’ (HD), ‘standard’, ‘any’
string
Filter by captions: ‘closedCaption’ (has captions), ‘none’ (no captions), ‘any’
string
Filter by live status: ‘live’, ‘upcoming’, ‘completed’
string
ISO 3166-1 alpha-2 country code (e.g. ‘US’, ‘GB’, ‘JP’)
string
ISO 639-1 language code for relevance (e.g. ‘en’, ‘es’)
Content filtering: ‘moderate’ (default), ‘none’, ‘strict’

Response

Parameters

string
required
YouTube video ID (11-character string)

Response

Parameters

string
Channel ID starting with ‘UC’ (use either channel_id or username)
string
Channel username (use either channel_id or username)

Response

Parameters

string
required
YouTube channel ID starting with ‘UC’ to get videos from
integer
Maximum number of results to return (1-50) (Default: 10)
string
Sort order: ‘date’, ‘rating’, ‘relevance’, ‘title’, ‘viewCount’ (default ‘date’)
string
Page token for pagination (from a previous nextPageToken)

Response

Parameters

string
required
YouTube channel ID starting with ‘UC’ to get playlists from
integer
Maximum number of results to return (1-50) (Default: 10)
string
Page token for pagination (from a previous nextPageToken)

Response

Parameters

string
required
YouTube playlist ID. Use uploads_playlist_id from channel_info to get all channel videos.
integer
Maximum number of results to return (1-50) (Default: 10)
string
Page token for pagination (from a previous nextPageToken)

Response

Parameters

string
required
YouTube video ID (11-character string)
integer
Maximum number of comments to return (1-100) (Default: 20)
string
Order of comments: ‘time’ (newest first) or ‘relevance’ (most relevant first) (Default: relevance)
string
Page token for pagination (from a previous nextPageToken)

Response

Limits & Quotas

  • Quota model: the YouTube Data API allocates a daily quota (10,000 units by default per project). search costs ~100 units per call; most read endpoints cost ~1 unit. Plan calls accordingly.
  • Result caps: list endpoints accept max_results up to 50 (up to 100 for comments). Use page_token / next_page_token to paginate.
  • Error model: the API returns HTTP 200 with an {"error": {...}} envelope on failure; these (and non-2xx responses and timeouts) are caught and returned as success=False + error rather than raising. Plan for retries on the agent side based on the error string.

Brandfetch

Gamma

Hacker News