Skip to main content

YouTube Data API

This page contains the setup guide and reference information for the YouTube Data API source connector.

The YouTube Data API v3 provides access to YouTube data, such as videos, playlists, channels, comments, and simple stats. This connector is a simpler version of the YouTube connector. If you need more detailed reports from your channel, use the YouTube Analytics Connector.

Prerequisites

  • One or more YouTube Channel IDs you want to sync data from
  • (For Airbyte Open Source) One of the following authentication methods:
    • A Google API Key with the YouTube Data API v3 enabled
    • OAuth 2.0 credentials (Client ID, Client Secret, and Refresh Token)

Setup guide

Find your YouTube Channel IDs

  1. Go to YouTube and navigate to the channel you want to sync.
  2. The Channel ID is in the URL: https://www.youtube.com/channel/CHANNEL_ID.
  3. Alternatively, you can find it in YouTube Studio under Settings > Channel > Advanced settings.

For Airbyte Cloud

  1. Log into your Airbyte Cloud account.
  2. Click Sources and then click + New source.
  3. Select YouTube Data API from the list.
  4. Enter a name for your source.
  5. Choose your authentication method:
    • For OAuth 2.0: Click Sign in with Google to authenticate your Google account.
    • For API Key: Enter your Google API key.
  6. Enter one or more Channel IDs to sync data from.
  7. Click Set up source.

For Airbyte Open Source

Create credentials

You can authenticate using either an API Key or OAuth 2.0.

Option A: API Key (simpler setup, public data only)

  1. Go to the Google Cloud Console.
  2. Create a new project or select an existing one.
  3. Navigate to APIs & Services > Library and enable the YouTube Data API v3.
  4. Go to APIs & Services > Credentials.
  5. Click Create Credentials > API key.
  6. Copy the generated API key.
  7. (Recommended) Click Restrict key to limit the key's usage to the YouTube Data API v3.

Option B: OAuth 2.0 (required for accessing private data)

  1. Go to the Google Cloud Console.
  2. Create a new project or select an existing one.
  3. Navigate to APIs & Services > Library and enable the YouTube Data API v3.
  4. Go to APIs & Services > Credentials.
  5. Click Create Credentials > OAuth client ID.
  6. Configure the OAuth consent screen if prompted.
  7. Copy the Client ID and Client Secret.
  8. Use these credentials to obtain a refresh token. Refer to Google's OAuth 2.0 documentation for detailed instructions.

Set up the connector

  1. In Airbyte, go to Sources and click + New source.
  2. Select YouTube Data API from the list.
  3. Enter a name for your source.
  4. Choose your authentication method and enter the required credentials.
  5. Enter one or more Channel IDs to sync data from.
  6. Click Set up source.

Supported sync modes

The YouTube Data API source connector supports the following sync modes:

Supported streams

Stream NamePrimary KeyPaginationSupports Full SyncSupports Incremental
videovideoIdDefaultPaginatorYesNo
videosDefaultPaginatorYesNo
channelsidDefaultPaginatorYesNo
commentsDefaultPaginatorYesNo
channel_commentsDefaultPaginatorYesNo

Stream descriptions

  • video: Detailed information about videos from the specified channels. This stream uses the videos parent stream to first discover video IDs, then fetches full video details for each. Data includes snippet information (title, description, thumbnails, publish date, tags, category, language settings), content details (duration, dimension, definition, caption availability, region restrictions), statistics (view count, like count, comment count), player information (embed HTML), and status (upload status, privacy status, license, embeddable, made for kids).
  • videos: A list of video IDs discovered by searching the specified channels. This stream is used internally by the video and comments streams to identify which videos to fetch data for.
  • channels: Information about the specified YouTube channels. Data includes snippet information (title, description, custom URL, country, thumbnails), content details (related playlists), statistics (subscriber count, view count, video count), branding settings (channel keywords, trailer, default language), topic details (topic categories), status (privacy status, made for kids), localizations, and content owner details.
  • comments: Comment threads on individual videos from the specified channels. For each video discovered in the channel, this stream fetches the top-level comments and their replies.
  • channel_comments: All comment threads related to the specified channels, including comments on the channel's videos and comments that mention the channel. This provides a broader view of channel engagement than the comments stream.

Limitations and considerations

  • The YouTube Data API has quota limits. Each API request costs a certain number of quota units, and the default quota is 10,000 units per day. The search endpoint used by the videos stream has a higher quota cost (100 units per request) compared to other endpoints.
  • API keys can only access public data. To access private data, you must use OAuth 2.0 authentication.
  • When using OAuth 2.0, the connector requests the youtube.force-ssl scope, which provides read and write access to YouTube resources. This scope is required even though the connector only reads data.
  • The connector does not support service account authentication because the YouTube Data API does not support this method for most operations.

Reference

Config fields reference

Field
Type
Property name
Channel IDs
required
array
channel_ids
object
credentials

Changelog

Expand to review
VersionDatePull RequestSubject
0.0.442025-12-1771016Fixed schemas
0.0.432025-12-1770971Add acceptance tests
0.0.422025-11-2369315Add OAuth 2.0 support
0.0.412025-11-2570079Update dependencies
0.0.402025-11-1869532Update dependencies
0.0.392025-10-2968942Update dependencies
0.0.382025-10-2168456Update dependencies
0.0.372025-10-1467987Update dependencies
0.0.362025-10-0767241Update dependencies
0.0.352025-09-3066846Update dependencies
0.0.342025-09-2466475Update dependencies
0.0.332025-09-0965731Update dependencies
0.0.322025-08-2465468Update dependencies
0.0.312025-08-0964863Update dependencies
0.0.302025-08-0264386Update dependencies
0.0.292025-07-2664056Update dependencies
0.0.282025-07-1963640Update dependencies
0.0.272025-07-1263216Update dependencies
0.0.262025-07-0562701Update dependencies
0.0.252025-06-2862233Update dependencies
0.0.242025-06-2161759Update dependencies
0.0.232025-06-1561171Update dependencies
0.0.222025-05-2460786Update dependencies
0.0.212025-05-1059968Update dependencies
0.0.202025-05-0459566Update dependencies
0.0.192025-04-2658930Update dependencies
0.0.182025-04-1958550Update dependencies
0.0.172025-04-1358052Update dependencies
0.0.162025-04-0557379Update dependencies
0.0.152025-03-2956821Update dependencies
0.0.142025-03-2256338Update dependencies
0.0.132025-03-0955664Update dependencies
0.0.122025-03-0155162Update dependencies
0.0.112025-02-2354632Update dependencies
0.0.102025-02-1553087Update dependencies
0.0.92025-01-2552387Update dependencies
0.0.82025-01-1852006Update dependencies
0.0.72025-01-1151380Update dependencies
0.0.62025-01-0450753Update dependencies
0.0.52024-12-2150326Update dependencies
0.0.42024-12-1449756Update dependencies
0.0.32024-12-1249403Update dependencies
0.0.22024-12-1149125Starting with this version, the Docker image is now rootless. Please note that this and future versions will not be compatible with Airbyte versions earlier than 0.64
0.0.12024-11-08Initial release by @bala-ceg via Connector Builder