Skip to content

YouTube

Access and manage YouTube data through the YouTube Data API v3.

This source provides a single flexible api_youtube tool that accepts:

  • path: API endpoint (e.g., “/youtube/v3/channels”)
  • method: HTTP method (GET, POST, etc.)
  • params: Request body or query parameters
EndpointMethodDescription
/youtube/v3/channelsGETList channels (use mine=true for your channel)
/youtube/v3/videosGETList videos by ID or chart
/youtube/v3/searchGETSearch for videos, channels, playlists
/youtube/v3/playlistsGETList playlists
/youtube/v3/playlistItemsGETList videos in a playlist
/youtube/v3/commentThreadsGETList comment threads on a video
/youtube/v3/subscriptionsGETList subscriptions
  • part (required): Comma-separated list of resource parts (e.g., snippet, statistics, contentDetails)
  • mine=true: Filter to your own channel’s resources
  • channelId: Filter by specific channel
  • maxResults: Number of results (1-50, default 5)
  • pageToken: Pagination token from previous response
  • Quota: YouTube API has a daily quota of 10,000 units. Search costs 100 units, most other reads cost 1-3 units. Be mindful of quota usage.
  • Parts: Always specify only the part values you need to minimize quota cost.
  • Privacy: This source accesses YouTube account data. All data remains local.

Required config.json:

{
"name": "YouTube",
"slug": "youtube",
"enabled": true,
"provider": "google",
"type": "api",
"api": {
"baseUrl": "https://youtube.googleapis.com/",
"authType": "bearer",
"googleService": "youtube",
"googleOAuthClientId": "your-client-id.apps.googleusercontent.com",
"googleOAuthClientSecret": "your-client-secret"
}
}

See Google OAuth Setup for instructions on creating OAuth credentials, then use source_google_oauth_trigger to start the OAuth flow.

“YouTube Data API v3 has not been used in project” error

Section titled ““YouTube Data API v3 has not been used in project” error”

The YouTube Data API needs to be enabled in your Google Cloud project:

  1. Visit the YouTube Data API page
  2. Click Enable
  3. Wait 1-2 minutes for changes to propagate

“Google OAuth credentials not configured” error

Section titled ““Google OAuth credentials not configured” error”

Add your OAuth client ID and secret to the source’s config.json under the api section.

  • 10,000 quota units per day
  • Search requests cost 100 units each
  • Most read requests cost 1-3 units
  • Write requests cost 50 units each