# YouTube Search, Channels & Shorts Scraper (`wyle/youtube-search-channels-shorts-scraper`) Actor

Search YouTube videos, Shorts, and channels by keyword, handle, or URL. Collect view counts, likes, durations, channel subscriber stats, and video tags without a browser or login.

- **URL**: https://apify.com/wyle/youtube-search-channels-shorts-scraper.md
- **Developed by:** [Willy Lengkong](https://apify.com/wyle) (community)
- **Categories:** Videos, Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## YouTube Search, Channels & Shorts Scraper

Search YouTube videos, Shorts, channels, and playlists by keyword, channel handle, or direct YouTube URL without logging in. Collect fast search cards by default, or enable `includeDetails: true` for exact view counts, likes, categories, keywords, full descriptions, and ISO publish dates.

### Ways to Use

| Mode | Input Field | What You Get |
| --- | --- | --- |
| Keyword search | `searchQueries` | Paginated YouTube search results matching your keywords, filtered by type, upload date, duration, and sort order. |
| Channel scraper | `channelUrls` | Videos, Shorts, or live streams from any `@handle`, channel ID (`UC...`), or channel URL, plus an optional channel profile summary record. |
| Direct URLs | `startUrls` | Auto-detects YouTube search result URLs, channel URLs, watch video URLs, and `/shorts/...` URLs in one run. |

### Supported Filters & Channel Tabs

- **Search Result Type (`searchType`)**: `all`, `videos`, `shorts`, `channels`, or `playlists`.
- **Upload Date (`uploadDate`)**: `all`, `hour`, `today`, `week`, `month`, or `year`.
- **Duration (`duration`)**: `all`, `short` (under 3 minutes), `medium` (3 - 20 minutes), or `long` (over 20 minutes).
- **Sort Order (`sortBy`)**: `relevance`, `date`, `popularity`, or `rating`.
- **Channel Content (`channelContent`)**: `videos`, `shorts`, `streams`, `videos_and_shorts` (splits your `maxResultsPerInput` budget across both tabs), or `about_only`.
- **Regional Localization**: Customize `country` (e.g., `US`, `ID`, `GB`, `JP`) and `language` (e.g., `en`, `id`, `es`, `ja`) for localized results.

### Fast vs. Enriched Results

| Mode | Speed & Request Volume | Fields Included |
| --- | --- | --- |
| Fast (`includeDetails: false`, default) | Fastest; collects paginated search and channel feeds only | `recordType`, `id`, `url`, `title`, `thumbnailUrl`, `channelId`, `channelName`, `channelHandle`, `channelUrl`, `channelVerified`, `viewCount`, `viewCountText`, `durationSeconds`, `durationText`, `publishedTimeText`, `isShort`, `isLive` |
| Enriched (`includeDetails: true`) | Visits each video or Short page up to `maxConcurrency` | Adds exact `viewCount`, `likeCount`, full `description`, `publishedAt` ISO timestamp, `category`, `keywords` tags, and verified `channelHandle` / `channelUrl` |

Note: Setting `includeChannelProfile: true` (default) also adds one `recordType: "channel"` summary record per scraped channel with subscriber count, total channel views, video count, joined date, country, and social links.

### Proxy & Run Tips

- Standard keyword searches, channel feeds, and small-to-medium runs generally work without a proxy on moderate volume.
- For large `maxResultsPerInput` runs (up to `1000` per input) or heavy `includeDetails: true` enrichment on Apify Cloud, configure `proxyConfiguration` (Residential recommended) to avoid rate limiting.
- Keep `maxConcurrency` between `3` and `5` for balanced speed and reliability when `includeDetails: true` is enabled.

### Use Cases

- **Creator & Competitor Monitoring**: Track new long-form uploads, Shorts cadence, subscriber milestones, and total channel views for competing creators.
- **Content & SEO Research**: Extract top-ranking YouTube titles, categories, full video descriptions, and creator tag `keywords` for any topic or niche.
- **Short-Form Trend Discovery**: Isolate YouTube Shorts via `searchType: "shorts"` or channel `/shorts` tabs to spot high-velocity vertical video topics.
- **Influencer Discovery**: Filter search by `channels`, collect creator handles, verification flags, subscriber counts, country, and outbound social links in `channelLinks`.

### Input Parameters

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `searchQueries` | `array` | `["python programming"]` | Keywords or phrases to search on YouTube. |
| `channelUrls` | `array` | `[]` | YouTube channel handles (`@mkbhd`), channel IDs (`UC...`), or full channel URLs to scrape. |
| `startUrls` | `array` | `[]` | Direct YouTube search, channel, video, or Shorts URLs. |
| `searchType` | `string` | `"all"` | Filter search results: `all`, `videos`, `shorts`, `channels`, or `playlists`. |
| `uploadDate` | `string` | `"all"` | Upload recency filter: `all`, `hour`, `today`, `week`, `month`, or `year`. |
| `duration` | `string` | `"all"` | Length filter: `all`, `short`, `medium`, or `long`. |
| `sortBy` | `string` | `"relevance"` | Sort order: `relevance`, `date`, `popularity`, or `rating`. |
| `channelContent` | `string` | `"videos"` | Channel tab mode: `videos`, `shorts`, `streams`, `videos_and_shorts`, or `about_only`. |
| `includeChannelProfile` | `boolean` | `true` | Emit one channel summary record (`recordType: "channel"`) per scraped channel. |
| `maxResultsPerInput` | `integer` | `30` | Maximum items to collect per query or channel input (`1` to `1000`). |
| `includeDetails` | `boolean` | `false` | Enrich each video and Short with exact views, likes, full description, category, tags, and ISO publish timestamp. |
| `country` | `string` | `"US"` | Two-letter country code for localized results (e.g., `US`, `ID`, `GB`, `JP`). |
| `language` | `string` | `"en"` | Two-letter language code for YouTube labels (e.g., `en`, `id`, `es`, `ja`). |
| `maxConcurrency` | `integer` | `4` | Maximum parallel requests when `includeDetails` is enabled (`1` to `10`). |
| `proxyConfiguration` | `object` | `{"useApifyProxy": false}` | Optional Apify Proxy settings. |

### Sample Output

#### Enriched Video Record (`recordType: "video"`)

```json
{
  "recordType": "video",
  "id": "kqtD5dpn9C8",
  "url": "https://www.youtube.com/watch?v=kqtD5dpn9C8",
  "title": "Python for Beginners - Learn Coding with Python in 1 Hour",
  "description": "Learn Python basics in just 1 hour! Perfect for beginners interested in AI and coding...",
  "thumbnailUrl": "https://i.ytimg.com/vi/kqtD5dpn9C8/hq720.jpg?sqp=-oaymwEnCNAFEJQDSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLD0dBhtORbMQwzcfnpyENbeikoJ7w",
  "channelId": "UCWv7vMbMWH4-V0ZXdmDpPBA",
  "channelName": "Programming with Mosh",
  "channelHandle": "@programmingwithmosh",
  "channelUrl": "https://www.youtube.com/@programmingwithmosh",
  "channelVerified": true,
  "channelSubscribersText": "",
  "channelSubscribers": 0,
  "viewCount": 25925781,
  "viewCountText": "25,925,781 views",
  "likeCount": 574936,
  "commentCount": 0,
  "durationSeconds": 3606,
  "durationText": "1:00:06",
  "publishedAt": "2020-09-16T06:00:20-07:00",
  "publishedTimeText": "6y ago",
  "isShort": false,
  "isLive": false,
  "category": "Education",
  "keywords": [
    "code with mosh",
    "introduction to python",
    "learn python",
    "learn python programming",
    "mosh hamedani",
    "programming",
    "programming with mosh",
    "python",
    "python 3",
    "python tutorial"
  ],
  "videoCount": 0,
  "channelTotalViews": 0,
  "channelJoinedDate": "",
  "channelCountry": "",
  "channelLinks": [],
  "sourceInput": "python programming",
  "scrapedAt": "2026-11-15T07:59:00.119490+00:00"
}
```

#### Channel Short Record (`recordType: "short"`)

```json
{
  "recordType": "short",
  "id": "ai1gIWacf0I",
  "url": "https://www.youtube.com/shorts/ai1gIWacf0I",
  "title": "This can SEE Sound!",
  "description": "This is an acoustic imaging camera",
  "thumbnailUrl": "https://i.ytimg.com/vi/ai1gIWacf0I/frame0.jpg",
  "channelId": "UCBJycsmduvYEL83R_U4JriQ",
  "channelName": "Marques Brownlee",
  "channelHandle": "@mkbhd",
  "channelUrl": "https://www.youtube.com/@mkbhd",
  "channelVerified": true,
  "channelSubscribersText": "21.4M subscribers",
  "channelSubscribers": 21400000,
  "viewCount": 2745004,
  "viewCountText": "2.7M views",
  "likeCount": 76981,
  "commentCount": 0,
  "durationSeconds": 90,
  "durationText": "",
  "publishedAt": "2026-10-27T13:14:55-07:00",
  "publishedTimeText": "",
  "isShort": true,
  "isLive": false,
  "category": "Science & Technology",
  "keywords": [
    "acoustic imaging",
    "sound camera",
    "MKBHD"
  ],
  "videoCount": 0,
  "channelTotalViews": 0,
  "channelJoinedDate": "",
  "channelCountry": "",
  "channelLinks": [],
  "sourceInput": "@mkbhd",
  "scrapedAt": "2026-11-15T07:59:03.988070+00:00"
}
```

#### Channel Profile Record (`recordType: "channel"`)

```json
{
  "recordType": "channel",
  "id": "UCBJycsmduvYEL83R_U4JriQ",
  "url": "https://www.youtube.com/@mkbhd",
  "title": "Marques Brownlee",
  "description": "MKBHD: Quality Tech Videos | YouTuber | Geek | Consumer Electronics | Tech Head | Internet Personality!\n\nbusiness@MKBHD.com\n\nNYC",
  "thumbnailUrl": "https://yt3.googleusercontent.com/qu4TmIaYUlS41-dJ9gZ7DUR3nilvmB5_11i6OKSdvNnBNiyOusZP1bMN6ICnuxtjFBb6ioKgRQ=s900-c-k-c0x00ffffff-no-rj",
  "channelId": "UCBJycsmduvYEL83R_U4JriQ",
  "channelName": "Marques Brownlee",
  "channelHandle": "@mkbhd",
  "channelUrl": "https://www.youtube.com/@mkbhd",
  "channelVerified": true,
  "channelSubscribersText": "21.4M subscribers",
  "channelSubscribers": 21400000,
  "viewCount": 0,
  "viewCountText": "",
  "likeCount": 0,
  "commentCount": 0,
  "durationSeconds": 0,
  "durationText": "",
  "publishedAt": "",
  "publishedTimeText": "",
  "isShort": false,
  "isLive": false,
  "category": "",
  "keywords": [],
  "videoCount": 1800,
  "channelTotalViews": 5900363903,
  "channelJoinedDate": "Mar 21, 2008",
  "channelCountry": "United States",
  "channelLinks": [
    "https://twitter.com/MKBHD",
    "https://instagram.com/MKBHD",
    "https://youtube.com/c/TheStudio",
    "https://reddit.com/r/MKBHD",
    "https://discord.gg/MKBHD"
  ],
  "sourceInput": "@mkbhd",
  "scrapedAt": "2026-11-15T07:59:00.627235+00:00"
}
```

# Actor input Schema

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

Keywords or phrases to search on YouTube (e.g., 'python programming', 'ai tools').

## `channelUrls` (type: `array`):

YouTube channel handles (@mkbhd), channel IDs (UC...), or full channel URLs to scrape.

## `startUrls` (type: `array`):

Optional list of direct YouTube search URLs, channel URLs, video URLs, or Shorts URLs.

## `searchType` (type: `string`):

Filter keyword search results by content type.

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

Filter keyword search results by how recently they were uploaded.

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

Filter keyword search results by video length.

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

Order keyword search results by relevance, upload date, popularity, or rating.

## `channelContent` (type: `string`):

Choose which content to collect from each channel in channelUrls.

## `includeChannelProfile` (type: `boolean`):

Also emit one channel summary record (subscribers, total views, joined date, country, links) for each scraped channel.

## `maxResultsPerInput` (type: `integer`):

Maximum number of items to collect per search query or channel input (1 to 1,000).

## `includeDetails` (type: `boolean`):

Visit each video or Short page to enrich exact view counts, likes, comment counts, full description, category, tags, and ISO publish dates.

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

Two-letter country code for localized YouTube search results (e.g., US, ID, GB, JP).

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

Two-letter language code for YouTube interface labels (e.g., en, id, es, ja).

## `maxConcurrency` (type: `integer`):

Maximum parallel requests when enriching full video or Short details (1 to 10).

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

Optional Apify Proxy configuration. Enable residential proxies for high-volume runs on Apify Cloud.

## Actor input object example

```json
{
  "searchQueries": [
    "python programming"
  ],
  "channelUrls": [],
  "startUrls": [],
  "searchType": "all",
  "uploadDate": "all",
  "duration": "all",
  "sortBy": "relevance",
  "channelContent": "videos",
  "includeChannelProfile": true,
  "maxResultsPerInput": 30,
  "includeDetails": false,
  "country": "US",
  "language": "en",
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `items` (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": [
        "python programming"
    ],
    "channelUrls": [],
    "startUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("wyle/youtube-search-channels-shorts-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": ["python programming"],
    "channelUrls": [],
    "startUrls": [],
}

# Run the Actor and wait for it to finish
run = client.actor("wyle/youtube-search-channels-shorts-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": [
    "python programming"
  ],
  "channelUrls": [],
  "startUrls": []
}' |
apify call wyle/youtube-search-channels-shorts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wyle/youtube-search-channels-shorts-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/6NX53OCli4f8heIlm/builds/CerLktUNKJcOSIW6S/openapi.json
