YouTube Search Scraper — Videos & Shorts by Keyword avatar

YouTube Search Scraper — Videos & Shorts by Keyword

Pricing

from $0.40 / 1,000 search results

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

YouTube Search Scraper — Videos & Shorts by Keyword

Search YouTube by keyword and get every video or Short in result order: title, channel, views, duration, upload time, badges and snippet. YouTube's own filters: type, upload date, duration, 4K, live, subtitles, popularity. No browser, no API key.

Pricing

from $0.40 / 1,000 search results

Rating

0.0

(0)

Developer

Data Fabrik

Data Fabrik

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

2 days ago

Last modified

Share

What is YouTube Search Scraper?

Search YouTube by keyword and get every video or Short in result order as clean JSON, CSV or Excel: title, channel, views, duration, upload time, badges, description snippet and thumbnail, with the rank of each video. Use YouTube's own filters: type, upload date, duration, 4K, live, subtitles, Creative Commons, popularity.

  • 💲 Pay per result: from $0.40 per 1,000 results ($0.70 on the Free plan), plus Apify's minimum start fee of $0.00005 per run. Searches without results and failures are free.
  • 🔎 Many searches in one run: up to 1,000 search terms, up to 1,000 results each.
  • 🎛️ The filters of YouTube's menu: videos or Shorts, today / this week / this month / this year, under 3 / 3–20 / over 20 minutes, live, 4K, HD, subtitles, Creative Commons, 360°, VR180, 3D, HDR, location, and "Prioritize: popularity".
  • 🌍 Any country: see what ranks in the US, the UK, France, India…
  • ⚡ No browser, no YouTube API key, no login, no quota: light HTTP requests, five searches at a time.
FieldExample
Rank in the results1
Title, link, video idPython Tutorial for Beginners - Learn the basics in 20 Min
Typevideo, short, live, upcoming
Channel name, id, handle, link, verified badgeTech With Tim, @TechWithTim, ✔
Views (number and text)68318 · "68,318 views"
People watching now (live streams)1204
Upload time"2 months ago"
Duration"19:39" · 1179 s
Description snippet"Never written a line of code before? …"
Badges4K, CC, New, LIVE
Thumbnailhttps://i.ytimg.com/vi/…

What can you do with YouTube search data?

  • SEO and keyword research for YouTube: see who ranks for your keywords, with what titles and durations, in each country.
  • Competitor and trend watch: run the same searches every day with Upload date: Today and get the new videos of your niche.
  • Content ideas: find the most viewed videos on a topic with Prioritize: popularity.
  • Influencer discovery: list the channels that rank on your topics, then check them.
  • AI and research datasets: collect video ids on a topic, then get their transcripts with our YouTube Transcript Scraper.

Why run it on Apify?

  • API: every run is an API call, with ready clients for Python and JavaScript (see below).
  • Scheduling: run your searches every hour, day or week without a server.
  • Integrations: Google Sheets, Slack, Zapier, Make, n8n, webhooks and your own database.
  • AI agents: available through Apify's MCP server, so Claude, ChatGPT or Cursor can call it.

How does it work?

  1. Each term in queries is searched on YouTube with the filters you chose (contentType, sortBy, uploadDate, duration, features) from the country you chose.
  2. The Actor reads the result pages one after the other, like scrolling down, until it has maxResultsPerQuery videos or YouTube has no more.
  3. Each video becomes one item with its position (rank). Shorts shelves, playlists and courses shown between results are not videos of the search and are left out.
  4. Each search that returns nothing, fails or is cut by your cost limit leaves one free item with status and note, so nothing disappears silently. Only ok items are charged.

How to scrape YouTube search results

  1. Click Try for free.
  2. Type one or more searches in Search terms, one per line.
  3. Optional: set Max results per search, Type, Upload date, Duration, Features, Prioritize or Country.
  4. Click Start. The results appear in the Search results view within seconds.
  5. Download them as JSON, CSV or Excel, or connect an integration.

Input

FieldTypeDefaultWhat it does
querieslist of text— (required)Search terms, one per line (up to 1,000, 200 characters each). Duplicates are searched once.
maxResultsPerQuerynumber50Videos to take from each search, 1 to 1,000. YouTube usually stops after a few hundred.
contentTypevideos, shorts, allvideosYouTube's type filter. all = no type filter: videos and Shorts of the result list.
sortByrelevance, popularityrelevanceYouTube's "Prioritize" filter.
uploadDateany, today, week, month, yearanyOnly videos uploaded in that period.
durationany, under3, 3to20, over20anyOnly videos under 3 minutes, from 3 to 20 minutes, or over 20 minutes.
featureslistnoneOnly videos with all of: live, 4k, hd, subtitles, creativeCommons, 360, vr180, 3d, hdr, location.
country2-letter codeUSCountry YouTube searches from; it changes the ranking. Texts stay in English.
maxConcurrencynumber5Searches run at the same time, 1 to 10.

Example:

{
"queries": ["python tutorial", "learn javascript"],
"maxResultsPerQuery": 100,
"uploadDate": "month",
"sortBy": "popularity",
"country": "US"
}

Output

One item per video, in the order of the results:

{
"status": "ok",
"note": null,
"query": "python tutorial",
"position": 1,
"videoId": "Js05B8Z1ivE",
"url": "https://www.youtube.com/watch?v=Js05B8Z1ivE",
"title": "Python Tutorial for Beginners - Learn the basics in 20 Min",
"type": "video",
"channelName": "Tech With Tim",
"channelId": "UC4JX40jDee_tINbkjycV4Sg",
"channelHandle": "@TechWithTim",
"channelUrl": "https://www.youtube.com/channel/UC4JX40jDee_tINbkjycV4Sg",
"isVerifiedChannel": true,
"viewCount": 68318,
"watchingCount": null,
"viewCountText": "68,318 views",
"publishedTimeText": "2 months ago",
"durationText": "19:39",
"durationSeconds": 1179,
"descriptionSnippet": "Never written a line of code before? Start with this Python tutorial to learn the basics. …",
"badges": ["4K", "CC"],
"thumbnailUrl": "https://i.ytimg.com/vi/Js05B8Z1ivE/hq720.jpg?…",
"searchUrl": "https://www.youtube.com/results?search_query=python%20tutorial&sp=EgIQAQ%3D%3D",
"scrapedAt": "2026-10-16T18:00:00.000Z"
}
FieldMeaning
statusok (charged). Free: no-results, failed, skipped-cost-limit (one item per search, with query and note).
noteWhy an item has no video; null when status is ok.
query, positionThe search term and the rank of the video in its results (1 = first).
videoId, url, titleThe video; url is a /shorts/ link for a Short.
typevideo, short, live (streaming now) or upcoming (scheduled).
channelName, channelId, channelHandle, channelUrl, isVerifiedChannelThe channel; for a joint video ("A and B"), the id is the first channel's.
viewCount, viewCountTextViews as a number and as written by YouTube; viewCount is null for a live stream in progress or a TV episode, and rounded for Shorts shown as a grid.
watchingCountPeople watching now, for a live stream in progress.
publishedTimeTextUpload time as shown in search ("2 months ago").
durationText, durationSecondsLength; null for a live stream.
descriptionSnippetExtract of the description shown under the result.
badges4K, CC, New, LIVE…
thumbnailUrlLargest thumbnail.
searchUrlThe same search on youtube.com, with the same filters, to check by eye.
scrapedAtWhen the item was produced (UTC).

The run summary (counts, errors, duration) is in the key-value store under OUTPUT.

How much does it cost to scrape YouTube search results?

You pay per result delivered:

Apify planPrice per resultPer 1,000 results
Free$0.0007$0.70
Starter (Bronze)$0.0005$0.50
Scale (Silver)$0.00045$0.45
Business (Gold) and above$0.0004$0.40

Plus Apify's start fee of $0.00005 per run. Free: searches without results, failures, and searches cut by your cost limit. The $5 monthly credit of Apify's Free plan covers about 7,000 results a month. Set Maximum cost per run in the run options to cap a run: the Actor stops before going over it and never delivers more than it charged.

Is it free to try?

Yes. Apify's Free plan gives $5 of credit every month, with no card needed.

Use it from code

Python (pip install apify-client):

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("datafabrik/youtube-search").call(run_input={
"queries": ["python tutorial"],
"maxResultsPerQuery": 100,
"uploadDate": "week",
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
if item["status"] == "ok":
print(item["position"], item["title"], item["viewCount"])

JavaScript (npm install apify-client):

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('datafabrik/youtube-search').call({ queries: ['lofi hip hop'], contentType: 'shorts' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((i) => i.url));

Limits

  • YouTube search results give an upload time like "2 months ago", not an exact date, and no like count. For the exact details and the full transcript of each video, pass the urls to our YouTube Transcript Scraper.
  • With Type: Shorts, YouTube often shows the Shorts as a grid that gives only the title and rounded views ("7.3M views" → 7300000): channel, upload time and duration are then null.
  • YouTube usually stops a search after a few hundred results; the Actor then delivers what YouTube has.
  • The filters are YouTube's own: a few results may not match exactly (a 4K filter result without the 4K badge, for example), as on youtube.com.
  • Searches that YouTube shows only to signed-in users ("Confirm your age") come back as a free no-results item quoting YouTube's message: the Actor never signs in.
  • Results are those of a visitor who is not logged in, in English, from country.
  • Channel and playlist results are not included yet.

FAQ

The Actor reads public search results that YouTube shows to any visitor, without login. It does not collect personal data such as emails. You are responsible for how you use the data, in line with YouTube's terms; check with a lawyer for commercial reuse.

Why are the results a bit different from what I see on youtube.com?

YouTube personalises results for logged-in users and by location. The Actor searches as a visitor who is not logged in, from country. Open searchUrl in a private window to compare.

Can I get only the newest videos of a topic every day?

Yes: set uploadDate to today and schedule the run every day in Apify.

Do I need a YouTube API key or an account?

No, and there is no daily quota. The Actor uses the same public endpoints as YouTube's website.

Can you add a feature or build a custom scraper?

Yes: open an issue on the Issues tab, we answer within a day.