YouTube Search Scraper - Videos & Shorts by Keyword avatar

YouTube Search Scraper - Videos & Shorts by Keyword

Pricing

from $0.50 / 1,000 results

Go to Apify Store
YouTube Search Scraper - Videos & Shorts by Keyword

YouTube Search Scraper - Videos & Shorts by Keyword

Scrape YouTube search results for any keyword in the same order as on YouTube: videos or Shorts with exact views, likes, publish date, duration, tags and channel stats like subscribers and country. Filter by upload date, duration, features, popularity and country.

Pricing

from $0.50 / 1,000 results

Rating

5.0

(30)

Developer

Zebu Data

Zebu Data

Maintained by Community

Actor stats

39

Bookmarked

314

Total users

133

Monthly active users

14 days ago

Last modified

Share

What does YouTube Search Scraper do?

YouTube Search Scraper gets the videos YouTube shows for any keyword, in the same order as the search results page, and returns them as clean, structured data: title, link, exact views and likes, exact publish date, duration, description, tags and category, plus the stats of each video's channel: subscribers, total views, country and links. It works as an unofficial YouTube search API alternative: no API key, no quota and no login.

Type your keywords, set the same filters you'd use on YouTube (upload date, duration, type, features, popularity, country), click Start, and download the results as JSON, CSV or Excel.

Why use YouTube Search Scraper?

  • πŸ” The same filters as YouTube: Type (Videos or Shorts), Upload date, Duration, Features (Live, 4K, HD, Subtitles/CC, Creative Commons and more) and Prioritize (Relevance or Popularity), plus the country you search from.
  • πŸ”’ Exact numbers you can sort: exact view and like counts and a UTC publish timestamp, next to the text YouTube shows (81,484 views, 1 year ago).
  • πŸ‘₯ Find creators, not just videos: every row includes the channel's subscribers, total views, country, links and whether it lists a business email.
  • πŸ“‹ Clean, ordered results: each row says which keyword found it and its rank in the results; duplicates that YouTube repeats while paging are removed, so you don't pay for them.
  • 🎬 Videos, Shorts and live streams: each item is marked Video, Short or Live.
  • ⚑ Fast and lightweight: no browser. Set Results per keyword to get exactly as many videos as you need.

Popular use cases: keyword and topic research, competitor and trend tracking, finding influencers in a niche, content ideas, SEO for YouTube, and building video datasets for analytics or AI.

YouTube Search ScraperYouTube Data APICopying by hand
API key / Google Cloud projectNot neededRequiredNot needed
Daily quotaNone100 searches per day by defaultβ€”
Same order as the YouTube websiteYesNot guaranteedYes
Channel stats on every rowYesExtra requestsSlow
Export to CSV / Excel / JSONYesNeeds codeManual

What data can you extract?

Video fields

FieldDescriptionExample
titleVideo titleGive me 8 Minutes and You'll Win at SEO in 2025
detail_urlLink to the videohttps://www.youtube.com/watch?v=vE_A4IhmkKQ
video_idYouTube video IDvE_A4IhmkKQ
search_keywordThe keyword that found itSEO tips
rankPosition in the search results1
video_typeKind of videoVideo, Short or Live
view_count_exactExact view count81487
view_countViews as YouTube shows them81,484 views
like_countLike count1915
published_at_exactExact publish date and time in UTC2025-07-23T11:01:35Z
published_atPublish time as YouTube shows it1 year ago
durationVideo length8:11
duration_secondsVideo length in seconds491
descriptionDescription snippet from the results pageIn this video, you'll learn the best SEO tips ...
video_descriptionFull descriptionIn this video, you'll learn ...
video_categoryYouTube categoryHowto & Style
video_tagsTags set by the creator["seo tips", "seo strategy"]
is_family_safeWhether YouTube marks it as family safetrue
imageThumbnail imagehttps://i.ytimg.com/vi/vE_A4IhmkKQ/hq720.jpg?...
scraped_atWhen the result was scraped (UTC)2026-10-05T07:59:30Z

Channel fields (on every row)

