> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modulex.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# YouTube Integration for AI Agents & Workflows

> Search YouTube videos, fetch trending videos and video details, list video categories, get channel information, channel videos and playlists, read playlist items, and retrieve video comments via the YouTube Data API v3.

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/placeholder.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=a4046f9cd6d738c81259050e9833913c" alt="YouTube logo" width="72" height="72" data-path="logos/placeholder.svg" />

## 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`).

<Info>
  **Categories**: Social Media · Marketing · Content Management · **Auth**: API Key · **Actions**: 9
</Info>

## Authentication

### API Key Authentication

Authenticate using your YouTube Data API v3 key

<Steps>
  <Step title="Step 1">
    Go to [https://console.cloud.google.com](https://console.cloud.google.com) and create or select a project
  </Step>

  <Step title="Step 2">
    Open 'APIs & Services' > 'Library' and enable the 'YouTube Data API v3'
  </Step>

  <Step title="Step 3">
    Open 'APIs & Services' > 'Credentials' and create an API key
  </Step>

  <Step title="Step 4">
    Restrict the key to the YouTube Data API v3 (recommended) and copy it
  </Step>

  <Step title="Step 5">
    Paste the API key below
  </Step>
</Steps>

#### Required Credentials

| Field           | Description                                            | Required | Format                                    |
| --------------- | ------------------------------------------------------ | -------- | ----------------------------------------- |
| YouTube API Key | Your YouTube Data API v3 key from Google Cloud Console | Yes      | `AIzaSyXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` |

## Available Actions

<AccordionGroup>
  <Accordion title="search — Search for videos on YouTube with advanced filtering by channel, date range, duration, category, quality, captions, and live streams.">
    ### Parameters

    <ResponseField name="query" type="string" required>
      Search query for YouTube videos
    </ResponseField>

    <ResponseField name="max_results" type="integer">
      Maximum number of videos to return (1-50) (Default: `5`)
    </ResponseField>

    <ResponseField name="page_token" type="string">
      Page token for pagination (from a previous nextPageToken)
    </ResponseField>

    <ResponseField name="channel_id" type="string">
      Filter results to a specific channel ID (starts with 'UC')
    </ResponseField>

    <ResponseField name="published_after" type="string">
      Only return videos published after this RFC 3339 date (e.g. 2024-01-01T00:00:00Z)
    </ResponseField>

    <ResponseField name="published_before" type="string">
      Only return videos published before this RFC 3339 date (e.g. 2024-12-31T23:59:59Z)
    </ResponseField>

    <ResponseField name="video_duration" type="string">
      Filter by length: 'short' (\<4 min), 'medium' (4-20 min), 'long' (>20 min), 'any'
    </ResponseField>

    <ResponseField name="order" type="string">
      Sort by: 'date', 'rating', 'relevance' (default), 'title', 'videoCount', 'viewCount'
    </ResponseField>

    <ResponseField name="video_category_id" type="string">
      Filter by category ID (e.g. '10' Music). Use video\_categories to list IDs.
    </ResponseField>

    <ResponseField name="video_definition" type="string">
      Filter by quality: 'high' (HD), 'standard', 'any'
    </ResponseField>

    <ResponseField name="video_caption" type="string">
      Filter by captions: 'closedCaption' (has captions), 'none' (no captions), 'any'
    </ResponseField>

    <ResponseField name="event_type" type="string">
      Filter by live status: 'live', 'upcoming', 'completed'
    </ResponseField>

    <ResponseField name="region_code" type="string">
      ISO 3166-1 alpha-2 country code (e.g. 'US', 'GB', 'JP')
    </ResponseField>

    <ResponseField name="relevance_language" type="string">
      ISO 639-1 language code for relevance (e.g. 'en', 'es')
    </ResponseField>

    <ResponseField name="safe_search" type="string">
      Content filtering: 'moderate' (default), 'none', 'strict'
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "SearchItem": {
          "additionalProperties": false,
          "description": "A single video row in ``search``.",
          "properties": {
            "video_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Video Id"
            },
            "title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Title"
            },
            "description": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Description"
            },
            "thumbnail": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Thumbnail"
            },
            "channel_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Channel Id"
            },
            "channel_title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Channel Title"
            },
            "published_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Published At"
            },
            "live_broadcast_content": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Live Broadcast Content"
            }
          },
          "title": "SearchItem",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "items": {
          "items": {
            "$ref": "#/$defs/SearchItem"
          },
          "title": "Items",
          "type": "array"
        },
        "total_results": {
          "default": 0,
          "title": "Total Results",
          "type": "integer"
        },
        "next_page_token": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Next Page Token"
        }
      },
      "required": [
        "success"
      ],
      "title": "SearchOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="trending — Get the most popular/trending videos on YouTube, optionally filtered by region and video category.">
    ### Parameters

    <ResponseField name="region_code" type="string">
      ISO 3166-1 alpha-2 country code (e.g. 'US', 'GB', 'JP'). Defaults to US.
    </ResponseField>

    <ResponseField name="video_category_id" type="string">
      Filter by category ID (e.g. '10' Music, '20' Gaming)
    </ResponseField>

    <ResponseField name="max_results" type="integer">
      Maximum number of trending videos to return (1-50) (Default: `10`)
    </ResponseField>

    <ResponseField name="page_token" type="string">
      Page token for pagination (from a previous nextPageToken)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "TrendingItem": {
          "additionalProperties": false,
          "description": "A single video row in ``trending``.",
          "properties": {
            "video_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Video Id"
            },
            "title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Title"
            },
            "description": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Description"
            },
            "thumbnail": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Thumbnail"
            },
            "channel_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Channel Id"
            },
            "channel_title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Channel Title"
            },
            "published_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Published At"
            },
            "view_count": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "View Count"
            },
            "like_count": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Like Count"
            },
            "comment_count": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Comment Count"
            },
            "duration": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Duration"
            }
          },
          "title": "TrendingItem",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "items": {
          "items": {
            "$ref": "#/$defs/TrendingItem"
          },
          "title": "Items",
          "type": "array"
        },
        "total_results": {
          "default": 0,
          "title": "Total Results",
          "type": "integer"
        },
        "next_page_token": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Next Page Token"
        }
      },
      "required": [
        "success"
      ],
      "title": "TrendingOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="video_details — Get detailed information about a specific YouTube video including statistics, content details, live streaming info, and metadata.">
    ### Parameters

    <ResponseField name="video_id" type="string" required>
      YouTube video ID (11-character string)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "video_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Video Id"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Title"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description"
        },
        "channel_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Channel Id"
        },
        "channel_title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Channel Title"
        },
        "published_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Published At"
        },
        "duration": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Duration"
        },
        "view_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "View Count"
        },
        "like_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Like Count"
        },
        "comment_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Comment Count"
        },
        "favorite_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Favorite Count"
        },
        "thumbnail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Thumbnail"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "category_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Category Id"
        },
        "definition": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Definition"
        },
        "caption": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Caption"
        },
        "licensed_content": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Licensed Content"
        },
        "privacy_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Privacy Status"
        },
        "live_broadcast_content": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Live Broadcast Content"
        },
        "default_language": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Default Language"
        },
        "default_audio_language": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Default Audio Language"
        },
        "is_live_content": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Is Live Content"
        },
        "scheduled_start_time": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Scheduled Start Time"
        },
        "actual_start_time": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Actual Start Time"
        },
        "actual_end_time": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Actual End Time"
        },
        "concurrent_viewers": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Concurrent Viewers"
        },
        "active_live_chat_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Active Live Chat Id"
        }
      },
      "required": [
        "success"
      ],
      "title": "VideoDetailsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="video_categories — Get the list of video categories available on YouTube to discover valid category IDs for filtering search and trending results.">
    ### Parameters

    <ResponseField name="region_code" type="string">
      ISO 3166-1 alpha-2 country code (e.g. 'US', 'GB', 'JP'). Defaults to US.
    </ResponseField>

    <ResponseField name="hl" type="string">
      Language for category titles (ISO 639-1, e.g. 'en'). Defaults to English.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "VideoCategoryItem": {
          "additionalProperties": false,
          "description": "A single category row in ``video_categories``.",
          "properties": {
            "category_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Category Id"
            },
            "title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Title"
            },
            "assignable": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Assignable"
            }
          },
          "title": "VideoCategoryItem",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "items": {
          "items": {
            "$ref": "#/$defs/VideoCategoryItem"
          },
          "title": "Items",
          "type": "array"
        },
        "total_results": {
          "default": 0,
          "title": "Total Results",
          "type": "integer"
        }
      },
      "required": [
        "success"
      ],
      "title": "VideoCategoriesOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="channel_info — Get detailed information about a YouTube channel including statistics, branding, and content details. Provide either channel_id or username.">
    ### Parameters

    <ResponseField name="channel_id" type="string">
      Channel ID starting with 'UC' (use either channel\_id or username)
    </ResponseField>

    <ResponseField name="username" type="string">
      Channel username (use either channel\_id or username)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "channel_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Channel Id"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Title"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description"
        },
        "subscriber_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Subscriber Count"
        },
        "video_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Video Count"
        },
        "view_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "View Count"
        },
        "published_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Published At"
        },
        "thumbnail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Thumbnail"
        },
        "custom_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Custom Url"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Country"
        },
        "uploads_playlist_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Uploads Playlist Id"
        },
        "banner_image_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Banner Image Url"
        },
        "hidden_subscriber_count": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Hidden Subscriber Count"
        }
      },
      "required": [
        "success"
      ],
      "title": "ChannelInfoOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="channel_videos — Search for videos from a specific YouTube channel with sorting options.">
    ### Parameters

    <ResponseField name="channel_id" type="string" required>
      YouTube channel ID starting with 'UC' to get videos from
    </ResponseField>

    <ResponseField name="max_results" type="integer">
      Maximum number of results to return (1-50) (Default: `10`)
    </ResponseField>

    <ResponseField name="order" type="string">
      Sort order: 'date', 'rating', 'relevance', 'title', 'viewCount' (default 'date')
    </ResponseField>

    <ResponseField name="page_token" type="string">
      Page token for pagination (from a previous nextPageToken)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ChannelVideoItem": {
          "additionalProperties": false,
          "description": "A single video row in ``channel_videos``.",
          "properties": {
            "video_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Video Id"
            },
            "title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Title"
            },
            "description": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Description"
            },
            "thumbnail": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Thumbnail"
            },
            "published_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Published At"
            },
            "channel_title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Channel Title"
            }
          },
          "title": "ChannelVideoItem",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "items": {
          "items": {
            "$ref": "#/$defs/ChannelVideoItem"
          },
          "title": "Items",
          "type": "array"
        },
        "total_results": {
          "default": 0,
          "title": "Total Results",
          "type": "integer"
        },
        "next_page_token": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Next Page Token"
        }
      },
      "required": [
        "success"
      ],
      "title": "ChannelVideosOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="channel_playlists — Get all public playlists from a specific YouTube channel.">
    ### Parameters

    <ResponseField name="channel_id" type="string" required>
      YouTube channel ID starting with 'UC' to get playlists from
    </ResponseField>

    <ResponseField name="max_results" type="integer">
      Maximum number of results to return (1-50) (Default: `10`)
    </ResponseField>

    <ResponseField name="page_token" type="string">
      Page token for pagination (from a previous nextPageToken)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "PlaylistSummary": {
          "additionalProperties": false,
          "description": "A single playlist row in ``channel_playlists``.",
          "properties": {
            "playlist_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Playlist Id"
            },
            "title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Title"
            },
            "description": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Description"
            },
            "thumbnail": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Thumbnail"
            },
            "item_count": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Item Count"
            },
            "published_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Published At"
            },
            "channel_title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Channel Title"
            }
          },
          "title": "PlaylistSummary",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "items": {
          "items": {
            "$ref": "#/$defs/PlaylistSummary"
          },
          "title": "Items",
          "type": "array"
        },
        "total_results": {
          "default": 0,
          "title": "Total Results",
          "type": "integer"
        },
        "next_page_token": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Next Page Token"
        }
      },
      "required": [
        "success"
      ],
      "title": "ChannelPlaylistsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="playlist_items — Get videos from a YouTube playlist. Can be used with a channel's uploads playlist to get all of a channel's videos.">
    ### Parameters

    <ResponseField name="playlist_id" type="string" required>
      YouTube playlist ID. Use uploads\_playlist\_id from channel\_info to get all channel videos.
    </ResponseField>

    <ResponseField name="max_results" type="integer">
      Maximum number of results to return (1-50) (Default: `10`)
    </ResponseField>

    <ResponseField name="page_token" type="string">
      Page token for pagination (from a previous nextPageToken)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "PlaylistItem": {
          "additionalProperties": false,
          "description": "A single video row in ``playlist_items``.",
          "properties": {
            "video_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Video Id"
            },
            "title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Title"
            },
            "description": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Description"
            },
            "thumbnail": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Thumbnail"
            },
            "published_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Published At"
            },
            "channel_title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Channel Title"
            },
            "position": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Position"
            },
            "video_owner_channel_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Video Owner Channel Id"
            },
            "video_owner_channel_title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Video Owner Channel Title"
            }
          },
          "title": "PlaylistItem",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "items": {
          "items": {
            "$ref": "#/$defs/PlaylistItem"
          },
          "title": "Items",
          "type": "array"
        },
        "total_results": {
          "default": 0,
          "title": "Total Results",
          "type": "integer"
        },
        "next_page_token": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Next Page Token"
        }
      },
      "required": [
        "success"
      ],
      "title": "PlaylistItemsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="comments — Get top-level comments from a YouTube video with author details and engagement metrics.">
    ### Parameters

    <ResponseField name="video_id" type="string" required>
      YouTube video ID (11-character string)
    </ResponseField>

    <ResponseField name="max_results" type="integer">
      Maximum number of comments to return (1-100) (Default: `20`)
    </ResponseField>

    <ResponseField name="order" type="string">
      Order of comments: 'time' (newest first) or 'relevance' (most relevant first) (Default: `relevance`)
    </ResponseField>

    <ResponseField name="page_token" type="string">
      Page token for pagination (from a previous nextPageToken)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "CommentItem": {
          "additionalProperties": false,
          "description": "A single top-level comment row in ``comments``.",
          "properties": {
            "comment_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Comment Id"
            },
            "author_display_name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Author Display Name"
            },
            "author_channel_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Author Channel Url"
            },
            "author_profile_image_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Author Profile Image Url"
            },
            "text_display": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Text Display"
            },
            "text_original": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Text Original"
            },
            "like_count": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Like Count"
            },
            "published_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Published At"
            },
            "updated_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Updated At"
            },
            "reply_count": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Reply Count"
            }
          },
          "title": "CommentItem",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "items": {
          "items": {
            "$ref": "#/$defs/CommentItem"
          },
          "title": "Items",
          "type": "array"
        },
        "total_results": {
          "default": 0,
          "title": "Total Results",
          "type": "integer"
        },
        "next_page_token": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Next Page Token"
        }
      },
      "required": [
        "success"
      ],
      "title": "CommentsOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## 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.

## Related integrations

<CardGroup cols={3}>
  <Card title="Brandfetch" href="/integrations/tools/brandfetch" />

  <Card title="Gamma" href="/integrations/tools/gamma" />

  <Card title="Hacker News" href="/integrations/tools/hackernews" />
</CardGroup>

## Links

* [YouTube](https://www.youtube.com)
