String docs
Site integrations

YouTube

YouTube: a channel's profile and external links, its uploads, a video's details and transcript, a video's comments, and video search.

Call these actions with your String API key; see Authentication. Every call answers with the envelope described in Responses & errors, whose data holds the rows below.

  • Site: youtube
  • Version: 1.0.0
  • Reads from: www.youtube.com
ActionDescriptionListed price
channelRead a YouTube channel's profile and About panel by id, @handle or URL: title, handle, description, country, joined date, subscriber, video and view counts, and the external links it lists.Billed per request at your plan's rates
videosList a YouTube channel's uploads, newest first, from its Videos, Shorts or Live tab: video id, title, view count, relative publish time and duration. About 30 a page, up to 20 pages.Billed per request at your plan's rates
videoRead one YouTube video by id or URL: title, channel, full description, absolute publish time, category, keywords, duration, view and like counts, and optionally its full timed transcript from its captions.Billed per request at your plan's rates
commentsRead a YouTube video's top-level comments: text, the commenter's channel id and handle, relative time, likes and reply count, optionally filtered to one commenter's channel id. About 20 a page, up to 50 pages.Billed per request at your plan's rates
searchSearch YouTube for videos, as the results page's Type: Video filter does: video id, title, uploader, relative publish time, duration, views and snippet. Finds interviews and talks a person appears in. About 20 a page, up to 10 pages.Billed per request at your plan's rates

channel

Read a YouTube channel's profile and About panel by id, @handle or URL: title, handle, description, country, joined date, subscriber, video and view counts, and the external links it lists.

POST https://request.usestring.ai/v1/integrations/youtube/channel

Input

Unknown fields are rejected.

FieldTypeDescription
channelstringRequired. A YouTube channel id (UC…), a handle with or without its @ (mkbhd or @mkbhd), or a youtube.com channel URL. At least 1 character.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
channelIdstring—
titlestring—
handlestring | nullThe channel's @handle, such as @mkbhd; null when it has none.
descriptionstring—
keywordsstring | nullThe channel's keywords as one space-separated string; null when it sets none.
countrystring | nullThe country the channel lists; null when it lists none.
joinedstring | nullThe About panel's joined text, such as Joined Mar 21, 2008.
subscribersstring | nullThe About panel's subscriber count text, such as 20.4M subscribers.
videosstring | nullThe About panel's video count text.
viewsstring | nullThe About panel's total view count text.
linksobject[]The external links the channel lists on its About panel.
links[].titlestring—
links[].urlstringThe link's target, unwrapped from YouTube's redirect.
avatarstring | nullThe largest avatar image URL.
urlstring—

Example

curl https://request.usestring.ai/v1/integrations/youtube/channel \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "@mkbhd"
  }'

data starts with these rows:

[
  {
    "channelId": "UCBJycsmduvYEL83R_U4JriQ",
    "title": "Marques Brownlee",
    "handle": "@mkbhd",
    "description": "MKBHD: Quality Tech Videos | YouTuber | Geek | Consumer Electronics | Tech Head | Internet Personality!\n\n[email protected]\n\nNYC",
    "keywords": "MKBHD MarquesBrownlee Marques Brownlee",
    "country": "United States",
    "joined": "Joined Mar 21, 2008",
    "subscribers": "21.4M subscribers",
    "videos": "1,866 videos",
    "views": "5,899,504,068 views",
    "links": [
      {
        "title": "Twitter",
        "url": "http://twitter.com/MKBHD"
      },
      {
        "title": "Instagram",
        "url": "http://instagram.com/MKBHD"
      },
      {
        "title": "The Studio",
        "url": "http://youtube.com/c/TheStudio"
      },
      {
        "title": "Reddit",
        "url": "http://reddit.com/r/MKBHD"
      },
      {
        "title": "Discord",
        "url": "http://discord.gg/MKBHD"
      }
    ],
    "avatar": "https://yt3.googleusercontent.com/qu4TmIaYUlS41-dJ9gZ7DUR3nilvmB5_11i6OKSdvNnBNiyOusZP1bMN6ICnuxtjFBb6ioKgRQ=s900-c-k-c0x00ffffff-no-rj",
    "url": "https://www.youtube.com/channel/UCBJycsmduvYEL83R_U4JriQ"
  }
]

Requests and billing

  • Requests: 1–2 Web Access requests per call, plus up to 1 setup request per call.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.

videos

List a YouTube channel's uploads, newest first, from its Videos, Shorts or Live tab: video id, title, view count, relative publish time and duration. About 30 a page, up to 20 pages.

POST https://request.usestring.ai/v1/integrations/youtube/videos

Input

Unknown fields are rejected.

FieldTypeDescription
channelstringRequired. A YouTube channel id (UC…), a handle with or without its @ (mkbhd or @mkbhd), or a youtube.com channel URL. At least 1 character.
tabvideos shorts streamsvideos (the default), shorts or streams.
pagesintegerHow many pages of about 30 uploads to read, newest first, from 1 to 20. From 1 to 20.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
videoIdstring—
channelIdstring—
tabstring—
titlestring—
viewsstring | nullThe listed view count text, such as 5.4M views.
publishedstring | nullThe listed relative publish time, such as 3 days ago; the video action gives the absolute date.
lengthstring | nullThe listed duration, such as 15:14; null for shorts and live streams.
urlstring—

Example

curl https://request.usestring.ai/v1/integrations/youtube/videos \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "UCBJycsmduvYEL83R_U4JriQ",
    "tab": "videos",
    "pages": 1
  }'

data starts with these rows:

[
  {
    "videoId": "hdMszZ2ah5Q",
    "channelId": "UCBJycsmduvYEL83R_U4JriQ",
    "tab": "videos",
    "title": "Macbook PROLED Review: It's Not About That",
    "views": "5.4M views",
    "published": "3 days ago",
    "length": "15:14",
    "url": "https://www.youtube.com/watch?v=hdMszZ2ah5Q"
  }
]

Requests and billing

  • Requests: 1 Web Access request per result page, plus up to 1 setup request per call.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.

video

Read one YouTube video by id or URL: title, channel, full description, absolute publish time, category, keywords, duration, view and like counts, and optionally its full timed transcript from its captions.

POST https://request.usestring.ai/v1/integrations/youtube/video

Input

Unknown fields are rejected.

FieldTypeDescription
videostringRequired. A YouTube video id, or a watch, youtu.be, shorts or live URL. At least 1 character.
transcriptbooleanAlso read the video's transcript, from its captions; two more requests.
languagestringThe transcript language code to prefer, such as en. Defaults to en; a creator-uploaded track is preferred over the automatic one.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
videoIdstring—
titlestring—
channelIdstring—
authorstring—
descriptionstring—
publishedstring | nullThe publish time, ISO 8601 with offset.
categorystring | null—
keywordsstring[]—
lengthinteger | nullDuration in seconds.
viewsinteger | null—
likesinteger | nullLike count; null when the creator hides it.
livebooleanWhether the video is or was a live stream.
urlstring—
captionsstring[]Caption languages the video offers; an a. prefix marks an automatic track. Empty unless transcript was asked for.
transcriptLanguagestring | nullThe language of the transcript read; null when none was asked for or found.
transcriptAutomaticboolean | nullWhether the transcript read is YouTube's automatic speech recognition.
transcriptobject[]The transcript's cues in order; empty when none was asked for or found.
transcript[].startnumberSeconds from the start of the video.
transcript[].durationnumberSeconds the cue is shown.
transcript[].textstring—

Example

curl https://request.usestring.ai/v1/integrations/youtube/video \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "hdMszZ2ah5Q"
  }'

data starts with these rows:

[
  {
    "videoId": "hdMszZ2ah5Q",
    "title": "Macbook PROLED Review: It's Not About That",
    "channelId": "UCBJycsmduvYEL83R_U4JriQ",
    "author": "Marques Brownlee",
    "description": "Incredible laptop. But don't get distracted.\n\nProtect and make your MacBook unique with dbrand at https://dbrand.com/shop/macbook\n\nMKBHD Merch: http://shop.MKBHD.com\n\nPlaylist of MKBHD Intro music: https://goo.gl/B3AWV5\n\nLaptop provided by Apple for review.\n\n~\nhttp://twitter.com/MKBHD\nhttp://instagram.com/MKBHD\nhttp://facebook.com/MKBHD",
    "published": "2026-11-11T10:43:56-08:00",
    "category": "Science & Technology",
    "keywords": [],
    "length": 913,
    "views": 5514007,
    "likes": 71700,
    "live": false,
    "url": "https://www.youtube.com/watch?v=hdMszZ2ah5Q",
    "captions": [],
    "transcriptLanguage": null,
    "transcriptAutomatic": null,
    "transcript": []
  }
]

Requests and billing

  • Requests: 1–3 Web Access requests per call.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.

comments

Read a YouTube video's top-level comments: text, the commenter's channel id and handle, relative time, likes and reply count, optionally filtered to one commenter's channel id. About 20 a page, up to 50 pages.

POST https://request.usestring.ai/v1/integrations/youtube/comments

Input

Unknown fields are rejected.

FieldTypeDescription
videostringRequired. A YouTube video id, or a watch, youtu.be, shorts or live URL. At least 1 character.
authorstringKeep only comments by this channel id (UC…); the pages read are still counted. Matches ^UC[A-Za-z0-9_-]{22}$.
pagesintegerHow many pages of about 20 top-level comments to read, in YouTube's top order, from 1 to 50. From 1 to 50.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
videoIdstring—
commentIdstring—
authorChannelIdstring—
authorstringThe commenter's @handle as shown.
textstring—
publishedstring | nullThe relative time shown, such as 2 days ago.
likesstring | nullThe like count text shown, such as 1.2K.
repliesstring | nullThe reply count text shown.
byCreatorbooleanWhether the comment is by the video's own channel.

Example

curl https://request.usestring.ai/v1/integrations/youtube/comments \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "hdMszZ2ah5Q",
    "pages": 1
  }'

data starts with these rows:

[
  {
    "videoId": "hdMszZ2ah5Q",
    "commentId": "Ugx4RaWA9HJfd2J9cNh4AaABAg",
    "authorChannelId": "UCcnF_wueqvtlebRVw-_9txw",
    "author": "@shahmilchowdhury",
    "text": "\"The more I use it, the less I find myself touching the screen\" -> anyone who has ever had a touchscreen laptop knows this lol. You use it for the first two weeks and then never touch the screen again, except for when you're occasionally browsing something lying down with the laptop on your chest, or if your cursor gets stuck somewhere for some reason.",
    "published": "3 days ago",
    "likes": "6K",
    "replies": "107",
    "byCreator": false
  }
]

Requests and billing

  • Requests: 1 Web Access request per result page, plus up to 1 setup request per call.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.

Search YouTube for videos, as the results page's Type: Video filter does: video id, title, uploader, relative publish time, duration, views and snippet. Finds interviews and talks a person appears in. About 20 a page, up to 10 pages.

POST https://request.usestring.ai/v1/integrations/youtube/search

Input

Unknown fields are rejected.

FieldTypeDescription
querystringRequired. What to search YouTube for, such as a person's name and interview. At least 1 character.
pagesintegerHow many pages of about 20 videos to read, from 1 to 10. From 1 to 10.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
querystring—
positioninteger1-based rank across the pages read.
videoIdstring—
titlestring—
channelIdstring | nullThe uploader's channel id.
channelstring | nullThe uploader's channel name.
publishedstring | nullThe relative publish time shown, such as 2 years ago.
lengthstring | nullThe duration shown, such as 1:55:32.
viewsstring | nullThe view count text shown.
snippetstring | nullThe description or transcript snippet the results page shows.
urlstring—

Example

curl https://request.usestring.ai/v1/integrations/youtube/search \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Marques Brownlee interview",
    "pages": 1
  }'

data starts with these rows:

[
  {
    "query": "Marques Brownlee interview",
    "position": 1,
    "videoId": "Df10asLzwlY",
    "title": "Why MKBHD Told Netflix: \"Don't Bother\"",
    "channelId": "UCj8DGOv5P7Ngsh-telMG-pw",
    "channel": "Jon Youshaei",
    "published": "7 months ago",
    "length": "1:35:51",
    "views": "524,386 views",
    "snippet": "I interviewed Marques Brownlee about his candid thoughts about YouTube, business of tech reviews, AI, and why his latest video ...",
    "url": "https://www.youtube.com/watch?v=Df10asLzwlY"
  }
]

Requests and billing

  • Requests: 1 Web Access request per result page.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.