youtube_search_scraper
Scrape YouTube search results to get videos, channels, or playlists with titles, views, duration, and publish time—no API key or quota needed.
Instructions
YouTube Search Results Scraper returns videos, channels or playlists for any keyword, with title, views, duration, channel and publish time — no API key, no quota. Billed to your own Apify account: ~$0.0005 per result (Apify free-plan price, lower on paid plans).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Result type — Choose what kind of result to return: all mixes videos, channels and playlists; video/channel/playlist restrict the search server-side to one kind (verified live against YouTube's search endpoint). Options: all = All (videos, channels, playlists); video = Videos only; channel = Channels only; playlist = Playlists only. | video |
| region | No | Region — Country code sent to YouTube as gl, e.g. US. Affects which results and trending content YouTube considers local. | US |
| sortBy | No | Sort by — How to order results. relevance (default) and views are applied by YouTube's server and verified live (views produces a clean view-count-descending order). date and rating could not be verified server-side during testing — for those two the Actor instead re-sorts the page(s) it already fetched by parsed publish time client-side, which is a best-effort approximation, not a true site-wide sort; see the README. Options: relevance = Relevance (default); date = Upload date (best-effort, client-side); views = View count (verified server-side); rating = Rating (best-effort, unreliable — YouTube hides ratings). | relevance |
| queries | Yes | Search queries — Enter the search terms to run on YouTube, one row is returned per result, e.g. web scraping tutorial. One dataset row is produced per matching video, channel or playlist. Example: ["web scraping tutorial"]. | |
| duration | No | Duration — Only return videos of this length: short is under 4 minutes, medium is 4-20 minutes, long is over 20 minutes. Verified live against YouTube's own duration filter. Ignored when Result type is channel or playlist. Options: any = Any length; short = Short (< 4 min); medium = Medium (4-20 min); long = Long (> 20 min). | any |
| language | No | Interface language — Language code sent to YouTube as hl, e.g. en. Affects relative time text ("2 days ago") and UI strings the parser reads. | en |
| uploadDate | No | Upload date — Only return videos uploaded within this window, e.g. week for the last 7 days. Verified live against YouTube's own upload-date filter. Ignored when Result type is channel or playlist. Options: any = Any time; hour = Last hour; today = Today; week = This week; month = This month; year = This year. | any |
| maxResultsPerQuery | No | Max results per query — Enter how many results to return per search query, e.g. 50. The Actor pages through YouTube's search continuations until it reaches this number or YouTube runs out of results. |