# YouTube Shorts Scraper - Channel, Hashtag & Views (`swerve/youtube-shorts-scraper`) Actor

Scrape YouTube Shorts from any channel or hashtag: exact views, likes, comment count, length, publish date, description, keywords and channel, one row per Short. Walks the whole Shorts shelf. No login, no API key, no quota.

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

## Pricing

$3.00 / 1,000 shorts

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

## YouTube Shorts Scraper - Channel, Hashtag & Views

Scrape **YouTube Shorts** from any channel or hashtag, or a list of Shorts URLs, one clean row per Short: exact view count, likes, comment count, length, publish date, description, keywords and channel. **No login, no API key, no quota.**

### Why this Shorts scraper

- **Every Short on a channel.** The channel's Shorts shelf is walked page by page; a creator with 800 Shorts gives you 800 rows.
- **Hashtags too.** Paste `#cooking` or a hashtag page URL and get the Shorts YouTube lists under it.
- **Real numbers.** Views are exact (2,270,485, not "2.2M"), plus likes and comment counts as YouTube shows them, the length in seconds and the ISO publish date.
- **Cheap listing mode.** Turn details off and get id, title, rounded views, thumbnail and channel straight from the shelf, one request per 48 Shorts.

### Use cases

- Track a creator's or competitor's Shorts performance over time (views, likes, comments per upload)
- Find trending Shorts under a hashtag for content research and trend reports
- Build datasets of Shorts titles, descriptions and keywords for SEO and AI work
- Audit which Shorts formats drive engagement across many channels at once

### Input

| Field | What it does | Example |
|-------|--------------|---------|
| **Channels, hashtags or Shorts** | Channel / @handle URLs, `#hashtags` or hashtag page URLs, Shorts URLs or bare ids. | `https://www.youtube.com/@mkbhd`, `#iphone17`, `https://www.youtube.com/shorts/ai1gIWacf0I` |
| **Max Shorts per channel / hashtag** | How many of the newest Shorts to take from each source. Blank = all. | `50` |
| **Max Shorts in total** | Optional overall cap for the run. Blank = everything. | `1000` |
| **Include details** | Open every Short for exact views, likes, comments, length, date, description. On by default; off is faster and returns the shelf data only. | on |

### Output

One row per Short:

```json
{
  "videoId": "_4ELeWAgMwo",
  "url": "https://www.youtube.com/shorts/_4ELeWAgMwo",
  "title": "ASMR iPhone Duo Unboxing",
  "viewCount": 2270485,
  "likeCount": 70000,
  "commentCount": 987,
  "durationSeconds": 46,
  "publishedAt": "2026-10-21",
  "description": "iPhone duo only comes with 2 things in the box",
  "keywords": null,
  "category": "Science & Technology",
  "channelName": "Marques Brownlee",
  "channelId": "UCBJycsmduvYEL83R_U4JriQ",
  "channelUrl": "https://www.youtube.com/channel/UCBJycsmduvYEL83R_U4JriQ",
  "thumbnail": "https://i.ytimg.com/vi/_4ELeWAgMwo/maxresdefault.jpg",
  "status": "ok",
  "source": "https://www.youtube.com/@mkbhd",
  "scrapedAt": "2026-11-02T18:23:21.103Z"
}
```

### How it works

The actor reads the channel's or hashtag's Shorts shelf through the same internal interface the YouTube site uses, follows its load-more pages to the end, then opens each Short for its details and engagement counts. Requests go through a residential proxy by default, with a fresh address on any refusal.

### Limits

- Likes and comment counts are YouTube's rounded display values above 1,000 (70K becomes 70000). View counts are exact when details are on.
- Hashtag pages list the Shorts YouTube chooses to show for that tag, not every Short that ever used it.
- A Short that was removed or made private after being listed comes back with `status: "unavailable"` and the shelf data only.

### Export formats

Download results as JSON, CSV, Excel or XML, or pull them through the Apify API into your own app, spreadsheet, database or MCP client.

### Frequently asked questions

**Does it scrape regular videos too?** No, only Shorts. For long-form videos, transcripts or comments see the companion YouTube actors.

**Can I get all Shorts of a channel?** Yes. Leave the per-channel limit blank; the shelf is paged to the end.

**Is scraping YouTube legal?** The actor collects only public data. You are responsible for how you use it; review YouTube's terms and your local laws before large-scale use.

### Pricing

Pay per Short returned.

# Actor input Schema

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

Channel or @handle URLs (every Short on the channel), hashtag pages or #tags (the Shorts shelf of that hashtag), or direct Shorts URLs / 11-character ids. Examples: https://www.youtube.com/@mkbhd , https://www.youtube.com/@mkbhd/shorts , #iphone17 , https://www.youtube.com/hashtag/cooking/shorts , https://www.youtube.com/shorts/ai1gIWacf0I

## `maxShortsPerSource` (type: `integer`):

How many of the newest Shorts to take from each channel or hashtag. Leave blank for every Short the source lists.

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

Optional overall cap on how many Shorts the whole run returns. Leave blank for everything your inputs point to.

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

Open every Short for its exact view count, likes, comment count, length, publish date, description, keywords and category. Two extra requests per Short, so a run is slower. Off = only what the listing shows: id, title, rounded views, thumbnail, channel.

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

YouTube rate-limits datacenter addresses, so a residential proxy is the default. Keep it on unless you bring your own proxies.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/@mkbhd"
  ],
  "maxShortsPerSource": 50,
  "includeDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `shorts` (type: `string`):

All Shorts rows (JSON). Append ?format=csv for CSV.

# 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 = {
    "startUrls": [
        "https://www.youtube.com/@mkbhd"
    ],
    "maxShortsPerSource": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("swerve/youtube-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 = {
    "startUrls": ["https://www.youtube.com/@mkbhd"],
    "maxShortsPerSource": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("swerve/youtube-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 '{
  "startUrls": [
    "https://www.youtube.com/@mkbhd"
  ],
  "maxShortsPerSource": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call swerve/youtube-shorts-scraper --silent --output-dataset

```

## MCP server setup

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