Lodol Docs

YouTube

API actions for the YouTube integration.

YouTube

Search and explore videos, channels, playlists, and comments on YouTube.


Get channel details

Look up a channel's name, description, subscriber count, and view count.

Parameters

ParameterTypeRequiredDescription
channel_idstringYesThe ID of the channel to look up.

Response

{
  "channel_id": {
    "id": "abc123",
    "name": "Sample"
  },
  "description": "Sample text content",
  "related_playlists": "example_value",
  "subscriber_count": 1,
  "title": "Sample Item",
  "video_count": 1,
  "view_count": 1
}

List channel playlists

List playlists for a YouTube channel.

Parameters

ParameterTypeRequiredDescription
channel_idstringYesChannel ID to list playlists for
max_resultsnumberNoMaximum number of playlists to return

Response

{
  "items": [
    {
      "description": "Sample text content",
      "item_count": 1,
      "playlist_id": "PLabc123xyz456",
      "title": "Sample Item"
    }
  ],
  "next_page_token": "example_value",
  "status": "success"
}

List video comments

List the main comments on a video, not the replies.

Parameters

ParameterTypeRequiredDescription
video_idstringYesThe ID of the video to read comments from.
max_resultsnumberNoMaximum number of comments to return

Response

{
  "items": [
    {
      "author": "John Doe",
      "comment_id": "Ugxabc123xyz",
      "like_count": 1,
      "published_at": "2024-01-15T10:30:00Z",
      "reply_count": 0,
      "text": "Sample text content"
    }
  ],
  "next_page_token": "example_value",
  "status": "success"
}

List the trending videos in a country.

Parameters

ParameterTypeRequiredDescription
region_codestringNoTwo-letter country code for the trending list, for example US or GB.
max_resultsnumberNoMaximum number of trending videos to return

Response

{
  "items": [
    {
      "channel_id": "UCaBc123XyZ456",
      "channel_title": "Sample Item",
      "published_at": "2024-01-15T10:30:00Z",
      "title": "Sample Item",
      "video_id": "dQw4w9WgXcQ",
      "view_count": 1
    }
  ],
  "next_page_token": "example_value",
  "status": "success"
}

List videos in a playlist

List the videos in a YouTube playlist.

Parameters

ParameterTypeRequiredDescription
playlist_idstringYesThe ID of the playlist to list videos from.
max_resultsnumberNoMaximum number of videos to return

Response

{
  "items": [
    {
      "channel_title": "Sample Item",
      "description": "Sample text content",
      "position": 0,
      "title": "Sample Item",
      "video_id": "dQw4w9WgXcQ"
    }
  ],
  "next_page_token": "example_value",
  "status": "success"
}

Search for videos

Search YouTube for videos that match your keywords.

Parameters

ParameterTypeRequiredDescription
querystringYesKeywords to search for on YouTube.
max_resultsnumberNoMaximum number of videos to return
orderstringNoHow to sort the results, for example by relevance or date.

Response

{
  "items": [
    {
      "channel_id": "UCaBc123XyZ456",
      "channel_title": "Sample Item",
      "description": "Sample text content",
      "published_at": "2024-01-15T10:30:00Z",
      "title": "Sample Item",
      "video_id": "dQw4w9WgXcQ"
    }
  ],
  "next_page_token": "example_value",
  "status": "success"
}

Get video details

Look up a video's title, description, view count, likes, and length.

Parameters

ParameterTypeRequiredDescription
video_idstringYesThe ID of the YouTube video to look up.

Response

{
  "comment_count": 1,
  "description": "Sample text content",
  "duration": "PT4M33S",
  "like_count": 1,
  "title": "Sample Item",
  "video_id": {
    "id": "abc123",
    "name": "Sample"
  },
  "view_count": 1
}

On this page