Skip to main content

Get YouTube Videos

The Get YouTube Videos node allows you to retrieve videos from YouTube based on different search criteria and filters.

Overview

This node enables you to:
  • Search for videos
  • Get channel videos
  • Retrieve playlist videos
  • Filter by criteria
  • Get video details

Configuration

ParameterTypeDescription
Search TypeStringType of video search (search/channel/playlist)
QueryStringSearch query or resource ID
FiltersObjectSearch filters and criteria
Max ResultsNumberMaximum number of results to return
Include DetailsBooleanWhether to include full video details

Example Usage

{
  "search_type": "search",
  "query": "programming tutorials",
  "max_results": 50,
  "include_details": true
}

Channel Videos

{
  "search_type": "channel",
  "channel_id": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
  "filters": {
    "order": "date",
    "published_after": "2024-01-01T00:00:00Z",
    "published_before": "2024-12-31T23:59:59Z"
  },
  "max_results": 100
}

Playlist Videos

{
  "search_type": "playlist",
  "playlist_id": "PLCx5faAVGx4G",
  "max_results": 50,
  "include_details": true
}

Search Filters

Date Filters

{
  "filters": {
    "published_after": "2024-01-01T00:00:00Z",
    "published_before": "2024-12-31T23:59:59Z"
  }
}

Content Filters

{
  "filters": {
    "duration": "long",
    "definition": "high",
    "caption": true,
    "license": "creativeCommon",
    "type": "video"
  }
}

Order Options

{
  "filters": {
    "order": "relevance", // date, rating, viewCount, title
    "safe_search": "moderate",
    "region_code": "US",
    "relevance_language": "en"
  }
}

Response Format

{
  "items": [
    {
      "id": {
        "kind": "youtube#video",
        "videoId": "string"
      },
      "snippet": {
        "publishedAt": "datetime",
        "channelId": "string",
        "title": "string",
        "description": "string",
        "thumbnails": {
          "default": {
            "url": "string",
            "width": 120,
            "height": 90
          }
        },
        "channelTitle": "string",
        "tags": ["string"]
      },
      "statistics": {
        "viewCount": "number",
        "likeCount": "number",
        "commentCount": "number"
      },
      "contentDetails": {
        "duration": "string",
        "dimension": "2d",
        "definition": "hd",
        "caption": "true",
        "licensedContent": true
      }
    }
  ],
  "pageInfo": {
    "totalResults": "number",
    "resultsPerPage": "number"
  },
  "nextPageToken": "string"
}

Error Handling

Common error scenarios:
  • Invalid search parameters
  • Quota exceeded
  • Private videos
  • Deleted content
  • Region restrictions
I