YouTube Scraper & Transcript Extractor avatar

YouTube Scraper & Transcript Extractor

Pricing

from $5.00 / 1,000 scraped youtube videos

Go to Apify Store
YouTube Scraper & Transcript Extractor

YouTube Scraper & Transcript Extractor

Extract clean YouTube video metadata, views, duration, and AI-ready transcripts (manual & auto-generated) without login or headless browsers. Fast, proxy-ready, and built for n8n, Make, Zapier, and AI agents.

Pricing

from $5.00 / 1,000 scraped youtube videos

Rating

5.0

(1)

Developer

Sonic Dash

Sonic Dash

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

6 days ago

Last modified

Categories

Features

Limited permissions

Share

An Apify Actor that collects normalized metadata and available captions from YouTube videos without signing in or launching a headless browser. It uses YouTube's public InnerTube player responses first and the watch-page HTML as a complementary fallback. Requests can use the Apify proxy pool, and each video is isolated so restrictions or outages do not stop the rest of a run.

Features

  • Accepts standard watch URLs, youtu.be links, Shorts, embed URLs, and raw 11-character video IDs.
  • Strips irrelevant URL parameters and de-duplicates videos.
  • Tries WEB, Android, and TV InnerTube contexts and then parses watch-page player/data JSON.
  • Resolves caption tracks from player data and watch HTML; tries JSON3, XML timed-text formats, then the InnerTube get_transcript endpoint.
  • Prefers manual captions over auto-generated captions and cleans captions into one paragraph.
  • Extracts available description hashtags, likes, comments, subscriber counts, and social links without a separate channel crawl.
  • Emits one flat dataset record for each valid input, including sparse records when YouTube blocks metadata access.
  • Uses proxy support and bounded concurrency; no login or browser required.

Input

{
"videoUrls": [
"https://www.youtube.com/watch?v=JSrGw5HftbY"
],
"includeTranscript": true,
"maxRequestsPerCrawl": 50,
"proxyConfiguration": {
"useApifyProxy": true
}
}

The input form is prefilled with https://www.youtube.com/watch?v=JSrGw5HftbY. If the Actor is run locally without an input record, it uses that sample URL. An explicitly supplied empty or invalid input exits with code 1. includeTranscript defaults to true; maxRequestsPerCrawl defaults to 50. proxyConfiguration is optional and follows Apify's proxy configuration format. Invalid IDs are logged and skipped; a run with no valid IDs exits with code 1.

Output

One record is pushed to the default dataset for each video:

{
"videoId": "JSrGw5HftbY",
"url": "https://www.youtube.com/watch?v=JSrGw5HftbY",
"title": "l'Morphine - Ay9ona",
"channelName": "2020 SQUAD",
"channelId": "UCxxxxxxxxxxxxxxxxxxxxxx",
"viewsCount": 962644,
"durationSeconds": 258,
"publishedAt": "2016-04-30T10:55:28-07:00",
"isLive": false,
"keywords": ["example", "music"],
"description": "A clean description without markup or excess whitespace.",
"likesCount": 13587,
"socialMediaLinks": null,
"commentsCount": 628,
"channelLocation": null,
"totalVideos": null,
"channelUrl": "https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxx",
"videoViewCount": 962644,
"totalViews": null,
"subscriberCount": 106,
"hashtags": [],
"thumbnails": ["https://i.ytimg.com/vi/JSrGw5HftbY/hqdefault.jpg"],
"aiVideoDescription": null,
"aiVideoSummary": null,
"hasTranscript": true,
"transcriptSource": "auto-generated",
"transcriptLength": 19,
"transcriptText": "A clean transcript.",
"extractionMethod": "innertube-web+watch-player+watch-page"
}

Unavailable text fields are empty strings, numeric metadata defaults to 0, and publishedAt, transcriptSource, and transcriptText are null when unavailable. likesCount, socialMediaLinks, commentsCount, channelLocation, channel totals, and AI-generated descriptions/summaries are null until a source is available; the Actor does not invent these values or call an AI service. Thumbnails and hashtags are populated from available video data. Duration and publication date use player data first and watch-page/HTML metadata as fallbacks. Transcript length is the number of characters in the cleaned transcript. extractionMethod identifies the successful metadata paths.

The dataset overview includes the requested channel, engagement, video, transcript, duration, release-date, hashtag, thumbnail, and AI-description/summary columns. Fields not currently provided by YouTube's public player/watch-page data remain null.

Automation and AI integrations

Use the Apify API to start a run with the JSON input above, then read the default dataset as JSON. In n8n, Make, or Zapier, connect an Apify Actor task/run step to a dataset-items step and map the flat fields into subsequent actions. For AI/MCP workflows, dataset JSON can be passed directly as structured video metadata and transcript context.

Proxy and reliability notes

The Actor supports the standard Apify proxyConfiguration object. Apify Proxy is recommended for larger or geographically varied runs; use residential proxy groups when your account has access and the target content requires them. Proxy access does not bypass login, membership, age, privacy, copyright, or regional restrictions. Restricted and deleted videos may produce sparse records with a warning. YouTube changes its undocumented endpoints periodically, so extraction paths are intentionally redundant but cannot guarantee data availability for every video.

Local development

Requires Node.js 20 or newer.

npm install
npm test
npm run build
npm start

To run locally with the Apify CLI, build the Actor and provide input through the CLI's input workflow. Local calls do not use Apify Proxy unless valid proxy configuration and credentials are available.