Skip to main content
POST /v1/data/youtube/videos/run Pricing: $0.0005 per video ($0.5 per 1,000).

Ways to call it

  • Search: set query (optional: maxResults, onlyVideosNewerThan)
  • Channel: set channelUrl (optional: contentType, maxResults, onlyVideosNewerThan)
  • Video URL: set urls

Request

Send the inputs under params. Only the keys below are accepted; any other key returns 422 invalid_params.
string
Keyword or phrase to search YouTube (e.g. ‘python tutorial’). Returns ranked video results matching the query.
string
YouTube channel URL (e.g. https://www.youtube.com/@MrBeast or https://www.youtube.com/channel/UC…) or @handle. Returns all videos from the channel.Format e.g. https://www.youtube.com/@mrbeast.
string
default:"videos"
Which part of the channel to pull (By Channel mode only): regular Videos or Shorts. Overrides any tab in the channel URL you paste.Allowed values: videos (Videos), shorts (Shorts).
string[]
Direct YouTube video URLs (e.g. https://www.youtube.com/watch?v=…). One per line. Returns full metadata for each video.
integer
Total number of videos to return. Applies to Search and Channel modes.
date
Only return videos published on or after this date (YYYY-MM-DD, or a full ISO timestamp). In Channel mode the filter is applied before any video is fetched, so a window with no new uploads returns no rows and costs nothing.

Example

Response fields

Each row in data is one video, keyed by these fields.

Example response

Abridged: long text and lists are shortened.
For channel-level stats use youtube/channels; for comments on a video use youtube/comments.