YouTube Search Scraper
Pricing
from $0.70 / 1,000 search results
YouTube Search Scraper
Search YouTube and get videos, channels or playlists as structured data: title, channel, views, duration, publish date, snippet. Filters for upload date, duration, type, sort order, country and language. No API key, no quota.
Pricing
from $0.70 / 1,000 search results
Rating
0.0
(0)
Developer
Tarik Cerkezovic
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
16 days ago
Last modified
Categories
Features
Share
Run YouTube searches and get the results as structured data. For every query you get videos (or channels, or playlists) in YouTube's order with title, channel, views, duration, publish date, live flag and description snippet. The filters are the ones on YouTube's own search page: upload date, duration, type, sort by relevance, upload date, view count or rating, plus country and language.
No YouTube API key, no daily quota, no login. Built for keyword research, trend monitoring, competitor tracking, dataset building and agents that need "what is on YouTube about X".
What you get
| Field | Description |
|---|---|
query, position, estimatedResults | The query, the 1-based rank, and YouTube's estimate of total matches |
type, id, url, title | video, channel or playlist; the ID is the video, channel or playlist ID |
channelId, channelName, channelHandle, channelUrl, isVerifiedChannel | Who published it |
durationSeconds, durationText | Video length |
viewCount, viewCountText | Views as a number and as shown |
publishedText, publishedAt | "2 years ago" and an ISO date estimated from it |
isLive, descriptionSnippet, thumbnailUrl | Live flag, the snippet YouTube shows, largest thumbnail |
subscriberCount, videoCount | Channel results: subscribers and video count. Playlists: video count |
error, errorMessage | Only on query-level failures |
Sample output
{"query": "python tutorial for beginners","position": 1,"estimatedResults": 9914099,"type": "video","id": "kqtD5dpn9C8","url": "https://www.youtube.com/watch?v=kqtD5dpn9C8","title": "Python for Beginners - Learn Coding with Python in 1 Hour","channelId": "UCWv7vMbMWH4-V0ZXdmDpPBA","channelName": "Programming with Mosh","channelHandle": "@programmingwithmosh","channelUrl": "https://www.youtube.com/@programmingwithmosh","isVerifiedChannel": true,"durationSeconds": 3606,"durationText": "1:00:06","viewCount": 25837819,"viewCountText": "25,837,819 views","publishedText": "6 years ago","publishedAt": "2020-11-05T16:40:00.000Z","isLive": false,"descriptionSnippet": "... out my Complete Python Mastery course ...","thumbnailUrl": "https://i.ytimg.com/vi/kqtD5dpn9C8/hq720.jpg","fetchedAt": "2026-11-05T16:40:00.000Z"}
Input
| Field | Type | Default | What it does |
|---|---|---|---|
queries | array of strings | required | One search per entry. |
maxResultsPerQuery | integer | 50 | Pages are followed until this many results are collected (up to 1,000). |
type | video, channel, playlist, any | video | What to return. |
sortBy | relevance, upload_date, view_count, rating | relevance | Order. |
uploadDate | any, hour, today, week, month, year | any | Upload-date filter for videos. |
duration | any, short, medium, long | any | Under 4 min, 4 to 20 min, over 20 min. |
liveOnly | boolean | false | Only live streams. |
country, language | strings | US, en | Localisation, as YouTube's own settings. |
maxConcurrency | integer | 3 | Queries in parallel. |
proxyConfiguration | object | Apify datacenter proxy | Proxy for all requests. |
residentialFallback | boolean | true | Retry a blocked query through residential proxies, only on a detected block. |
Minimal input:
{ "queries": ["ai agents"], "uploadDate": "week", "sortBy": "view_count" }
Errors
error | Meaning | Charged? |
|---|---|---|
NO_RESULTS | YouTube returned nothing for the query and filters | no |
BLOCKED | YouTube refused the search from every proxy tried | no |
FETCH_FAILED | Network or parsing failure | no |
Pricing
Pay per event: a small fixed amount per result item, plus Apify platform usage. Error items are free. Set a maximum total charge on the run to cap spend; the actor stops cleanly at the limit.
Notes
- Results and their order are what YouTube shows an anonymous visitor in the chosen country and language. Personalised or signed-in results differ.
publishedAtis estimated from the relative text ("2 years ago"), so it is as precise as that text.- Shelves YouTube injects into results ("People also watched", Shorts shelves, "Latest from channel") are skipped, so positions count real results only.
- Datacenter proxies are used first; residential proxies only when a block is detected, which keeps cost low.
Using it from code
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('serentity/youtube-search-scraper').call({ queries: ['ai agents'], maxResultsPerQuery: 100, uploadDate: 'month' });const { items } = await client.dataset(run.defaultDatasetId).listItems();
Legal
The data is what YouTube's public search shows to any visitor. No login, no personal data beyond public channel names. Use it in line with YouTube's terms of service.