# YouTube Shorts Scraper - Search, Channel Shorts & Videos (`clover_folktale/youtube-scraper`) Actor

A YouTube Data API alternative for Shorts and videos: search Shorts or videos by keyword, or list the Shorts and videos of any channel, with title, view count, duration, upload time, thumbnail and channel details. No login, cookies or API keys needed. Export to JSON, CSV or Excel.

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

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 Shorts Scraper returns public YouTube Shorts and videos as clean, flat JSON. You can search Shorts by keyword, list every Short or the latest videos of any channel, or search videos uploaded within a chosen period. Channel video listings also include the public channel profile: avatar, handle, verified badge and bio. No Google account, API keys, proxies or cookies are needed, so marketers, researchers and developers can use it as a simple alternative to the YouTube Data API.

### What data can you get?

The Actor has four modes. Each mode returns either Short records (`"type": "short"`) or video records (`"type": "video"`).

| Mode | You give | You get |
|---|---|---|
| `shorts` | a keyword | Shorts matching the keyword: link, title, view count, thumbnail |
| `channelShorts` | channel links, @handles or channel IDs | every Short of each channel: link, title, view count, thumbnail, channel ID |
| `search` | a keyword (optional: uploaded within) | videos matching the keyword: title, channel, views, length, upload time, snippet |
| `channelVideos` | channel links, @handles or channel IDs | the latest videos of each channel: title, views, length, upload time, plus the public channel profile |

All fields in the dataset:

| Field | What it contains | Carried by |
|---|---|---|
| `title` | Title of the Short or video | short, video |
| `viewCount` | View count as a number; rounded the way YouTube rounds it when only a short form is shown | short, video |
| `url` | Link to the video or Short on youtube.com | short, video |
| `videoId` | YouTube video ID | short, video |
| `channelName` | Channel name | video |
| `channelId` | Channel ID (`UC...`) | video; Shorts only in channel mode |
| `duration` | Length as shown, e.g. `10:47` | video |
| `publishedTimeText` | Relative upload time as shown, e.g. `5 days ago` | video |
| `description` | Search snippet or channel-list description; `null` when empty | video |
| `viewCountText` | Views as YouTube shows them, e.g. `4.2M views` | short |
| `channelHandle` | Channel handle URL, e.g. `https://www.youtube.com/@name` | video (channel listings only) |
| `channelUrl` | Channel page URL | video (channel listings only) |
| `channelAvatar` | Channel avatar image URL | video (channel listings only) |
| `channelVerified` | Whether the channel carries the verified badge | video (channel listings only) |
| `channelBio` | Channel description as published, including any business contact info | video (channel listings only) |
| `isLive` | Live flag of the video (`true` or `false`) | video |
| `thumbnailUrl` | Thumbnail image URL | short, video |
| `type` | Record type: `short` or `video` | short, video |

In the Apify Console the results are shown in two table views: **Shorts** (`title`, `viewCount`, `channelId`, `url`) and **Videos** (`title`, `channelName`, `viewCount`, `duration`, `publishedTimeText`, `url`). The full records with all fields are always available in the export.

### How to use YouTube Shorts Scraper

1. Open YouTube Shorts Scraper on Apify Store and go to the Input tab.
2. Choose a **Mode**: Search Shorts by keyword, Channel Shorts, Search videos by keyword, or Channel videos.
3. For the keyword modes, enter a **Keyword**. For video search you can also choose **Uploaded within**. For the channel modes, add channel links, @handles or channel IDs under **Channels**.
4. Set **Max results**: the total number of items for the whole run.
5. Click Start and wait for the run to finish.
6. Open the Output tab and export the dataset as JSON, CSV, Excel or another format.

### Input