FieldDescriptionExample
publisherChannel nameAhrefs
channel_handleChannel handle@AhrefsCom
channel_idChannel IDUCWquNQV8Y0_defMKnGKrFOQ
channel_urlLink to the channelhttps://www.youtube.com/@AhrefsCom
channel_subscriber_countSubscribers, rounded like YouTube shows them680000
channel_total_viewsTotal views of all the channel's videos34326681
channel_video_countNumber of videos on the channel428
channel_countryCountry from the channel's About panelUnited States
channel_joined_dateDate the channel joined YouTube2015-08-08
channel_is_verifiedHas the verified badgetrue
channel_has_business_emailWhether the channel lists a business email (the email itself needs a YouTube sign-in and is not scraped)false
channel_linksLinks from the channel's About panel[{"title": "Twitter", "url": "http://twitter.com/ahrefs"}]
channel_descriptionChannel descriptionAhrefs TV publishes actionable digital marketing tutorials ...
channel_avatar_urlProfile picturehttps://yt3.ggpht.com/...

How to scrape YouTube search results

  1. Click Try for free on this page and sign in to Apify (a free account is enough).
  2. In Search keywords, type one keyword or phrase per line.
  3. Set Results per keyword and any filters you'd use on YouTube: Type, Upload date, Duration, Features, Prioritize and Country.
  4. Click Start. The log shows each page as it's scraped.
  5. Download the results as JSON, CSV, Excel or HTML, or get them through the API.

How much does it cost to scrape YouTube search results?

You only pay for the videos you get, and duplicates are removed before they are counted. See the Pricing tab for the current price.

To keep a run within budget:

  • Set Results per keyword to the number of videos you need.
  • Set a Max cost per run in the run options. The Actor stops as soon as the limit is reached.

New to Apify? The free plan includes monthly platform credit, so you can try this Actor at no cost.

Input

FieldTypeDefaultDescription
Search keywords (search_keywords)Listβ€”Keywords or phrases, one per line. Required.
Results per keyword (max_results)Number0 (all)How many videos to take for each keyword, in YouTube's order.
Type (type)Selectvideosvideos (regular videos and live streams) or shorts. Same as Filters β†’ Type.
Upload date (upload_date)Selectanyany, today, this_week, this_month or this_year. Same as Filters β†’ Upload date.
Duration (duration)Selectanyany, under_3, 3_to_20 or over_20 minutes. Same as Filters β†’ Duration.
Features (features)Multi-selectnonelive, 4k, hd, subtitles, creative_commons, 360, vr180, 3d, hdr, location, purchased. Videos must have all the features you pick.
Prioritize (sort_by)Selectrelevancerelevance or popularity. Same as Filters β†’ Prioritize.
Country (country)SelectUSThe country you search from, like YouTube's Location setting.
Exact details and channel stats (fetch_video_details)CheckboxtrueAdds the exact publish date, likes, full description, category, tags and channel stats. Turn off for the fastest run.

The top 50 videos for a few keywords

{
"search_keywords": ["SEO tools", "link building", "keyword research"],
"max_results": 50
}

This month's most popular long reviews

{
"search_keywords": ["iphone 17 review"],
"upload_date": "this_month",
"duration": "over_20",
"sort_by": "popularity",
"max_results": 30
}

Shorts about a topic, searched from Germany

{
"search_keywords": ["meal prep"],
"type": "shorts",
"country": "DE",
"max_results": 100
}

Output

Each video is one item in the dataset, in the order YouTube shows them. Here is a real item (descriptions and links shortened):

