Skip to main content

YouTube Data API

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

This connector uses the YouTube Data API v3 to sync data about your YouTube channels, including video details, channel metadata, and comments. For more detailed analytics and reporting data, use the YouTube Analytics connector.

Prerequisites​

  • One or more YouTube Channel IDs you want to sync data from
  • (For Airbyte Open Source) A Google Cloud project with the YouTube Data API v3 enabled, and one of the following authentication methods from that project:
    • A Google API Key (public data only)
    • 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. Channel IDs are 24 characters long and start with UC. A handle URL such as https://www.youtube.com/@handle isn't a Channel ID.
  3. Alternatively, you can find it in YouTube Studio under Settings > Channel > Advanced settings.

The connector fails the connection check if any Channel ID doesn't resolve to an existing channel, so verify each ID before you set up the source.

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:

No stream supports incremental sync. Each sync re-reads all data for the configured channels, so the quota behavior described in Limitations and considerations applies to every sync. If you use Full Refresh - Append, video and channels records differ between syncs because YouTube updates their statistics (view, like, comment, and subscriber counts) in place; deduplicate on the primary key in your destination if you only want the latest values.

Supported streams​

Stream NamePrimary KeyPaginationSupports Full SyncSupports Incremental
videovideoIdDefaultPaginatorYesNo
videosvideoIdDefaultPaginatorYesNo
channelsidDefaultPaginatorYesNo
commentsvideoId, idDefaultPaginatorYesNo
channel_commentschannelId, idDefaultPaginatorYesNo

Stream descriptions​

  • video: Detailed information about videos from the specified channels, from videos.list. 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). Each record also includes a datetime field that the connector sets to the time it fetched the record. It isn't a YouTube timestamp; use it to tell snapshots apart in Full Refresh - Append mode.
  • videos: The IDs of videos published by the specified channels, discovered with search.list filtered to type=video. Each record contains only the search result's id object: kind (always youtube#video) and videoId, which is the primary key. The video and comments streams use this stream as their parent to identify which videos to fetch. YouTube returns at most 500 results per channel from this search, so channels with more than 500 videos are truncated in videos, video, and comments.
  • channels: Information about the specified YouTube channels, from channels.list. 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, from commentThreads.list filtered by videoId. For each video discovered by the videos stream, this stream fetches the comment threads. Each record is one thread's snippet: the top-level comment is in topLevelComment, totalReplyCount gives the number of replies, and the connector copies the top-level comment's ID into a top-level id field to serve as part of the primary key. The replies themselves aren't included in the records. Videos with comments disabled and videos that no longer exist are skipped without failing the sync.
  • channel_comments: All comment threads related to the specified channels, from commentThreads.list filtered by allThreadsRelatedToChannelId. This includes comments on the channel's videos and on the channel page itself, so it provides a broader view of channel engagement than the comments stream. Because it doesn't depend on the videos search, it isn't subject to the 500-video limit. Records have the same shape as comments, including the copied id field.

Comment records carry publishedAt and updatedAt timestamps only inside the nested topLevelComment.snippet object; there's no top-level timestamp field.

YouTube API Services usage disclosure​

This connector uses YouTube API Services to retrieve data from YouTube. By using this connector, you agree to be bound by the YouTube Terms of Service.

YouTube API Services are provided by Google. For information about how Google handles data, review the Google Privacy Policy.

When using OAuth 2.0 authentication, this connector accesses authorized user data. You can revoke the connector's access to your Google account at any time through the Google security settings page. To delete stored data that was previously synced, remove the relevant connection in your Airbyte workspace or delete the data from your configured destination.

Limitations and considerations​

Quota and rate limiting​

The YouTube Data API enforces a daily quota per Google Cloud project. Google's documented default allocation is 100 search.list calls per day plus 10,000 quota units per day for all other endpoints; channels.list, videos.list, and commentThreads.list each cost 1 unit per request. Google notes that defaults are subject to change, so check the Quotas page for the YouTube Data API in the Google Cloud console to see what applies to your project. If you need more, request a quota extension from Google.

