YouTube
API actions for the YouTube integration.
YouTube
Search and explore content from YouTube Data API v3.
Get channel details
Retrieve statistics and snippet information for a channel.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | Channel ID to retrieve details for |
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 comment threads
Fetch top-level comment threads for a video.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
video_id | string | Yes | Video ID to fetch comment threads for |
max_results | number | No | Maximum number of comment threads 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 trending videos for a region using the mostPopular chart.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
region_code | string | No | Two-letter region code, |
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 playlist items
List items within a specific YouTube playlist.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
playlist_id | string | Yes | Playlist ID to retrieve items from |
max_results | number | No | Maximum number of items 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 by keyword and relevance.
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 | Sorting order |
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
Retrieve snippet, statistics, and duration for a video.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
video_id | string | Yes | YouTube video ID to inspect |
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
}