| Field | Type | Required | What it does | Default |
|---|---|---|---|---|
| `mode` | string | Required | What to scrape: `shorts` (Search Shorts by keyword), `channelShorts` (Channel Shorts), `search` (Search videos by keyword), `channelVideos` (Channel videos) | `shorts` |
| `keyword` | string | Optional | Search keyword for the `shorts` and `search` modes. When empty, "python" is searched. | none |
| `uploadedWithin` | string | Optional | `search` mode only: return only videos uploaded in this period. One of `last_hour`, `today`, `this_week`, `this_month`, `this_year`. The Shorts search has no time filter. | `this_year` |
| `channels` | array of strings | Optional (used by the channel modes) | Channel links (`https://www.youtube.com/@mkbhd`), @handles or channel IDs (`UC...`) for `channelShorts` and `channelVideos`. | prefilled with `@mkbhd` |
| `maxResults` | integer | Optional | Maximum number of items to return in total for this run, from 1 to 5000. You are charged per item returned. | `20` |

`maxResults` is the total across all channels in the run; a run stops as soon as it is reached. On the free Apify plan a run returns at most 20 results in total; any paid Apify plan removes the limit. On the free Apify plan each account can run this Actor up to 3 times per 24 hours and 10 times per 7 days, within a small lifetime free allowance shared across all our Actors, and all free accounts share a daily free budget. When any of these limits is reached, the run stops before fetching anything and nothing is charged.

#### Example: search Shorts by keyword

```json
{
  "mode": "shorts",
  "keyword": "home workout",
  "maxResults": 100
}
```

#### Example: search videos uploaded this month

```json
{
  "mode": "search",
  "keyword": "electric cars",
  "uploadedWithin": "this_month",
  "maxResults": 50
}
```

#### Example: list the Shorts of a channel

```json
{
  "mode": "channelShorts",
  "channels": ["@veritasium"],
  "maxResults": 200
}
```

#### Example: list the latest videos of several channels

```json
{
  "mode": "channelVideos",
  "channels": ["https://www.youtube.com/@mkbhd", "@veritasium"],
  "maxResults": 60
}
```

### Output example

A video from a channel list (`"type": "video"`). Values are illustrative:

```json
{
  "type": "video",
  "videoId": "aBcD1234EfG",
  "url": "https://www.youtube.com/watch?v=aBcD1234EfG",
  "title": "Testing Five Budget Phones for a Week",
  "description": null,
  "channelName": "Example Tech Channel",
  "channelId": "UC0123456789abcdefABCDEF",
  "channelAvatar": "https://yt3.googleusercontent.com/example-avatar=s900-c-k-c0x00ffffff-no-rj",
  "channelHandle": "https://www.youtube.com/@exampletech",
  "channelUrl": "https://www.youtube.com/channel/UC0123456789abcdefABCDEF",
  "channelVerified": true,
  "channelBio": "Weekly reviews of phones, laptops and gadgets.",
  "viewCount": 1200000,
  "duration": "10:47",
  "publishedTimeText": "5 days ago",
  "isLive": false,
  "thumbnailUrl": "https://i.ytimg.com/vi/aBcD1234EfG/hq720.jpg"
}
```

A video from the `search` mode has the same fields, but the channel profile fields (`channelAvatar`, `channelBio`, `channelHandle`, `channelUrl`, `channelVerified`) are empty, `description` holds the search snippet, and `viewCount` is exact.

A Short from a channel list (`"type": "short"`). Values are illustrative:

```json
{
  "type": "short",
  "videoId": "xYz9876WvUt",
  "url": "https://www.youtube.com/shorts/xYz9876WvUt",
  "title": "One-minute desk stretch",
  "viewCountText": "4.2M views",
  "viewCount": 4200000,
  "channelId": "UC0123456789abcdefABCDEF",
  "thumbnailUrl": "https://i.ytimg.com/vi/xYz9876WvUt/hq720.jpg"
}
```

A Short from the keyword search (`shorts` mode) has the same fields except `channelId`.

### How much does it cost?

The Actor uses pay-per-event pricing. You pay a fee for each run start and a fee for each Short or video returned.

| Charge event | Free Apify plan | Paid Apify plans (Bronze to Diamond) |
|---|---|---|
| Run start (`run-start`) | $0.02 per run | $0.005 per run |
| Result (`result`), each Short or video | $0.003 | $0.003 |