The videos stream, and therefore the video and comments streams that depend on it, uses search.list. Each search request returns up to 50 video IDs, so a project with the default 100-call allocation can enumerate at most about 5,000 videos per day across all channels and syncs that share the project.

The connector also paces its own requests as a burst guard: at most 3 search.list requests per minute, and at most 100 requests per minute combined to the channels, videos, and commentThreads endpoints. A request that would exceed these limits waits for the next free slot rather than failing. If YouTube still returns a quota or rate-limit error (quotaExceeded, dailyLimitExceeded, rateLimitExceeded, userRateLimitExceeded, or HTTP 429), the connector retries with backoff. A sync that exhausts the daily quota fails after the retries run out; run it again after the quota resets.

The connector's pacing applies to each Airbyte source separately, but Google meters quota per Google Cloud project. If several sources use API keys or OAuth clients from the same project, their requests add up against one quota. Use a separate project for each source, or request more quota.

Authentication​

  • 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.
  • When using OAuth 2.0, the connector refreshes the access token and retries if YouTube returns HTTP 401. If the 401 persists, the sync fails with a configuration error; re-authenticate with Google from the source settings. With an API key there's no token to refresh, so a persistent 401 fails the same way.
  • The connector fails with a configuration error, rather than retrying, when YouTube reports that the API key is invalid, the token lacks the youtube.force-ssl scope, the YouTube Data API v3 isn't enabled for the project, or a configured Channel ID doesn't exist. Fix the credentials or Channel IDs and run the sync again.
  • The connector does not support service account authentication because the YouTube Data API does not support this method for most operations.

Data coverage​

  • The videos stream returns at most 500 videos per channel because of a YouTube search.list limit. Channels with more videos are truncated in videos, video, and comments. channels and channel_comments aren't affected.
  • The comments stream skips videos with comments disabled and deleted videos without producing records or errors.

IP allow list​

If you use Airbyte Cloud and your organization restricts access to specific IPs, add the Airbyte Cloud IP addresses to your allow list.

Reference​

Config fields reference

Field
Type
Property name
array
channel_ids
object
credentials

Changelog​

Expand to review
VersionDatePull RequestSubject
1.0.32026-09-2286891Update dependencies
1.0.22026-09-2186466Fix authentication failures (HTTP 401) on channels with many videos: refresh the access token and retry on 401, and shorten API budget windows so syncs no longer wait past the token lifetime
1.0.12026-09-1586306Update dependencies
1.0.02026-09-1085214Breaking: promote connector to certified — declare primary keys and timestamp formats and restrict videos to video results (see the migration guide)
0.0.662026-09-0885721Update dependencies
0.0.652026-08-1884813Update dependencies
0.0.642026-08-1184181Update dependencies
0.0.632026-08-0483693Update dependencies
0.0.622026-07-2883186Update dependencies
0.0.612026-07-2182663Update dependencies
0.0.602026-07-1482070Update dependencies
0.0.592026-06-3081317Update dependencies
0.0.582026-06-2380730Update dependencies
0.0.572026-06-1680123Update dependencies
0.0.562026-06-0979580Update dependencies
0.0.552026-06-0279000Update dependencies
0.0.542026-04-2877496Update dependencies
0.0.532026-04-2176818Update dependencies
0.0.522026-04-0875185Replace connector icon with updated YouTube logo
0.0.512026-03-1774392Migrate to scopes object array format
0.0.502026-03-1774698Update dependencies
0.0.492026-03-0373914Update dependencies
0.0.482026-02-1773507Update dependencies
0.0.472026-02-1073175Update dependencies
0.0.462026-01-2772066Update dependencies
0.0.452026-01-1470677Update dependencies
0.0.442026-01-0571016Fixed schemas
0.0.432025-12-1970971Add acceptance tests
0.0.422025-12-1669315Add 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-1064863Update 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