
YouTube Channel Video Scraper
Pricing
$10.00 / 1,000 results
Go to Store

YouTube Channel Video Scraper
Scrape the latest YouTube videos of a channel with views and duration.
0.0 (0)
Pricing
$10.00 / 1,000 results
0
Total users
5
Monthly users
5
Runs succeeded
>99%
Last modified
2 days ago
A powerful Apify Actor that scrapes video data from YouTube channels including titles, URLs, views, and duration information.
Features
- ✅ Scrapes video titles and URLs from YouTube channels
- ✅ Extracts metadata like views and duration (optional)
- ✅ Handles infinite scroll with configurable parameters
- ✅ Robust error handling and retry logic
- ✅ Works with modern YouTube DOM structure
- ✅ Configurable scraping limits and delays
Input Configuration
The actor accepts the following input parameters:
Field | Type | Required | Description | Default |
---|---|---|---|---|
channelUrl | String | ✅ | YouTube channel URL (must end with /videos) | - |
maxVideos | Integer | ❌ | Number of videos to scrape (1-1000) | 25 |
scrollDelay | Integer | ❌ | Delay between scroll actions in seconds (1-10) | 2 |
maxScrolls | Integer | ❌ | Maximum number of scrolls to perform (1-50) | 10 |
includeMetadata | Boolean | ❌ | Whether to scrape views and duration | true |
Example Input
{"channelUrl": "https://www.youtube.com/@Apify/videos","maxVideos": 25,"scrollDelay": 2,"maxScrolls": 10,"includeMetadata": true}
Output
The actor outputs a dataset containing video information:
{"url": "https://www.youtube.com/@YourChannel/videos","videos": [{"title": "Video Title","url": "https://www.youtube.com/watch?v=VIDEO_ID","views": "1.2M views","duration": "12:34"}],"totalVideos": 25,"scrapedAt": "2025-01-22T14:30:00.000Z"}
Usage
Via Apify Console
- Go to Apify Console
- Create a new Actor or use this one
- Configure the input parameters
- Run the Actor
Via Apify API
import { ApifyApi } from 'apify-client';const client = new ApifyApi({token: 'YOUR_API_TOKEN',});const input = {channelUrl: 'https://www.youtube.com/@Apify/videos',maxVideos: 25};const run = await client.actor('your-actor-id').call(input);const { items } = await client.dataset(run.defaultDatasetId).listItems();
Via Apify CLI
$apify call your-actor-id --input='{"channelUrl": "https://www.youtube.com/@Apify/videos"}'
Technical Details
- Base Image:
apify/actor-node-playwright-chrome:20
- Runtime: Node.js 20 with Playwright and Chrome
- Selectors: Multiple fallback selectors for YouTube's dynamic DOM
- Error Handling: Comprehensive try-catch blocks with retries
- Rate Limiting: Built-in delays and scroll limits to avoid blocking
Limitations
- YouTube may block requests if rate limits are exceeded
- Video counts depend on channel size and scroll settings
- Some private or restricted videos may not be accessible
- DOM selectors may need updates if YouTube changes their structure
Support
For issues, feature requests, or questions:
- Check the Actor's run logs for detailed error information
- Adjust scroll delays and limits if encountering rate limiting
- Ensure the channel URL format is correct (must end with /videos)
License
This actor is provided as-is for educational and research purposes.