Worked examples:

- **100 results on a paid plan:** $0.005 + 100 × $0.003 = **$0.305**.
- **1,000 results on a paid plan:** $0.005 + 1,000 × $0.003 = **$3.005**.
- **20 results on the free plan:** $0.02 + 20 × $0.003 = **$0.08**.

On the free Apify plan, a run returns at most 20 results in total; any paid Apify plan removes the limit.

How charging works:

- The run-start fee is charged when the first request to the data source succeeds, even if that request returns nothing. In the channel modes this first request is the lookup that turns a channel link or @handle into a channel ID, so a channel that is found but has no Shorts or videos still costs the run-start fee with 0 results. The fee is not charged when the data source fails from the start or rejects the IDs, or when your spending limit cannot cover it.
- You never pay for more than `maxResults` items, and you are never charged for items that were not delivered.
- The run stops by itself if your spending limit is reached.

### Use cases

- **Trend and content research:** see which Shorts are taking off for a topic and how many views they get, using the `shorts` mode with a keyword.
- **Competitor and creator tracking:** pull a channel's full Shorts list or latest videos with views, length and upload time, and refresh it on a schedule.
- **Influencer and sponsorship shortlists:** use `channelVideos` to get each channel's handle, verified badge and bio together with the recent performance of its videos.
- **Topic monitoring:** run the `search` mode with `uploadedWithin` set to `today` or `this_week` to collect new videos about a brand, product or event.
- **AI and data projects:** build datasets of video titles, channels and view counts with clean, consistent metadata for analysis.

### Integrations and API

You can start runs from your own code through the Apify API, schedule them in the Apify Console (for example daily channel checks), and connect results to other apps through Apify integrations and webhooks. Results are stored in an Apify dataset that you can read through the API or export as JSON, CSV or Excel.

