View as Markdown
YouTube Data icon

YouTube Data TRIGGER

New Videos by Search

Emit new event for each new YouTube video matching the search criteria.
  • Trigger
  • Polling
  • OAuth
  • Webhook delivery

IMPLEMENTATION

Deploy this event source

Connect the user's YouTube Data account, configure the source, and choose the webhook where your backend receives events.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const deployed = await pd.triggers.deploy({
  id: "youtube_data_api-new-videos-by-search",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    youtube_data_api: { authProvisionId: "apn_xxxxxxx" },
    q: "Search Query",
    channelId: "Channel ID",
  },
  webhookUrl: "https://example.com/webhooks/youtube-data-api",
})

console.log(deployed.id)

MCP exposes on-demand actions. Event sources are deployed through the Connect SDK or API because they continue listening after the initial request.

SCHEMA

Configuration

These inputs define which events the source watches. Dynamic options are loaded from the connected account.

New Videos by Search configuration
Property Type Description
q Search Query string
Search for new videos that match these keywords.
Optional
channelId Channel ID string
The channelId parameter specifies a unique YouTube channel ID. E.g. UChkRx83xLq2nk55D8CRODVz
Optional
videoDuration Video Duration string
Filter the results based on video duration
Optional
videoDefinition Video Definition string
Filter the results to only include either high definition (HD) or standard definition (SD) videos
Optional
videoCaption Video Caption string
Indicates whether the API should filter video search results based on whether they have captions
Optional
videoLicense Video License string
Filter the results to only include videos with a particular license
Optional
regionCode Region Code string
The regionCode parameter instructs the API to return results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code. For example: US, GB, BR
Optional
videoCategoryId Video Category Id string
Select the video's category
Optional Dynamic
location Location string
The location parameter, in conjunction with the locationRadius parameter, defines a circular geographic area and also restricts a search to videos that specify, in their metadata, a geographic location that falls within that area. The parameter value is a string that specifies latitude/longitude coordinates e.g. 37.42307,-122.08427.
Optional
locationRadius Location Radius string
The parameter value must be a floating point number followed by a measurement unit. Valid measurement units are m, km, ft, and mi. For example, valid parameter values include 1500m, 5km, 10000ft, and 0.75mi. The API does not support locationRadius parameter values larger than 1000 kilometers.
Optional
maxResults Maximum Results integer
The maximum number of items that should be returned in the result set. Acceptable values are 0 to 50, inclusive. Default is 20
Optional
timer Polling interval $.interface.timer
Pipedream will poll the YouTube API on this schedule
Required

01

Connect

Your user authorizes YouTube Data through Pipedream managed auth.

02

Deploy

Your backend deploys this source with that user's own configuration.

03

Webhook delivery

Every event is sent to the HTTP endpoint you choose when you deploy the source — after each poll.

OR

On-demand retrieval

No webhook required. Your app or agent can fetch recent events from the trigger events API.

Registry key
youtube_data_api-new-videos-by-search
Version
0.0.11
App
YouTube Data
Authentication
OAuth
Delivery
Polling source
Output
Events emitted by YouTube Data.