Youtube Search Scraper
Pricing
from $5.00 / 1,000 search results
Youtube Search Scraper
Search YouTube with one or more queries via the official YouTube Data API and export structured results with optional video-level statistics and durations.
Pricing
from $5.00 / 1,000 search results
Rating
0.0
(0)
Developer
Akash Kumar Naik
Maintained by CommunityActor stats
0
Bookmarked
19
Total users
5
Monthly active users
6 days ago
Last modified
Categories
Security
Limited permissionsShare
YouTube Search Scraper is an Apify Actor that searches YouTube with one or more queries via the official YouTube Data API v3 and exports structured results — videos, channels, or playlists — with optional video-level statistics and durations.
What Is YouTube Search Scraper?
This Actor lets you search YouTube programmatically and get structured results including video details, channel information, and statistics. Perfect for content researchers, marketers, and developers building YouTube data pipelines. Results land in the default dataset where they can be exported as JSON, CSV, or Excel.
Key Features
- Official YouTube Data API v3 for reliable, stable results
- Videos, channels, and playlists — search any resource type
- Optional video details — duration, view count, likes, comments via
videos.list - Rich filters — sort order, video duration, publish date ranges, region, language, and SafeSearch
- Pagination support for large result sets (up to 500 results per query)
- Automatic retries with exponential backoff
- Respects user spending limits automatically
- Pay-per-event pricing — $0.01 per search result
Use Cases
- Content research and trend analysis
- Competitor channel monitoring
- Video metadata collection for ML/AI pipelines
- Building searchable video databases
- YouTube analytics and reporting
Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
searchQuery | string | Yes | — | YouTube search query (up to 200 characters) |
maxResults | integer | No | 10 | Maximum results to fetch (1–500) |
type | string | No | video | Resource type: video, channel, or playlist |
order | string | No | relevance | Sort order: relevance, date, rating, title, videoCount, viewCount |
videoDuration | string | No | any | any, short (<4 min), medium (4–20 min), long (>20 min) — video type only |
publishedAfter | string | No | — | Date or relative time (e.g. "7 days", "2 weeks"); absolute dates use YYYY-MM-DD |
publishedBefore | string | No | — | Date or relative time (e.g. "7 days", "2 weeks"); absolute dates use YYYY-MM-DD |
regionCode | string | No | — | ISO 3166-1 alpha-2 country code (e.g. US, IN) |
relevanceLanguage | string | No | — | BCP-47 language tag (e.g. en, hi) |
safeSearch | string | No | moderate | moderate, none, or strict |
includeVideoDetails | boolean | No | true | Also fetch duration and statistics (video type only) |
Example input:
{"searchQuery": "apify tutorial","maxResults": 50,"type": "video","order": "relevance","includeVideoDetails": true}
Sample Output
Each dataset item contains:
{"searchQuery": "apify tutorial","position": 1,"resultKind": "video","resultId": "3rrpfW0bEdc","resultUrl": "https://www.youtube.com/watch?v=3rrpfW0bEdc","videoId": "3rrpfW0bEdc","channelId": "UCqD-h6ucBDUntfoapPyhp0Q","title": "Apify Tutorial For Beginners | How To Use Apify","description": "Apify review: https://speakaboutdigital.com/apify-review/","publishedAt": "2023-07-31T08:11:38Z","channelTitle": "Speak About Digital","thumbnailUrl": "https://i.ytimg.com/vi/3rrpfW0bEdc/hqdefault.jpg","duration": "PT10M41S","durationSeconds": 641,"viewCount": 30007,"likeCount": 338,"commentCount": 13,"embeddable": true,"license": "youtube","privacyStatus": "public"}
How to Use
- Open the Actor page on Apify Store and click Start Actor.
- Enter your search query and pick the result type (video, channel, or playlist).
- Apply filters — sort order, duration, publish dates, region, language, SafeSearch — as needed.
- Run the Actor and download results as JSON, CSV, or Excel from the dataset.
How to Use via API
cURL:
curl -X POST "https://api.apify.com/v2/acts/akash9078/youtube-search-scraper/runs" \-H "Authorization: Bearer YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"searchQuery": "apify tutorial", "maxResults": 50}'
Python:
import requestsresponse = requests.post("https://api.apify.com/v2/acts/akash9078/youtube-search-scraper/runs",headers={"Authorization": "Bearer YOUR_APIFY_TOKEN"},json={"searchQuery": "apify tutorial", "maxResults": 50},)print(response.json())
Node.js with Apify Client:
const { ApifyClient } = require('apify-client');const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('akash9078/youtube-search-scraper').call({searchQuery: 'apify tutorial',maxResults: 50,type: 'video',});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Pricing
| Event | Price |
|---|---|
Search Result (search-result) | $0.01 per result |
You are charged for each YouTube search result returned (video, channel, or playlist). The Actor respects user-configured spending limits automatically.
Limitations
- The YouTube Data API has quota limits — keep
maxResultsreasonable - Some videos may not have like/comment counts available
- Private videos are not accessible
- Search queries are capped at 200 characters
FAQ
Do I need my own YouTube API key?
No. The Actor runs on the official YouTube Data API v3 with the key managed on the Apify platform — just provide a search query.
How many results can I get per query?
Between 1 and 500, controlled by maxResults (default 10).
Can I filter by publish date?
Yes — publishedAfter and publishedBefore accept absolute dates (YYYY-MM-DD) or relative times like "7 days" or "2 weeks".
Can I search for channels and playlists?
Yes. Set type to video, channel, or playlist. Video-only filters such as duration and includeVideoDetails apply when type is video.
How is billing calculated?
$0.01 per returned search result under the pay-per-event model.
Related Actors
If you need more YouTube data from Apify, check out my other Apify Actors:
- YouTube Transcript Scraper — extract transcripts from any YouTube video
- YouTube Transcript Extractor — transcripts with timestamps in 100+ languages
- YouTube Full Channel Transcripts Extractor — transcripts for entire channels
- YouTube Playlist Scraper with Transcript — playlist metadata plus transcripts
- YouTube Channel Video Scraper — video metadata for entire channels
- YouTube Playlist Scraper — full metadata for every video in a playlist
- YouTube Trending Scraper — trending videos by region and category
Built and maintained by akash9078 on the Apify platform. For issues or questions, visit the Apify Community or report bugs via Apify Console.