View as Markdown
YouTube Data icon

YouTube Data ACTION

Search Videos

Returns a list of videos that match the search parameters. See the documentation for more information
  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's YouTube Data account once, then configure and run Search Videos from your backend or agent.

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 result = await pd.actions.run({
  id: "youtube_data_api-search-videos",
  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",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Search Videos inputs
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
sortOrder Sort Order string
The method that will be used to order resources in the API response. The default value is relevance
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

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
youtube_data_api-search-videos
Version
0.0.2
App
YouTube Data
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes