YouTube connector

YouTube Scraper API for Audience Sentiment and Content Intelligence

The SurfSense YouTube API pulls videos, channel stats, comments, and transcripts at scale, without YouTube Data API quotas. Feed your AI agents every comment and transcript that matters to your market, so you know what people actually think about your product and your competitors' content.

agent · surfsense

$

youtube.comments({ urls: ["youtube.com/watch?v=launch"],
  max_comments: 500, sort_by: "TOP_COMMENTS" })
  • "Finally an API that does not throttle my agent"@devbuilds · 214 likes · creator heartedpositive
  • "How does pricing compare to the incumbent?"@growthlee · 96 likes · 12 repliesbuying intent
  • "Does it handle transcripts too or just metadata?"@ml_ana · 71 likes · 8 repliesfeature ask

500 comments · 78% positive · surfaced in 3.4s

What you can extract from YouTube

Give the API video URLs, channel or playlist URLs, or search queries. It returns structured video items; a separate comments call returns full comment and reply trees for any video.

Video metadata

Title, view count, likes, duration, publish date, hashtags, and description.

Channel stats

Subscriber count, total views, total videos, join date, and verified status.

Comments and replies

Author, comment text, vote counts, reply counts, and creator-heart flags.

Transcripts

Subtitle tracks per video in the language you request, ready as agent context.

Content types

Standard videos, Shorts, and live streams, capped independently per source.

Engagement

Likes, comment counts, and monetization or members-only flags per video.

What teams do with the YouTube API

Comment sentiment at scale

Read every comment on your launch video or a competitor's ad, not a sample. Score product feedback and ad reaction so your team knows what actually resonated with the audience.

Competitor channel analysis

Pull a rival channel's full catalog with views, likes, and cadence to see which content wins in your niche, then brief an agent to spot the patterns you should copy.

Influencer vetting

Before you sponsor a creator, scrape their real view counts, comment sentiment, and posting history so you pay for genuine reach instead of a vanity subscriber number.

Transcripts as agent context

Download transcripts to feed RAG pipelines and research agents. Turn hours of video into searchable, citable context your agents can reason over in seconds.

Call it from your code or your agent

One typed endpoint, one API key. Or add the SurfSense MCP server and let your agent call youtube.scrape as a native tool.

curl -X POST "$SURFSENSE_API_URL/workspaces/$WORKSPACE_ID/scrapers/youtube/scrape" \
  -H "Authorization: Bearer $SURFSENSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "search_queries": [
      "your topic"
    ],
    "max_results": 50,
    "download_subtitles": true,
    "subtitles_language": "en"
  }'

YouTube API request and response schema

The exact contract behind POST /workspaces/{workspace_id}/scrapers/youtube/scrape. The same fields power the youtube.scrape MCP tool.

Request parameters

Provide at least one source: urls or search_queries. Up to 20 of each per call.

Request parameters
FieldTypeDescription
urlsstring[]
default []
YouTube URLs to scrape: a video, channel (/@handle or /channel/UC...), playlist (?list=...), shorts, or hashtag page. Max 20.
search_queriesstring[]
default []
Search terms to run on YouTube. Each returns up to max_results videos. Max 20.
max_resultsinteger
default 10
Max items per source and per content type, 1 to 1,000. For a channel, videos, shorts, and streams are capped independently.
download_subtitlesboolean
default false
Also fetch each video's subtitle track. Slower.
subtitles_languagestring
default "en"
Subtitle language code, e.g. 'en', 'fr'. Used when download_subtitles is true.

Response fields

The response is { items: [...] } with one item per video, short, or stream. One returned item is one billable unit.

Response fields
FieldTypeDescription
title / id / urlstringVideo title, YouTube ID, and watch URL.
typestringWhat this item is: video, short, or stream.
viewCount / likes / commentsCountintegerEngagement metrics for ranking what resonates.
date / durationstringPublish date and video length.
text / descriptionLinks / hashtagsstring / object[] / string[]Full description, the links it contains, and its hashtags.
subtitlesobject[]Full transcript tracks with SRT content when download_subtitles is true. The raw material for content analysis.
thumbnailUrlstringThe video's thumbnail image.
channelName / channelUrl / channelIdstringThe publishing channel's name, URL, and ID.
numberOfSubscribers / isChannelVerifiedinteger / booleanChannel reach and verification status.
input / fromYTUrl / orderstring / integerProvenance: which source produced this item and its position.

A YouTube Data API alternative without the quota

The official YouTube Data API gives you 10,000 units a day, and reading comments burns through it fast. Here is how SurfSense compares.

FeatureYouTube Data APISurfSense
Quota10,000 units per day; comment reads drain it fastNo daily unit quota; pay per item returned
CommentsPaginated and quota-heavy at depthUp to 100,000 comments and replies per video
TranscriptsNot available through the official APISubtitle tracks included, in the language you pick
SetupGoogle Cloud project, OAuth, and API keyOne API key, or add the MCP server to your agent
Agent-readyNo; you build the harness yourselfMCP server exposes youtube.scrape as a native tool

YouTube API: frequently asked questions

Point your agents at YouTube

The YouTube connector is one of many in the SurfSense competitive intelligence platform. Start free, no credit card required.

SurfSense