# YouTube Search Scraper - Videos by Keyword, Date & Duration (`seemuapps/youtube-search-scraper`) Actor

Search YouTube videos by keyword and scrape title, views, likes, comments, duration, upload date, tags and channel - filter by upload date, length, HD, 4K, subtitles or live.

- **URL**: https://apify.com/seemuapps/youtube-search-scraper.md
- **Developed by:** [Andrew](https://apify.com/seemuapps) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 video scrapeds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## YouTube Search Scraper - Videos by Keyword, Date & Duration

Search YouTube for any keyword and get every matching video with its view, like and comment counts, duration, upload date, tags, hashtags and channel - filtered by upload date, video length and features such as HD, 4K, subtitles or live, and ranked by relevance, date, views or rating. No login, no cookies, no YouTube API quota to manage.

Give it a list of search terms and it returns one clean row per video, ready to export to JSON, CSV, Excel or Google Sheets.

### What you get

For every video:

- **videoId**, **url**, **title**, **description**
- **publishedAt** (exact timestamp) and **publishedText** ("2 weeks ago")
- **durationSeconds**, **definition** (hd / sd), **hasCaptions**, **isLive**, **badges** (4K, CC, New)
- **viewCount**, **likeCount**, **commentCount**
- **channelId**, **channelTitle**, **channelHandle**, **channelUrl**, **channelIsVerified**
- **thumbnailUrl**, **tags** (creator-set), **hashtags** (from title and description), **categoryId**, **language**
- **sourceQuery** and **position** - which query surfaced the video and its rank

Results are de-duplicated across all queries in a run.

### Use cases

- **Keyword and topic research** - see which videos rank for a search term and how much engagement they get
- **Competitor analysis** - find who is winning a niche this month, sorted by views
- **Influencer discovery** - surface channels publishing on your topic and rank them by reach
- **Content ideation** - mine titles, tags and hashtags from top-ranking videos
- **Trend monitoring** - run on a schedule with "Uploaded this week" to catch new videos on a topic
- **Dataset building** - collect thousands of labelled videos for analysis or model training

### How to use

1. Enter one or more **Search queries**, one per line.
2. Set **Max videos per query** (default 100, `0` for everything YouTube returns, up to 5,000 per query).
3. Choose **Sort by** (relevance, upload date, view count or rating) and **Uploaded within** (last hour, today, this week, month or year).
4. Optionally filter by **Duration** (under 4 minutes, 4 to 20 minutes, over 20 minutes) and **Features** (HD, 4K, HDR, subtitles, Creative Commons, live, 360°, 3D).
5. Set **Country** to rank results the way YouTube does for that region (for example `AU` for Australia).
6. Run the actor - videos stream into the **Dataset** tab as they are found.

### Output format

Each dataset record:

```json
{
  "videoId": "L4NT46DORwk",
  "url": "https://www.youtube.com/watch?v=L4NT46DORwk",
  "title": "Best VPN Australia 2026 — Which One Should You Choose",
  "description": "Best VPN for Australia 2026 — honest ranking of the top picks...",
  "publishedAt": "2026-08-24T13:43:43Z",
  "publishedText": "2 weeks ago",
  "durationSeconds": 365,
  "viewCount": 3229,
  "likeCount": 683,
  "commentCount": 53,
  "channelId": "UC3_1NCqJD5Ba9QYWhihksbw",
  "channelTitle": "Tutorial Stack",
  "channelHandle": "@Tutorial_Stack",
  "channelUrl": "https://www.youtube.com/@Tutorial_Stack",
  "channelIsVerified": false,
  "thumbnailUrl": "https://i.ytimg.com/vi/L4NT46DORwk/maxresdefault.jpg",
  "tags": ["vpn", "australia", "best vpn 2026"],
  "hashtags": ["vpn"],
  "categoryId": "28",
  "language": "en",
  "definition": "hd",
  "hasCaptions": false,
  "isLive": false,
  "badges": ["4K"],
  "sourceQuery": "best vpn australia",
  "position": 1
}
```

### Pricing

You pay a small fixed amount per video returned. There is no charge for queries that return nothing.

### Tips

- Combine **Sort by: View count** with **Uploaded within: This month** to find what is currently working in a niche.
- YouTube treats multiple **Features** as AND - selecting both HD and Subtitles returns only videos with both.
- Use **Duration: Over 20 minutes** to filter for long-form content such as podcasts, tutorials and reviews.
- If YouTube begins blocking requests from the default network, enable **Proxy configuration** with Apify Proxy.

### FAQ

**Does this include Shorts?**
No - this actor searches regular videos. Use the YouTube Shorts Scraper for Shorts.

**Can I scrape all videos from a channel?**
Use the YouTube Channel Videos Scraper for full channel back catalogs. This actor is built for keyword search.

**Why is likeCount sometimes null?**
Some creators hide like counts; YouTube then returns nothing for that field.

# Actor input Schema

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

Keywords or phrases to search YouTube for, one per line. Each query is searched separately and results are de-duplicated across the run.

## `maxItemsPerQuery` (type: `integer`):

Maximum videos to return for each query. 0 = everything YouTube returns, up to 5,000 per query.

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

Order in which YouTube returns results.

## `uploadedWithin` (type: `string`):

Only return videos uploaded inside this window.

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

Filter by video length.

## `features` (type: `array`):

Optional YouTube feature filters. Selecting several requires all of them.

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

Two-letter country code that controls regional ranking and availability, e.g. US, GB, AU, DE.

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

Language code for YouTube's interface, e.g. en, de, pt-BR. Affects relative date text and ranking.

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

Optional. Leave off by default. Enable Apify Proxy only if YouTube starts blocking requests from the default network.

## Actor input object example

```json
{
  "searchQueries": [
    "best vpn australia"
  ],
  "maxItemsPerQuery": 100,
  "sortBy": "relevance",
  "uploadedWithin": "any",
  "duration": "any",
  "features": [],
  "country": "US",
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One record per video: videoId, url, title, description, publishedAt, publishedText, durationSeconds, viewCount, likeCount, commentCount, channelId, channelTitle, channelHandle, channelUrl, channelIsVerified, thumbnailUrl, tags, hashtags, categoryId, language, definition, hasCaptions, isLive, badges, sourceQuery, position.

# 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": [
        "best vpn australia"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("seemuapps/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": ["best vpn australia"] }

# Run the Actor and wait for it to finish
run = client.actor("seemuapps/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": [
    "best vpn australia"
  ]
}' |
apify call seemuapps/youtube-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,seemuapps/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/JRQDc1pygzupujjT7/builds/wfIkyhKtb8EXzoSqR/openapi.json
