Skip to main content
Back to Search AI connectors list YouTube is a video-sharing platform that allows users to upload, view, and manage video content organized into channels and playlists. You can configure Search AI to connect to YouTube to enable users to fetch query results using video metadata, descriptions, and transcripts from your YouTube channel.

Authorization Support

Search AI supports OAuth 2.0 (Google) authentication for communicating with YouTube. Authentication requires a Client ID and Client Secret obtained from the Google Cloud Console.

Integration Steps

To configure YouTube as a content source, complete the following steps.
  • Configure the YouTube connector in Search AI
  • Set up Permissions
  • Configure Content Scope
  • Schedule Sync

Step 1: Configure the YouTube Connector in Search AI

Prerequisites - Obtaining Google OAuth 2.0 Credentials

Before configuring the connector, generate your OAuth 2.0 credentials from the Google Cloud Console:
  1. Go to Google Cloud Console and create or select a project.
  2. Enable the YouTube Data API v3 under APIs & Services > Library.
  3. Configure the OAuth consent screen (set user type to Internal for org use).
  4. Add the required scopes:
    • https://www.googleapis.com/auth/youtube.readonly - View your YouTube account
    • https://www.googleapis.com/auth/youtube.force-ssl - Required for downloading captions/transcripts
  5. Create an OAuth client ID (Web application type) under APIs & Services > Credentials.
  6. Add the authorized redirect URI: https://<your-searchassist-domain>/searchassist/idproxy/callback
  7. Copy the generated Client ID and Client Secret.

Configuring the Connector

Go to Connectors under the Sources page and select YouTube. On the Authentication tab, enter the following details and click Connect. After entering credentials and clicking Connect, you will be redirected to Google’s consent screen to authorize Search AI. Tokens are stored securely and refreshed automatically when they expire. Once successfully authenticated, the status shows as Connected.

Step 2: Set Up Permissions

Go to the Permissions tab to configure access control for the ingested content. The following options are available.
  • Same users as in the source system (Restricted Access) - Applies RACL-based access control. When enabled, the connector uses the permissions field from the video data source. Since YouTube videos are inherently public (private videos are skipped), RACL effectively defaults to open access for all ingested content.
  • Everyone (Public Access) - All users are granted full access to the ingested content.
RACL Sync scheduling isn’t applicable for the YouTube connector since YouTube doesn’t have a user/group permission model for public video content.

Step 3: Configure Content Scope

Go to the Content Scope tab under Connector Setup to define which videos are ingested. Content scope is controlled via two levels of filtering.

Standard Filter (Playlist Selection)

The standard filter controls which playlists to sync content from. The Playlist Picker supports paginated browsing, search/filter by name, and multi-select.

Advanced Filter (Pre-Filter)

You use advanced filtering criteria to filter specific videos for ingestion. Only the ingested videos consume your API quota. The filtering happens before fetching the transcript, so that the filtered-out videos don’t consume API quota. Validation Rules:
  • publishedAfter must be earlier than publishedBefore
  • minDurationMinutes must be less than maxDurationMinutes
  • View count and duration values must be non-negative
  • Dates accept ISO 8601 format (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ)
Example: Only sync tutorial videos published after January 2024 that are between 5 and 60 minutes long and have at least 500 views.

Step 4: Sync Content

After configuring the connector, go to Schedule Sync to initiate and manage content synchronization.
  • Use the Sync option for an immediate, on-demand sync.
  • Enable Schedule Sync to set up automated, recurring syncs.
The Schedule Sync table displays a log of all sync activity with the following details.

Sync Behavior

Only public videos are synced. Private and unlisted videos are automatically skipped.

Content Ingestion

Once the sync is complete, go to the Content tab to review the ingested content. The tab displays the count of files that are Successful, Failed, and Skipped, along with the total number of Accessible Files. The system converts each synced video into a single Markdown document. It extracts and indexes the following key fields:
  • title - The video title.
  • content - The full transcript organized by chapters (if available) with timestamps.
  • doc_id - A unique identifier for the ingested video document, derived from the YouTube video ID.
  • doc_source_type - Identifies the source as a YouTube video.
  • doc_created_on / doc_updated_on - Timestamp of video publishing and last update.
  • url - Direct link to the video on YouTube (https://www.youtube.com/watch?v=<videoId>).
  • tags - Video tags extracted from YouTube metadata.
  • type - Content type classification (for example: tutorial (85%)).

Content Format

Each ingested video document follows this structured layout:

Transcript (Captions) Behavior

The connector fetches video captions or transcripts using the YouTube Captions API. Transcript selection follows this priority order:
  • If a video has no captions at all, it’s still synced - the video metadata and description are indexed without a transcript.
  • Chapter markers in the video description (for example: 0:00 Introduction, 5:30 Setup) are automatically detected and used to organize the transcript into sections. This affects only the organization of content within each chunk. Chunks are still created using token-based splitting, regardless of chapter boundaries.

API Quota

The YouTube Data API v3 has a daily quota limit of 10,000 units per Google Cloud project. The connector is quota-efficient. The connector reserves a buffer of 1,000 units and stops processing if the quota budget (9,000 units) is reached. If the quota is over mid-sync, the job completes with a limit exceeded status and the system retains the processed videos.
If you have a large channel (hundreds of videos with transcripts), consider requesting a quota increase from Google through the Cloud Console Quotas page.

RACL Support

Search AI provides access control support for content ingested from YouTube. The sys_racl field is used to enforce access control for the ingested content.
  • When RACL is disabled (default), all synced content is publicly available to all users searching the index (permission set to *).
  • When RACL is enabled, the connector uses the permissions field from the video data source. Since YouTube videos are inherently public (private videos are skipped), RACL effectively defaults to open access (['*']) for all ingested content.
  • RACL Sync scheduling isn’t applicable for the YouTube connector since YouTube doesn’t have a user/group permission model for public video content.