Youtube Scraper
Pricing
from $4.00 / 1,000 results
Youtube Scraper
Alternative to the YouTube API with zero quota limits. Crawl YouTube videos and channels to extract names, views, likes, and subscriber data.
Pricing
from $4.00 / 1,000 results
Rating
0.0
(0)
Developer

JPrime
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Share
A powerful Apify Actor for scraping videos, channels, playlists, and search results from YouTube. Extract comprehensive video metadata including views, likes, channel information, and more.
Features
- ๐ฅ Multiple URL Types: Scrape individual videos, entire channels, playlists, and search results
- ๐ฌ Shorts Support: Automatically discovers and tags YouTube Shorts from channels
- ๐บ Streams Support: Automatically discovers and tags live streams and past streams
- ๐ Search Functionality: Search YouTube by keywords and scrape the results
- ๐๏ธ Advanced Search Filters: Filter search results by type, duration, features, sort order, and upload date
- ๐ Rich Metadata: Extract titles, descriptions, views, likes count, upload dates, and more
- ๐ค Channel Information: Get channel names, URLs, subscriber counts
- ๐ผ๏ธ Thumbnails: Get high-quality video thumbnail URLs
- โ๏ธ Flexible Configuration: Control what data to scrape and how many results to collect
Input
The Actor accepts the following input parameters:
| Field | Type | Description | Default |
|---|---|---|---|
startUrls | Array | List of YouTube URLs to scrape (videos, channels, playlists, search results) | Required |
searchQueries | Array | Search queries to find videos | [] |
searchFilters | Object | Filters to apply to search results (see Search Filters section) | {} |
maxResults | Number | Maximum number of videos to scrape per channel/playlist/search query | 20 |
maxRequestsPerCrawl | Number | Maximum number of pages to process (0 = unlimited) | 100 |
scrapeVideoDetails | Boolean | Extract detailed information from each video page | true |
scrapeChannelInfo | Boolean | Extract channel information when scraping videos | true |
proxyConfiguration | Object | Proxy settings (recommended for YouTube) | Uses Apify Proxy |
Example Input
{"startUrls": [{ "url": "https://www.youtube.com/@lexfridman" },{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" },{ "url": "https://www.youtube.com/playlist?list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf" }],"searchQueries": ["web scraping tutorial", "machine learning"],"maxResults": 20,"scrapeVideoDetails": true}
Search Filters
The Actor supports advanced search filters to refine YouTube search results. Filters can be combined to create highly targeted searches.
Available Filters
| Filter | Type | Options | Description |
|---|---|---|---|
type | String (Single) | videos, shorts, channels, playlists, movies | Filter by content type |
duration | String (Single) | under3, 3to20, over20 | Filter by video duration |
features | Array (Multi) | live, 4k, hd, subtitles, creativeCommons, 360, vr180, 3d, hdr, location, purchased | Filter by video features |
sortBy | String (Single) | relevance, popularity | Sort search results |
uploadDate | String (Single) | today, thisWeek, thisMonth, thisYear | Filter by upload date |
Important Notes
- Upload Date Limitation: The
uploadDatefilter is only applicable tovideos,shorts, andmovies. When an upload date is applied, YouTube automatically defaults to video type. - Filter Combination: โ Fully Supported! You can now combine filters from different categories (e.g., type + duration + sortBy + uploadDate)into a single SP parameter.
- Multi-Select Features: โ
Fully Supported! You can combine multiple features (e.g.,
["hd", "4k", "subtitles"]).
Example with Search Filters
{"startUrls": [],"searchQueries": ["web scraping tutorial", "machine learning basics"],"searchFilters": {"type": "videos","duration": "3to20","features": ["hd", "subtitles"],"sortBy": "popularity","uploadDate": "thisMonth"},"maxResults": 10,"scrapeVideoDetails": true}
This example searches for popular videos about "web scraping tutorial" and "machine learning basics" that are:
- Between 3-20 minutes long
- In HD with subtitles
- Uploaded within the last month
- Sorted by popularity
Search Filter Examples
Example 1: Recent HD Shorts
{"searchQueries": ["cooking recipes"],"searchFilters": {"type": "shorts","features": ["hd"],"uploadDate": "thisWeek"}}
Example 2: Long-form Educational Videos
{"searchQueries": ["python programming"],"searchFilters": {"type": "videos","duration": "over20","features": ["subtitles"],"sortBy": "relevance"}}
Example 3: 4K HDR Content
{"searchQueries": ["nature documentary"],"searchFilters": {"type": "videos","features": ["4k", "hdr"],"duration": "over20"}}
Output
The Actor outputs structured data for each video scraped:
{"videoId": "dQw4w9WgXcQ","title": "Rick Astley - Never Gonna Give You Up","url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ","type": "video","description": "The official video for "Never Gonna Give You Up"...","thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg","channelId": "@RickAstleyYT","channelName": "Rick Astley","channelUrl": "https://www.youtube.com/@RickAstleyYT","channelSubscribers": "3.5M subscribers","viewCount": 1500000000,"likeCount": 15000000,"commentCount": 1200000,"uploadDate": "Oct 25, 2009","duration": "3:33","category": "Music","tags": ["rick astley", "never gonna give you up", "80s music"]}
Supported URL Types
The Actor automatically detects and handles different YouTube URL types:
- Videos:
https://www.youtube.com/watch?v=VIDEO_IDorhttps://youtu.be/VIDEO_ID - Shorts:
https://www.youtube.com/shorts/VIDEO_ID - Channels:
https://www.youtube.com/@CHANNEL_NAMEorhttps://www.youtube.com/channel/CHANNEL_ID - Playlists:
https://www.youtube.com/playlist?list=PLAYLIST_ID - Search Results:
https://www.youtube.com/results?search_query=QUERY
Use Cases
- Market Research: Analyze video trends, engagement metrics, and popular content across all content types
- Competitor Analysis: Monitor competitor channels and their video performance (videos, shorts, and streams)
- Content Discovery: Find videos on specific topics for research or curation
- SEO Analysis: Extract metadata and tags from successful videos
- Data Analysis: Build datasets for machine learning or analytics projects
- Channel Monitoring: Track new uploads and engagement on specific channels
- Content Type Analysis: Compare performance across videos, shorts, and streams
- Stream Analysis: Track live stream performance and archived streams
Performance Tips
- Use Proxies: YouTube may rate-limit or block requests without proxies. Enable Apify Proxy in the input.
- Limit Results: Use
maxResultsto control how many videos to scrape per source. - Adjust Concurrency: The Actor uses conservative concurrency (3) to avoid blocks. This is configurable in the code.
Notes
- The Actor respects YouTube's Terms of Service. Use responsibly and ethically.
- For production use, always use proxies to avoid IP blocks
- YouTube may show different content based on location/cookies
- Some videos may have restricted data (age-restricted, private, etc.)