Youtube Search Scraper
Pricing
$3.99/month + usage
Youtube Search Scraper
This YouTube Search Scraper extracts video results based on a dynamic user search query. It collects video title, URL, channel name, views, upload time, duration, thumbnail, and more. Supports result limits and saves structured data in JSON format for analysis and research purposes.
Pricing
$3.99/month + usage
Rating
5.0
(4)
Developer

ScrapeAI
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
This actor scrapes YouTube search results based on a user-provided search query.
Features
- Dynamic search query input
- Automatically constructs YouTube search URL
- Scrapes video metadata from search results
- Supports max result limit
- Infinite scroll to load more results
- Outputs structured JSON dataset
Input
{"search_query": "cocomelon","max_results": 20,"debugMode": false}
Input Fields
| Field | Type | Required | Description |
|---|---|---|---|
search_query | string | ✅ Yes | Keyword to search on YouTube |
max_results | integer | No (default: 20) | Maximum number of videos to scrape |
debugMode | boolean | No (default: false) | Save debug screenshots and verbose logs |
How It Works
- Accepts
search_queryfrom user input - Constructs search URL:
https://www.youtube.com/results?search_query={{search_query}} - Opens YouTube search results page with Puppeteer
- Scrolls the page to load more results
- Extracts video metadata from all loaded video cards
Note: By default
Actor.pushData(data)writes to the default dataset (local pathstorage/datasets/default/). Opening a named dataset such as the former if you want all results in the default dataset; the latter if you need a dedicated dataset with its own view schema.
Example Record
{"id": "xxxxxxx","title": "Cocomelon - Wheels on the Bus","description": "Sing along with JJ and friends...","type": "video","viewCount": 2100000000,"duration": "3:30","url": "https://www.youtube.com/watch?v=xxxxxxx","thumbnail": "https://i.ytimg.com/vi/xxxxxxx/hqdefault.jpg","date": "2021-02-26T00:00:00Z","channelName": "Cocomelon - Nursery Rhymes","channelUrl": "https://www.youtube.com/@Cocomelon","channelHandle": "@Cocomelon","channelThumbnail": null,"searchQuery": "cocomelon","scrapedAt": "2026-02-26T15:00:00.000Z","raw": {"type": "video","videoId": "xxxxxxx","title": "Cocomelon - Wheels on the Bus","channelTitle": "Cocomelon - Nursery Rhymes","channelId": null,"channelHandle": "@Cocomelon","description": "Sing along with JJ and friends...","viewCountText": "2.1B views","viewCount": "2100000000","publishedTimeText": "5 years ago","publishDate": null,"publishedAt": null,"lengthText": "3:30","thumbnail": [{"url": "https://i.ytimg.com/vi/xxxxxxx/hqdefault.jpg","width": 480,"height": 360}]}}
Output Schema
| Field | Type | Description |
|---|---|---|
video_title | string | Title of the video |
video_url | string | Full YouTube video URL |
channel_name | string | Name of the channel |
channel_url | string | URL of the channel |
views | string | View count text (e.g. "2.1B views") |
uploaded_time | string | Upload time text (e.g. "5 years ago") |
video_duration | string | Video duration (e.g. "3:30") |
thumbnail_url | string | High-quality thumbnail image URL |
description | string | Short description snippet (if available) |
Example
Search Query: cocomelon
Generated URL: https://www.youtube.com/results?search_query=cocomelon