# YouTube Search Scraper: Keyword Video & Shorts Monitor (`tenfoldfleet/youtube-search-scraper`) Actor

Search YouTube by keyword and get the matching videos and Shorts: title, URL, channel, view count, duration in seconds, upload date, live flag and a Shorts flag. Filter by upload date, length or type, and monitor keywords for new videos only. $1 per 1,000 results; failed searches are free.

- **URL**: https://apify.com/tenfoldfleet/youtube-search-scraper.md
- **Developed by:** [Tenfold Fleet](https://apify.com/tenfoldfleet) (community)
- **Categories:** Videos, Agents, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 search results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does YouTube Search Scraper do?

**YouTube Search Scraper** runs keyword searches on YouTube and returns **every video, live stream and Short in the results**, one row each, with the **title, URL, channel, view count as a number, duration in seconds, upload time** and an **isShort flag**. Type in keywords the way you would in the YouTube search box and get a clean table back.

YouTube is a trademark of Google LLC. Not affiliated with, endorsed by or sponsored by YouTube or Google.

This actor takes **keywords**. Our [YouTube channel scraper](https://apify.com/tenfoldfleet/youtube-channel-scraper) and [YouTube Shorts scraper](https://apify.com/tenfoldfleet/youtube-shorts-scraper) take **channels, hashtags and URLs** instead.

It works like a **YouTube search API** with no API key, no quota and no login, and it has a **monitor mode** that returns only videos you have not seen before, so a daily schedule becomes a feed of new uploads for your keywords. It runs on plain HTTP requests, so it is fast and cheap: **$1 per 1,000 results**, and searches that fail or find nothing are **free**.

### Why use a YouTube keyword scraper?

- 🔎 **Keyword and topic research**: see which videos and Shorts rank for a search term, how many views they have and how long they are.
- 📣 **Brand and competitor monitoring**: run your brand, product or competitor names every day with monitor mode and get only the new videos.
- 🤝 **Influencer discovery**: find the channels that publish on your topic, then check them with our channel scraper.
- 📈 **Content planning**: compare long videos against Shorts for the same keyword in one run, using the `isShort` flag.
- 🧠 **AI and data pipelines**: feed titles, snippets and view counts into an LLM, a dashboard or a spreadsheet.

Runs on the Apify platform, so you get an **API**, scheduling, webhooks and integrations with Make, Zapier, n8n and Google Sheets. It also works as an **MCP tool for AI agents** through the [Apify MCP server](https://mcp.apify.com).

### What data can it extract?

| Field | Example |
|---|---|
| `videoId`, `url` | `n61ULEU7CO0`, `https://www.youtube.com/watch?v=n61ULEU7CO0` (Shorts get a `/shorts/` URL) |
| `type` | `video`, `short`, `live` or `upcoming` |
| `isShort`, `isLive` | `false`, `false` |
| `title` | `Best of lofi hip hop 2021 ✨ [beats to relax/study to]` |
| `channelName`, `channelId`, `channelUrl` | `Lofi Girl`, `UCSJ4gkVC6NrvII8umztf0Ow`, channel link |
| `channelVerified` | `true` |
| `viewCount`, `viewCountText` | `58455911`, `58,455,911 views` |
| `liveViewers` | people watching a live stream right now |
| `durationSec`, `durationText` | `22258`, `6:10:58` |
| `publishedTimeText`, `publishedAtApprox` | `4y ago`, `2022-11-01` (approximate date from the relative time) |
| `descriptionSnippet` | the description excerpt shown in search |
| `thumbnailUrl`, `badges` | thumbnail image, `["4K", "New"]` |
| `searchQuery`, `rank`, `page` | the keyword, the position in its results, the results page |
| `isNew` | `true` in monitor mode |

Shorts that YouTube shows in a Shorts shelf come with ID, URL, title, view count and thumbnail. YouTube does not show their channel or upload date in search, so those fields are `null` for them.

### How to search YouTube by keyword

1. Open the actor and click **Try for free**.
2. Add one or more **search keywords**, for example `home workout` or `iphone 17 review`.
3. Choose **Max results per keyword** and, if you like, a **result type** (videos and Shorts, videos only, Shorts only), an **upload date** (last hour to this year), a **video length** and **sort by** relevance or popularity.
4. For a monitor, turn on **Monitor mode: only new videos** and give the monitor a **store name**. Schedule the actor daily or hourly.
5. Click **Start** and download the results as JSON, CSV or Excel, or read them from the API.

### How much does it cost?

**$1 per 1,000 results** ($0.001 per video, live stream or Short), plus $0.00005 per run start. Keywords with no results, blocked searches, failed result pages and, in monitor mode, videos you already received are **free**. The Apify free plan's $5 of monthly credit covers about 5,000 results.

Use **Max results in total** or the run's maximum cost setting to cap what one run can spend.

### Input

```json
{
    "searchQueries": ["home workout", "iphone 17 review"],
    "maxResultsPerQuery": 100,
    "resultType": "all",
    "uploadDate": "week",
    "duration": "any",
    "sortBy": "relevance",
    "onlyNewVideos": true,
    "monitorStoreName": "fitness-monitor"
}
```

### Output

```json
{
    "videoId": "n61ULEU7CO0",
    "url": "https://www.youtube.com/watch?v=n61ULEU7CO0",
    "type": "video",
    "isShort": false,
    "isLive": false,
    "title": "Best of lofi hip hop 2021 ✨ [beats to relax/study to]",
    "channelName": "Lofi Girl",
    "channelId": "UCSJ4gkVC6NrvII8umztf0Ow",
    "channelUrl": "https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow",
    "channelVerified": true,
    "viewCount": 58455911,
    "liveViewers": null,
    "viewCountText": "58,455,911 views",
    "durationSec": 22258,
    "durationText": "6:10:58",
    "publishedTimeText": "4y ago",
    "publishedAtApprox": "2022-11-01",
    "thumbnailUrl": "https://i.ytimg.com/vi/n61ULEU7CO0/hq720.jpg",
    "badges": [],
    "searchQuery": "lofi hip hop",
    "rank": 2,
    "page": 1,
    "isNew": null
}
```

You can download the dataset as JSON, CSV, Excel, XML or HTML. Failed keywords appear as a row with an `error` field and a `reason` (`no-results`, `duplicates-only`, `consent-page`, `bot-check`, `blocked`, `continuation-failed`), and they are not charged.

### Tips

- **Monitor mode** remembers up to 300,000 video IDs per store name. Use a separate store name for each monitor, and the first run returns everything it finds.
- In monitor mode, **Max results per keyword** is how deep each search looks; with an **upload date** of `today` or `week` a small number such as 50 is usually enough.
- A video that two of your keywords find is returned (and charged) once per run.
- The **popularity** order sorts by view count. YouTube no longer offers a "newest first" order in search; use the **upload date** filter instead.
- For channel details, the full video list of a channel, comments or transcripts, use our other YouTube scrapers on [our Apify profile](https://apify.com/tenfoldfleet).

### FAQ

#### Do I need a YouTube API key?

No. The scraper reads public search results like a logged-out visitor, so there is no API key, no quota and no Google account.

#### How many results can I get for one keyword?

YouTube serves search results in pages of about 20 videos plus Shorts shelves. Most keywords give several hundred results; the scraper keeps loading pages until it reaches your limit or YouTube stops.

#### Are view counts exact?

For regular videos, yes: the search page shows the full number. For Shorts in a Shorts shelf YouTube shows a rounded number (for example `1.4M`), which is converted to an integer.

#### Why is the upload date approximate?

Search results only say "3 days ago" or "4y ago". `publishedAtApprox` turns that into a date, which is exact to the day for recent videos and approximate for older ones.

#### Can I search in another language or country?

Yes. Set **Interface language** (for example `de`) and **Country** (for example `DE`). Counts and dates are parsed best with English.

### Disclaimer

This actor collects public data only: what anyone sees on YouTube search without signing in. You are responsible for how you use the results and for complying with YouTube's terms and the data protection laws that apply to you, such as GDPR.

### More tools from Tenfold Fleet

| Actor | Output |
|---|---|
| [ALDI Australia Scraper - AU Products, Unit Prices & Catalogue](https://apify.com/tenfoldfleet/aldi-australia-scraper) | product |
| [Alibaba Image Search - Reverse Lookup of Suppliers by Photo](https://apify.com/tenfoldfleet/alibaba-image-search) | matched product |
| [Alibaba Products Scraper: Wholesale Suppliers, MOQ, Price Tiers](https://apify.com/tenfoldfleet/alibaba-products-scraper) | product |
| [AliExpress Reviews Scraper: Product Feedback & Photos Monitor](https://apify.com/tenfoldfleet/aliexpress-reviews-scraper) | review |
| [AliExpress Keyword Scraper - Exact Sold Counts by Search Term](https://apify.com/tenfoldfleet/aliexpress-search-scraper) | product |
| [Amazon Product Scraper - Details, Prices & Search by ASIN](https://apify.com/tenfoldfleet/amazon-product-scraper) | product |
| [Applicant Tracking Jobs Scraper - Greenhouse, Lever & 6 More](https://apify.com/tenfoldfleet/ats-jobs-scraper) | job posting |
| [Backlinks Checker - Referring Domains, Anchors & Domain Rank](https://apify.com/tenfoldfleet/backlinks-checker) | backlink |
| [BBB Scraper: Business Leads, Ratings & New Reviews](https://apify.com/tenfoldfleet/bbb-scraper-leads-reviews) | business |
| [Bilibili Scraper - Videos, Comments, Danmaku & Search](https://apify.com/tenfoldfleet/bilibili-scraper) | video or comment |
| [Businesses Without Websites - Local Leads with Phone & Rating](https://apify.com/tenfoldfleet/businesses-without-websites) | lead |
| [Coles Product Scraper - Australian Supermarket Prices & Deals](https://apify.com/tenfoldfleet/coles-product-scraper) | product |
| [Contact Details Scraper - One Lead Record per Company Website](https://apify.com/tenfoldfleet/company-contact-finder) | website with contacts |
| [Facebook Ads Library Scraper for Marketers](https://apify.com/tenfoldfleet/facebook-ads-library-scraper) | ad |
| [Facebook Page Contact Finder - Business Leads from Page Links](https://apify.com/tenfoldfleet/facebook-page-contact-finder) | page with contact details |
| [Facebook Reels Scraper: Views & Captions Monitor for Any Page](https://apify.com/tenfoldfleet/facebook-reels-scraper) | reel |
| [Foundit Jobs Monitor: India, Singapore & Malaysia Jobs Scraper](https://apify.com/tenfoldfleet/foundit-jobs-monitor) | job listing |
| [Funding Rounds Scraper - Recently Funded Companies & Investors](https://apify.com/tenfoldfleet/funding-rounds-scraper) | funding round |
| [Google Ads Transparency Center Scraper - Competitor Ads by Site](https://apify.com/tenfoldfleet/google-ads-transparency-scraper) | ad |
| [Google AI Overviews Checker - Citations & Domain Tracker](https://apify.com/tenfoldfleet/google-ai-overviews-checker) | keyword checked |
| [Google Flights Scraper - All Fares per Route & Date (API)](https://apify.com/tenfoldfleet/google-flights-scraper) | route search |
| [Google Hotels Scraper - Nightly Prices, Stars & Booking Sites](https://apify.com/tenfoldfleet/google-hotels-scraper) | hotel |
| [Google for Jobs Scraper - Openings by City, Pay & Job Board](https://apify.com/tenfoldfleet/google-jobs-scraper) | job listing |
| [Google Keyword Planner API Alternative - Ideas, Bids & Volume](https://apify.com/tenfoldfleet/google-keyword-planner) | keyword idea |
| [Google Maps Extractor - Business Leads, Phones & Websites](https://apify.com/tenfoldfleet/google-maps-extractor) | place |
| [Google News Scraper - Articles, Real URLs & Full Text](https://apify.com/tenfoldfleet/google-news-scraper) | article |
| [Google Travel Hotel Rate Tracker - OTA Prices for Every Night](https://apify.com/tenfoldfleet/google-travel-hotel-rate-tracker) | offer |
| [Search Trends by Region & Time - Google Trends Data Scraper](https://apify.com/tenfoldfleet/google-trends-scraper) | keyword |
| [Instagram Reels Search - Keyword to Top Reels, Plays & Creators](https://apify.com/tenfoldfleet/instagram-reels-search) | reel |
| [Instagram Reels Transcript - Speech to Text for Public Reels](https://apify.com/tenfoldfleet/instagram-reels-transcript) | reel transcript |
| [Keyword Ideas & Related Keywords - Difficulty, Volume & CPC](https://apify.com/tenfoldfleet/keyword-ideas) | keyword idea |
| [Keyword Search Volume, CPC & Difficulty Checker (Bulk)](https://apify.com/tenfoldfleet/keyword-search-volume) | keyword with data |
| [Likee Scraper - Creators by Country, Video Views & Likes](https://apify.com/tenfoldfleet/likee-scraper) | video |
| [LinkedIn Ads Library Scraper - Competitor Ad Copy & Targeting](https://apify.com/tenfoldfleet/linkedin-ad-library-scraper) | ad |
| [LinkedIn Company Posts Monitor: New Posts, No Login](https://apify.com/tenfoldfleet/linkedin-company-posts-monitor) | post |
| [LinkedIn Company Scraper: Firmographics & Recent Posts](https://apify.com/tenfoldfleet/linkedin-company-scraper) | company |
| [Pinterest Search Scraper: Pins, Promoted Ads & Shop Trends](https://apify.com/tenfoldfleet/pinterest-search-scraper) | pin |
| [Reddit Brand Monitoring - Keyword Alerts for Posts & Comments](https://apify.com/tenfoldfleet/reddit-brand-monitoring) | mention |
| [Reddit Post Comments Export: Threads to JSON & CSV](https://apify.com/tenfoldfleet/reddit-post-comments-export) | comment |
| [Remote Job Board Scraper - Remote Jobs Aggregator, 7 Sites](https://apify.com/tenfoldfleet/remote-jobs-aggregator) | unique remote job |
| [SEEK Jobs Scraper - Salaries & Hiring Across 8 APAC Job Boards](https://apify.com/tenfoldfleet/seek-job-scraper) | job listing |
| [SEO Agent - AI Keyword Research & Competitor Reports](https://apify.com/tenfoldfleet/seo-agent) | research report |
| [SEO Crawler - Technical SEO Audit Tool & On-Page Checker](https://apify.com/tenfoldfleet/seo-audit-tool) | page audit |
| [SEO Competitor Keywords - Domain Ranked Keywords & Keyword Gap](https://apify.com/tenfoldfleet/seo-competitor-keywords) | keyword |
| [Shopify Inventory Scraper - SKUs, Variants & In-Stock Status](https://apify.com/tenfoldfleet/shopify-products-scraper) | product |
| [Shopify App & Theme Detector - Store Analyzer & Contacts](https://apify.com/tenfoldfleet/shopify-store-analyzer) | shopify store |
| [Sitemap URL Extractor - All URLs from sitemap.xml & robots.txt](https://apify.com/tenfoldfleet/sitemap-url-extractor) | url |
| [Stock Photos & Videos Scraper for Pexels](https://apify.com/tenfoldfleet/stock-photos-scraper) | media item |
| [Website Built With Checker - Find Any Site's CMS & Tech Stack](https://apify.com/tenfoldfleet/tech-stack-detector) | website |
| [Threads Search - Keyword & Profile Posts Scraper (No Login)](https://apify.com/tenfoldfleet/threads-search) | post |
| [TikTok Ads Library Scraper: Competitor Ads in Europe](https://apify.com/tenfoldfleet/tiktok-ads-library-scraper) | ad |
| [TikTok Transcripts - Captions or Speech to Text for Any Video](https://apify.com/tenfoldfleet/tiktok-transcripts) | video transcript |
| [HTML to Text & URL to Markdown - LLM Ready Web Content](https://apify.com/tenfoldfleet/url-to-markdown) | page |
| [Website Traffic Checker - Bulk Domain Traffic Estimate](https://apify.com/tenfoldfleet/website-traffic-checker) | domain with traffic data |
| [WeChat Official Account Articles - Keyword Search to Markdown](https://apify.com/tenfoldfleet/wechat-official-account-articles) | article found |
| [Weibo Scraper - Comment Threads, Hot Search Ranks & User Stats](https://apify.com/tenfoldfleet/weibo-scraper) | comment |
| [Woolworths Product Scraper - AU Shelf Prices, Specials & GTINs](https://apify.com/tenfoldfleet/woolworths-product-scraper) | product |
| [Workday Jobs Scraper - myworkdayjobs.com API with Salary](https://apify.com/tenfoldfleet/workday-jobs-scraper) | job posting |
| [YouTube Channel Email Scraper - Creator Contact Extractor](https://apify.com/tenfoldfleet/youtube-channel-email-scraper) | channel with email |
| [YouTube Livestream & Channel Scraper - Videos, Likes & Stats](https://apify.com/tenfoldfleet/youtube-channel-scraper) | video |
| [YouTube Comments Scraper - Replies, Likes & Sort by Newest](https://apify.com/tenfoldfleet/youtube-comments-scraper) | comment |
| [YouTube Shorts Analytics Scraper - Views, Likes & Hashtags](https://apify.com/tenfoldfleet/youtube-shorts-scraper) | short |
| [YouTube Captions Downloader - Transcript & Subtitles Scraper](https://apify.com/tenfoldfleet/youtube-transcript-scraper) | transcript |

# Actor input Schema

## `searchQueries` (type: `array`):

What you would type into the YouTube search box, one keyword or phrase per line. Each keyword is searched separately. This actor takes keywords; to scrape a channel, a hashtag or a list of URLs, use our YouTube channel or Shorts scrapers.

## `maxResultsPerQuery` (type: `integer`):

How many results to check for each keyword (videos and Shorts count the same). YouTube usually has several hundred results per keyword. In monitor mode this is how deep each search looks; only new videos among them are returned.

## `resultType` (type: `string`):

All results (long videos, live streams and Shorts, each with an isShort flag), long videos only, or Shorts only.

## `uploadDate` (type: `string`):

Only videos uploaded within this period (the upload date filter of YouTube search).

## `duration` (type: `string`):

The length filter of YouTube search: under 4 minutes, 4 to 20 minutes, or over 20 minutes.

## `sortBy` (type: `string`):

Relevance (the default YouTube order) or popularity (most viewed first).

## `onlyNewVideos` (type: `boolean`):

Remember every video ID returned in a named key-value store and, on later runs, return and charge only videos that were not returned before. Schedule the actor daily to get a feed of new uploads for your keywords. The first run returns everything it finds.

## `monitorStoreName` (type: `string`):

Name of the key-value store in your Apify account that holds the seen video IDs. Use a different name per monitor (for example one per client or topic). Lower-case letters, digits and dashes.

## `language` (type: `string`):

YouTube interface language code (hl), for example en, de, es. View counts and dates are parsed best in English.

## `country` (type: `string`):

Two-letter country code (gl) that YouTube uses to rank results, for example US, GB, IN.

## `maxItems` (type: `integer`):

Stop after this many charged results across all keywords. 0 = no limit. The Apify free plan ($5 of monthly credit) covers about 5,000 results a month.

## `proxyConfiguration` (type: `object`):

The Apify datacenter proxy (the default) works for YouTube search. Residential proxy is not needed and is replaced with datacenter.

## Actor input object example

```json
{
  "searchQueries": [
    "home workout",
    "iphone 17 review"
  ],
  "maxResultsPerQuery": 20,
  "resultType": "all",
  "uploadDate": "any",
  "duration": "any",
  "sortBy": "relevance",
  "onlyNewVideos": false,
  "monitorStoreName": "youtube-search-monitor",
  "language": "en",
  "country": "US",
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "home workout",
        "iphone 17 review"
    ],
    "maxResultsPerQuery": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("tenfoldfleet/youtube-search-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": [
        "home workout",
        "iphone 17 review",
    ],
    "maxResultsPerQuery": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("tenfoldfleet/youtube-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "home workout",
    "iphone 17 review"
  ],
  "maxResultsPerQuery": 20
}' |
apify call tenfoldfleet/youtube-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tenfoldfleet/youtube-search-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/BfBdTrNRIY9dhbylO/builds/4dB8FEJELTP0m4y2T/openapi.json