{
"title": "Give me 8 Minutes and You'll Win at SEO in 2025",
"publisher": "Ahrefs",
"view_count": "81,484 views", // Live streams show "10,724 watching"; Shorts show "402K views"
"published_at": "1 year ago", // Empty for live streams on air and for Shorts
"detail_url": "https://www.youtube.com/watch?v=vE_A4IhmkKQ",
"duration": "8:11", // Empty for live streams on air
"description": "In this video, you'll learn the best SEO tips that will change the way you do SEO in the AI era. ...",
"video_id": "vE_A4IhmkKQ",
"image": "https://i.ytimg.com/vi/vE_A4IhmkKQ/hq720.jpg?sqp=...",
"search_keyword": "SEO tips",
"rank": 1,
"video_type": "Video",
"view_count_exact": 81487,
"duration_seconds": 491,
"channel_id": "UCWquNQV8Y0_defMKnGKrFOQ",
"channel_handle": "@AhrefsCom",
"channel_url": "https://www.youtube.com/@AhrefsCom",
"channel_is_verified": true,
"channel_avatar_url": "https://yt3.ggpht.com/WGSuLikxFMe3DsJ6z4n1-V0Md5q6RWJDP-QYWjoxHOAzT7Xxv...",
"scraped_at": "2026-10-05T07:59:30Z",
"published_at_exact": "2025-07-23T11:01:35Z", // The fields below are null when Exact details is off
"like_count": 1915, // null when the creator hides likes
"video_description": "In this video, you'll learn the best SEO tips that will change the way you do SEO in the AI era. ...",
"video_category": "Howto & Style",
"video_tags": ["seo tips", "seo strategy", "seo", "search engine optimization", "seo techniques"],
"is_family_safe": true,
"channel_subscriber_count": 680000,
"channel_total_views": 34326681,
"channel_video_count": 428,
"channel_country": "United States", // null when the channel sets no country
"channel_joined_date": "2015-08-08",
"channel_has_business_email": false,
"channel_links": [
{ "title": "Ahrefs", "url": "https://ahrefs.com/" },
{ "title": "Twitter", "url": "http://twitter.com/ahrefs" }
],
"channel_description": "Ahrefs TV publishes actionable digital marketing tutorials on SEO and YouTube marketing. ..."
}

Tips and limitations

  • YouTube stops after a few hundred results per keyword (usually 300–500). To get more videos on a topic, add related keywords or split it with filters, such as different upload dates.
  • Sorting by upload date is no longer offered by YouTube's search. Use Upload date (for example "This week") to get recent videos, and sort by published_at_exact afterwards.
  • Track a topic over time: schedule a run daily or weekly with Upload date set to "Today" or "This week".
  • Shorts show almost nothing on the search page, so the Actor always looks up their channel, publish date and length.
  • Live streams on air show the current viewers in view_count and have no duration or publish time yet; view_count_exact holds their total views.
  • Subscriber counts are rounded the same way YouTube shows them publicly (680K becomes 680000).
  • Results differ by country, so set Country to the market you care about.
  • Need the full details of specific videos, all videos of a channel, or the comments? See the related Actors below.

FAQ

This Actor only collects data that YouTube shows publicly. Our Actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our Actors, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

Do I need a YouTube API key or account?

No. Type your keywords and start the run.

Are the results in the same order as on YouTube?

Yes. Videos are saved in the order YouTube shows them, and rank gives each video's position for its keyword, so you can always sort back to YouTube's order.

Why did I get fewer results than I asked for?

YouTube only shows a limited number of results for each search, and fewer when you use filters. The status message of the run tells you how many videos each keyword returned.

Do I pay for duplicates?

No. YouTube sometimes repeats a video while you scroll through results; the Actor keeps only the first one for each keyword.

Can I scrape YouTube Shorts and live streams?

Yes. Choose Shorts in Type to get Shorts, or pick Live in Features to get live streams.

Can I use it through the API or with AI agents?

Yes. You can run it with the Apify API, the Python and JavaScript clients, integrations such as Make, Zapier and n8n, or the Apify MCP server for AI agents. Set Results per keyword so an agent always gets a predictable number of videos.

ActorWhat it does
YouTube Transcript Scraper - Subtitles & Captions APITranscripts and subtitles of any video, in every language it has
YouTube Video Details Scraper - Views, Likes & Channel StatsFull details of any list of video links
YouTube Channel Scraper - All Videos, Views & DatesEvery video, Short and live stream of a channel
YouTube Comments Scraper - Replies, Likes & ShortsComments and replies of any video

Support

Found a problem or need another field? Open an issue in the Issues tab and we'll get back to you.