YouTube Search Scraper
Pricing
from $0.90 / 1,000 results
YouTube Search Scraper
An optimized YouTube scraper to search videos, shorts, and streams by keywords, playlists, or channel URLs. Extract rich metadata, views, likes, and download subtitles/transcripts automatically.
Pricing
from $0.90 / 1,000 results
Rating
0.0
(0)
Developer
seungkyu cho
Maintained by CommunityActor stats
1
Bookmarked
1
Total users
1
Monthly active users
3.6 days
Issues response
a day ago
Last modified
Categories
Share
๐ Ultimate YouTube Scraper: Video, Search, Subtitles, Channels & Playlists (Fast & Ultra-Low Cost)
A highly optimized, production-grade YouTube Scraper engineered to extract deep metadata, search queries, channel lists, playlists, and full transcripts/subtitles. It is designed to maximize speed, ensure bypasses against anti-bot triggers, and operate on an ultra-low memory budget to save you up to 80% on cloud compute fees.
๐ก Why Choose This YouTube Scraper? (Key Advantages)
Unlike other heavy, browser-only scrapers on the market that easily crash or consume massive amounts of RAM, this actor is designed for maximum business utility and cost efficiency.
| Feature / Advantage | ๐ This Scraper | โ Generic Scrapers | Your Benefit |
|---|---|---|---|
| Minimum RAM Requirement | 256 MB | 1 GB - 2 GB | Save ~80% on platform compute costs. |
| Hybrid Execution Engine | Yes (HTTP + Playwright) | No (Browser Only) | Fast queries bypass slow page renders. |
| Absolute Epoch Timestamps | Yes (interpolatedTimestamp) | No (Vague relative dates) | Ready-to-use data for time-series and AI. |
| Robust Subtitle Downloader | Yes (SRT, VTT, TXT, JSON) | No or Limited | Instant text corpus for LLMs and NLP training. |
| Targeted Geo & Language | Yes (gl and hl control) | No (Forced English/US) | Get localized search order and original language titles. |
| Duplication Guard | Yes (Automated Deduplication) | No | No wasted storage; you pay only for unique data. |
| Auto V8 Garbage Collection | Yes (Container Safe) | No | Eliminates Out-Of-Memory (OOM) failures mid-job. |
๐๏ธ Technical Architecture
The scraper implements a smart multi-stage dispatch pipeline to execute high-throughput extraction while keeping resources low.
graph TDA[Input JSON Config] --> B{Task Distributor}B -- "Search Query / Search URL" --> C[HTTP InnerTube API - Ultra Fast]B -- "Channel Handle / Playlist URL" --> D[Playwright Stealth Browser]C --> E[Video IDs & Search Metadata]D --> EE --> F[Stage 2: Deep Watch Page Extraction]F --> G[Extract InnerTube Player Details: Views, Likes, Description]F --> H[Extract Captions / Subtitles if enabled]G --> I[Relational Timestamp Interpolator]H --> J[Compile Dataset Item]I --> JJ --> K[Push to Apify Dataset]K --> L[V8 Garbage Collection Memory Cleanup]
๐ฏ Business Use Cases & Value Drivers
This tool is more than just a scraper; it is a pipeline feeder for critical data operations:
- ๐ง AI & LLM Training: Extract clean video transcripts/subtitles (available in multiple formats) and video details to compile datasets for natural language processing, summarization, and custom AI agents.
- ๐ Market & Trend Monitoring: Analyze video views, likes, upload dates, and engagement velocities to identify emerging viral trends before they peak.
- ๐ต๏ธ Competitor & Brand Intelligence: Track brand mentions, monitor competitor channel uploads, and analyze video tags and descriptions to optimize your own YouTube SEO.
- ๐ค Influencer Marketing: Search for target keywords to find high-performing creators, analyze their subscriber-to-like engagement ratios, and export lists for partnership outreach.
โ๏ธ Full Configuration Parameters
The Actor accepts a comprehensive JSON configuration, allowing you to fine-tune the scraping behavior to balance depth, speed, and cost.
๐ Main Targets & Input
| Parameter | Type | Default | Description |
|---|---|---|---|
searchQueries | array | [] | List of search keywords or phrases to query. |
startUrls | array | [] | Direct YouTube URLs to scrape (supports Videos, Channel URLs, or Playlist URLs). |
channelHandles | array | [] | Channel handles (e.g. @SpaceX, UC3xY...) to fetch uploads from. |
๐ Results & Limits
| Parameter | Type | Default | Description |
|---|---|---|---|
maxResults | integer | 50 | Maximum standard video results to collect per query/channel/playlist source. |
maxResultsShorts | integer | 0 | Maximum YouTube Shorts results to scrape per source. |
maxResultStreams | integer | 0 | Maximum YouTube Live Streams to scrape per source. |
concurrencyLimit | integer | 3 | Parallel scraping workers to run concurrently (increases speed). |
batchSize | integer | 1 | Number of items to batch together before flushing to dataset storage. |
๐ ๏ธ Filtering & Sorting
| Parameter | Type | Default | Description |
|---|---|---|---|
sortingOrder | string | "relevance" | Sort search results: relevance, popularity (views), uploadDate, or rating. |
dateFilter | string | "any" | Upload date filter: any, hour, today, thisWeek, thisMonth, thisYear. |
lengthFilter | string | "any" | Video duration filter: any, under4 (mins), between420 (4-20 mins), over20 (mins). |
features | string | "any" | Special features filter: any, live, 4k, hd, subtitles, creativeCommons, 3d, hdr. |
sortVideosBy | string | "NEWEST" | Sort channel tab videos: NEWEST, OLDEST, POPULAR. |
oldestPostDate | string | "" | Optional ISO date limit. Stop scraping if video is older than this date (e.g., "2025-01-01"). |
useQueryExpansion | boolean | false | Enable to expand query terms for broader, semantic search coverage. |
๐ฌ Subtitles & Localisation
| Parameter | Type | Default | Description |
|---|---|---|---|
downloadSubtitles | boolean | false | Set to true to extract full transcripts. |
subtitlesFormat | string | "srt" | Subtitle output format: srt, vtt, txt, json. |
preferAutoGeneratedSubtitles | boolean | false | Fallback to auto-translated/auto-generated transcripts if manual ones are missing. |
saveSubsToKVS | boolean | false | Store heavy transcript text files to Apify Key-Value Store instead of inline Dataset items to save file space. |
hl | string | "en" | Host Language code (e.g., ko, ja, es). Forces YouTube to return data in specific translations. |
gl | string | "US" | Geographical localization country code (e.g., KR, JP, FR). Influences search rankings and trend relevance. |
๐ System & Bypasses
| Parameter | Type | Default | Description |
|---|---|---|---|
usePlaywright | boolean | false | Force browser automation for all tasks (Warning: increases RAM consumption). |
channelTab | string | "videos" | Channel tab to scrape: videos, shorts, streams, playlists, community, about. |
proxyConfiguration | object | {"useApifyProxy": true} | Proxy configuration details. Residential proxies are highly recommended. |
๐ฆ Output Dataset Schema
Each item pushed to the Apify dataset represents a detailed video report:
{"id": "R8m3G1E4s-g","url": "https://www.youtube.com/watch?v=R8m3G1E4s-g","title": "SpaceX Starship Test Flight 4 Launch","description": "Watch SpaceX launch Starship Flight 4 from Starbase, Texas...","thumbnailUrl": "https://i.ytimg.com/vi/R8m3G1E4s-g/maxresdefault.jpg","channelName": "SpaceX","channelUrl": "https://www.youtube.com/@SpaceX","channelId": "UC3xYfSxxxxxxx","channelSubscriberCount": "15.4M subscribers","lengthSeconds": 3600,"viewCount": 2450000,"likes": 120000,"publishedDate": "2026-06-25T12:00:00.000Z","publishedTimeText": "2 days ago","interpolatedTimestamp": 1744027200000,"badges": ["4K", "CC"],"keywords": ["space", "rocket", "starship"],"transcript": "[00:01] Welcome back...\n[00:10] Starship is fully fueled...","subtitlesLanguage": "en"}
๐ Get Started
Run via Apify Client (Node.js SDK)
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });const run = await client.actor('your-username/youtube-search-scraper').call({searchQueries: ["Generative AI Trends"],maxResults: 50,downloadSubtitles: true,subtitlesFormat: "txt",hl: "en",gl: "US",proxyConfiguration: {useApifyProxy: true,apifyProxyGroups: ["RESIDENTIAL"]}});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(`Successfully scraped ${items.length} videos!`);
Local Development Setup
- Clone & Install Dependencies:
$npm install
- Configure Input: Edit
input.jsonin the root folder. - Run the Actor:
$npm start
- Execute Local Tests:
$npm test
๐ก๏ธ License & Disclaimers
- License: MIT Licensed. Free to customize, modify, and distribute.
- Disclaimer: This scraper is intended for research, analytics, and archiving purposes. Please utilize proxies responsibly and respect YouTube's Terms of Service.