Python example with the `apify-client` package:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("clover_folktale/youtube-scraper").call(run_input={
    "mode": "channelVideos",
    "channels": ["https://www.youtube.com/@mkbhd", "@veritasium"],
    "maxResults": 60,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### Tips and limits

- **What each source gives.** Keyword Shorts search returns link, title, view count and thumbnail only. It does not include the channel or upload date, and it has no sort or time filter; use the `search` mode for videos with an upload window. Channel Shorts lists give the same fields plus the channel ID.
- **Rounded numbers.** View counts of Shorts and channel videos are what YouTube shows ("4.2M views"), so they are rounded. Search results give exact view counts.
- **Search window.** The `search` mode returns videos uploaded within the chosen period (default: this year).
- **Page sizes.** A channel's Shorts come about 48 per page, channel videos 30 per page, and video search 20 per page. A single keyword search or channel listing ends after 100 pages.
- **Empty input.** An empty input `{}` searches Shorts for "python", which is a quick way to test the Actor.
- **Channels.** Well-formed channel links, @handles or channel IDs that YouTube does not know are skipped. Entries that are not a channel link, @handle or channel ID (for example a video link or a link to another site) are rejected at the start with an input error, before anything runs. If 5 inputs return nothing, the run stops to protect your budget.
- **Reliability.** The Actor retries transient errors in all modes, and re-asks an empty page once in the two keyword modes; in the channel modes an empty page is taken as the end of the list. It stops cleanly instead of failing half-way.
- **Freshness.** Counts are what YouTube shows at the time of the run.
- **Empty fields.** Search results carry no channel profile details (`channelAvatar`, `channelBio`, `channelHandle`, `channelUrl`, `channelVerified`); those appear in channel video listings. Channel video lists have an empty `description`. Shorts from the keyword search have no `channelId`.
- **Not included.** Comments, captions, per-video details (likes, exact upload date) and video downloads.
- **Free plan.** A run returns at most 20 results in total; any paid Apify plan removes the limit.
- **Privacy.** Only public data is returned: titles, descriptions, view counts and the public channel profile (name, ID, handle, avatar, verified badge, bio) of every channel that appears. Descriptions and bios are returned as published, including any business contact info the creator put there.
- **Feedback.** Missing a field or a mode? Open an issue from the Actor page and it will be looked at.

### FAQ

#### Do I need a YouTube or Google account?

No. You do not need a Google account, YouTube login, API keys, proxies or cookies. You only need an Apify account to run the Actor.

#### Is this an alternative to the YouTube Data API?

It can be used instead of the YouTube Data API for the data listed above: Shorts and videos by keyword, and the Shorts and videos of channels. You do not need to create an API key, and you pay per result. It is not an official YouTube or Google product.

#### Is it legal to scrape YouTube?

The Actor only returns public data that anyone can see on YouTube. It does not return private data such as email inboxes, phone numbers from accounts or private messages. You are responsible for how you use the data and for following the laws that apply to you, such as data protection rules.

#### How fresh is the data?

The data is collected live when you run the Actor. View counts and upload times are what YouTube shows at the time of the run.

#### Why are some fields empty?

Different YouTube sources show different data. Keyword Shorts search has no channel or upload date, search results have no channel profile, and channel video lists have no description. See Tips and limits above for the full list.

#### How many results can I get?

`maxResults` goes up to 5,000 items per run. A single keyword search or channel listing ends after 100 pages, so one video search gives at most about 2,000 videos and one channel's video list about 3,000; reaching 5,000 needs several channels or channel Shorts (about 48 per page). On the free Apify plan a run returns at most 20 results in total.

#### Can I get comments, captions or likes?

No. Comments, captions, likes, exact upload dates and video downloads are not included.

#### Can I schedule runs and export the data?

Yes. You can schedule runs in the Apify Console, start them through the API, and export the results as JSON, CSV, Excel and other formats.

### More tools from the same developer

- [TikTok Scraper - Video Search, Hashtags & Author Profiles](https://apify.com/clover_folktale/tiktok-scraper)
- [Bilibili B站 Scraper - Videos, Comments, Subtitles & User IDs](https://apify.com/clover_folktale/bilibili-scraper)
- [Douyin 抖音 Scraper - Videos, Comments, User IDs & IP Location](https://apify.com/clover_folktale/douyin-scraper)
- [Xiaohongshu 小红书 RedNote Scraper - Notes, Comments & User IP](https://apify.com/clover_folktale/xiaohongshu-scraper)
- [Threads Scraper - Posts, Replies & User Profiles, No Login](https://apify.com/clover_folktale/threads-scraper)
- [Reddit Scraper - Posts, Comments & User IDs, No Login](https://apify.com/clover_folktale/reddit-scraper)

# Actor input Schema

## `mode` (type: `string`):

What to scrape: Shorts by keyword, the Shorts of channels, videos by keyword, or the videos of channels.

## `keyword` (type: `string`):

Search keyword. When empty, "python" is searched.

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

Only videos uploaded in this period. The Shorts search has no time filter.

## `channels` (type: `array`):

Channel links (https://www.youtube.com/@mkbhd), @handles or channel IDs (UC...).

## `maxResults` (type: `integer`):

Maximum number of items to return in total for this run. You are charged per item returned. On the free Apify plan a run returns at most 20 results in total; any paid Apify plan removes the limit.

## Actor input object example

```json
{
  "mode": "shorts",
  "uploadedWithin": "this_year",
  "channels": [
    "@mkbhd"
  ],
  "maxResults": 20
}
```

# Actor output Schema

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

All scraped items (JSON, CSV, Excel via the dataset API).

# 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 = {
    "channels": [
        "@mkbhd"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("clover_folktale/youtube-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 = { "channels": ["@mkbhd"] }

# Run the Actor and wait for it to finish
run = client.actor("clover_folktale/youtube-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 '{
  "channels": [
    "@mkbhd"
  ]
}' |
apify call clover_folktale/youtube-scraper --silent --output-dataset

```

## MCP server setup

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