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
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | Channel ID to list playlists for |
max_results | number | No | Maximum 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
| Parameter | Type | Required | Description |
|---|---|---|---|
video_id | string | Yes | The ID of the video to read comments from. |
max_results | number | No | Maximum 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 trending videos
List the trending videos in a country.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
region_code | string | No | Two-letter country code for the trending list, for example US or GB. |
max_results | number | No | Maximum 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
| Parameter | Type | Required | Description |
|---|---|---|---|
playlist_id | string | Yes | The ID of the playlist to list videos from. |
max_results | number | No | Maximum 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
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Keywords to search for on YouTube. |
max_results | number | No | Maximum number of videos to return |
order | string | No | How 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
| Parameter | Type | Required | Description |
|---|---|---|---|
video_id | string | Yes | The 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
}