# YouTube Shorts Scraper (`solarg/youtube-shorts-scraper`) Actor

Scrape YouTube Shorts from channels, hashtags or URLs with exact views, likes, comment count, publish date, description and hashtags. No API key.

- **URL**: https://apify.com/solarg/youtube-shorts-scraper.md
- **Developed by:** [Solar G](https://apify.com/solarg) (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

from $0.35 / 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.
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

Scrapes YouTube Shorts from channels, hashtags or individual URLs. Each Short has its exact views and likes, comment count, publish date, channel, description and hashtags, plus its duration where YouTube provides it (see the field notes). No YouTube API key or quota is needed.

### Input

| Field | Description |
|---|---|
| `channels` | `@handle`, channel URL or channel ID. Returns the channel's Shorts, newest first. |
| `hashtags` | With or without `#`. YouTube shows logged-out visitors up to about 36 Shorts per hashtag. |
| `shortUrls` | Shorts URLs or video IDs. Each one is checked; regular videos are reported as errors instead of being returned as Shorts. |
| `maxShortsPerSource` | Limit per channel and per hashtag. Default 50. |
| `includeDetails` | Full details for every Short. Default `true`. Turn it off for a faster, cheaper listing (title and rounded views only). |

```json
{
  "channels": ["@veritasium"],
  "hashtags": ["cooking"],
  "maxShortsPerSource": 100
}
```

### Output

Every record has the same keys; a value is `null` when YouTube does not show it. Example from a real run:

```json
{
  "videoId": "6W_841xoprg",
  "url": "https://www.youtube.com/shorts/6W_841xoprg",
  "title": "Can a Window Stop a Wrecking Ball?",
  "channel": "MrBeast",
  "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
  "channelUrl": "https://www.youtube.com/@MrBeast",
  "channelHandle": "@MrBeast",
  "channelSubscribers": 523000000,
  "channelVerified": true,
  "collaborators": [],
  "views": 128463280,
  "concurrentViewers": null,
  "likes": 2311290,
  "commentCount": 12748,
  "commentCountIsExact": true,
  "duration": "0:30",
  "durationSec": 30,
  "publishDate": "2026-04-14",
  "publishedAt": null,
  "isShort": true,
  "isLive": false,
  "isAgeRestricted": false,
  "isMembersOnly": null,
  "commentsTurnedOff": false,
  "tags": null,
  "category": null,
  "thumbnail": "https://i.ytimg.com/vi/6W_841xoprg/hqdefault.jpg",
  "description": null,
  "hashtags": [],
  "source": "url",
  "sourceValue": "https://youtube.com/shorts/6W_841xoprg?feature=share",
  "input": "https://youtube.com/shorts/6W_841xoprg?feature=share",
  "dateText": "Apr 14, 2026"
}
```

Field notes:

- `views` and `likes` are exact. `likes` is `null` when the creator hides it. `channelSubscribers` is rounded by YouTube.
- `commentCount` is exact when `commentCountIsExact` is `true`; otherwise it is YouTube's rounded figure.
- YouTube sometimes withholds player data from data-centre IP addresses (as in the example above). This happens on many cloud runs. On those records `tags`, `category`, `publishedAt` and `isMembersOnly` are `null` (unknown), and `duration` is estimated from the replay heatmap. Newer Shorts do not have a heatmap yet, so their `duration` and `durationSec` are `null`. `tags: []` means the Short has no tags; `tags: null` means they could not be read.
- `source` / `sourceValue` say where a Short was found (`channel`, `hashtag` or `url`).
- A Short found through more than one source is returned once.

Errors:

- Inputs that are not a channel, hashtag or Short give an item with `input` and `error`, for example "Not a YouTube Short (this is a regular video; use the YouTube Scraper for videos)" or "Short not found, private or removed". Error items are not charged.
- A hashtag entry that is empty after removing `#` (for example `#` alone or only commas) gives "Empty hashtag"; one with other characters gives "Not a valid hashtag".
- A channel with no Shorts, or a hashtag with none, gives an error item explaining that.
- If details fail for a Short found on a channel or hashtag, the listing data is kept and `detailsError` explains why. That record is charged as a listing only. If YouTube stops answering detail requests during a run, the run switches to listing data instead of timing out.

### API usage

```bash
curl -X POST "https://api.apify.com/v2/acts/solarg~youtube-shorts-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"channels": ["@veritasium"], "maxShortsPerSource": 50}'
```

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("solarg/youtube-shorts-scraper").call(run_input={"hashtags": ["cooking"]})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

### Pricing

- $0.50 per 1,000 Shorts (listing)
- $0.50 per 1,000 Shorts for full details (charged only when `includeDetails` is on and the details were retrieved)

That is $1.00 per 1,000 fully detailed Shorts. Error items are free. Apify paid plans get lower prices: 10% off on Bronze, 20% on Silver and 30% on Gold and above. Platform usage is included in the price.

Report problems in the Issues tab.

# Actor input Schema

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

@handles, channel URLs or channel IDs. Collects the channel's Shorts, newest first.

## `hashtags` (type: `array`):

Hashtags with or without #. YouTube shows up to about 36 Shorts per hashtag to logged-out visitors.

## `shortUrls` (type: `array`):

Individual Shorts URLs or video IDs. Regular videos are reported as errors, not returned as Shorts.

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

Maximum Shorts to return for each channel and each hashtag. Shorts URLs are always processed in full.

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

Exact views, likes, comment count, publish date, description and hashtags. Turn off for a faster, cheaper listing (title and rounded views only).

## Actor input object example

```json
{
  "channels": [
    "@veritasium"
  ],
  "maxShortsPerSource": 20,
  "includeDetails": true
}
```

# Actor output Schema

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

Shorts in table form (the Shorts view of the dataset).

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

Every item in the default dataset, including error items.

# 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": [
        "@veritasium"
    ],
    "maxShortsPerSource": 20
};

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

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

```

## MCP server setup

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