Pricing
Pay per usage
YouTube Scraper Pro
Scrape YouTube videos, channels, playlists & search results without API limits. Extract title, views, likes, subscribers, subtitles & more. Export to JSON, CSV or Excel. No quotas. Powered by Crawlee & Playwright.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Actor stats
0
Bookmarked
14
Total users
1
Monthly active users
3 months ago
Last modified
Categories
Share
YouTube Scraper β Apify Actor
A highβperformance Apify Actor built with Apify SDK v3, Crawlee, and TypeScript that scrapes YouTube search results, video pages, channels, and playlists.
Features
| Capability | Details |
|---|---|
| Search scraping | Enter keywords β get structured video data |
| Direct URL scraping | Pass video, channel, or playlist URLs |
| Pagination | Automatically follows YouTube continuation tokens |
| Search filters | Filter by upload date and video type (videos / shorts / streams) |
| Subtitle extraction | Optionally download and parse video captions |
| Antiβblocking | Uses Apify datacenter proxy with session rotation |
| Typed output | Every record matches the VideoData TypeScript interface |
Input
The Actor accepts JSON input conforming to INPUT_SCHEMA.json.
| Field | Type | Default | Description |
|---|---|---|---|
searchTerms | string[] | [] | YouTube search keywords |
youtubeUrls | string[] | [] | Direct video / channel / playlist URLs |
maxResults | number | 50 | Maximum videos to scrape |
scrapeSubtitles | boolean | false | Extract subtitles / captions |
videoType | enum | "all" | "videos" Β· "shorts" Β· "streams" Β· "all" |
dateFilter | enum | "all" | "hour" Β· "day" Β· "week" Β· "month" Β· "year" Β· "all" |
Example input
{"searchTerms":["web scraping tutorial","node.js"],"youtubeUrls":["https://www.youtube.com/watch?v=dQw4w9WgXcQ","https://www.youtube.com/@Google/videos"],"maxResults":100,"scrapeSubtitles":true,"videoType":"videos","dateFilter":"month"}
Output
Each video is pushed to the default Apify Dataset as a JSON record:
{"title":"Learn Web Scraping in 20 Minutes","videoId":"abc123xyz","url":"https://www.youtube.com/watch?v=abc123xyz","thumbnailUrl":"https://i.ytimg.com/vi/abc123xyz/maxresdefault.jpg","viewCount":152340,"likeCount":4200,"commentsCount":312,"duration":"20:15","uploadDate":"2025-12-01","channelName":"Code Academy","channelUrl":"https://www.youtube.com/channel/UC1234567890","subscriberCount":"1.2M subscribers","description":"In this tutorial we cover ...","hashtags":["#webscraping","#nodejs"],"subtitles":"Hi everyone, welcome to this tutorial ...","scrapedAt":"2026-03-06T12:00:00.000Z"}
Tech Stack
- Apify SDK v3 β Actor lifecycle, dataset, proxy
- Crawlee β
CheerioCrawlerwith labeled routing - TypeScript 5 β strict mode, ESM
- Node.js 20
Project Structure
βββ .actor/β βββ actor.json # Actor metadataβββ src/β βββ main.ts # Entry point β input parsing, crawler setupβ βββ scraper.ts # Crawlee router & request handlersβ βββ types.ts # TypeScript interfaces & enumsβ βββ utils.ts # JSON extraction, URL helpers, parsersβββ Dockerfile # Docker image definitionβββ INPUT_SCHEMA.json # Apify input schemaβββ package.json # Dependencies & scriptsβββ tsconfig.json # TypeScript configβββ README.md # This file
Local Development
# Install dependenciesnpminstall# Create an input filemkdir-p storage/key_value_stores/defaultecho'{ "searchTerms": ["apify tutorial"], "maxResults": 5 }'\> storage/key_value_stores/default/INPUT.json# Run in development mode (tsx β no build step)npm run dev# Or build & runnpm start
Note: Proxy is only available when running on the Apify platform. Local runs execute without proxy and may be rateβlimited by YouTube.
Deploying to Apify
# Install the Apify CLInpminstall-g apify-cli# Log inapify login# Push the Actor to Apifyapify push
How It Works
- Search URLs are built from
searchTermswith optionalspprotobuf filters for date and video type. - CheerioCrawler fetches each page and the embedded
ytInitialData/ytInitialPlayerResponseJSON blobs are extracted from<script>tags β no browser needed. - Search results are parsed and individual video page requests are
enqueued (up to
maxResults). - Pagination uses YouTube's innertube continuation API via POST requests with the continuation token.
- Each video page handler extracts detailed metadata (likes, comments,
subscribers, subtitles) and pushes a
VideoDatarecord to the Apify Dataset.
License
ISC
