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

Extract metadata, views, likes, dislikes, comments, music, and channel data from YouTube Shorts. Search by keyword, channel URL, or video link. Pure HTTP, no browser, 256 MB memory.

- **URL**: https://apify.com/makework36/youtube-shorts-scraper.md
- **Developed by:** [deusex machine](https://apify.com/makework36) (community)
- **Categories:** Social media
- **Stats:** 150 total users, 60 monthly users, 99.4% runs succeeded, 2 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.

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 Shorts Scraper — Views, Likes, Dislikes, Comments & Music API

> ⭐ **Useful?** [Leave a review](https://apify.com/makework36/youtube-shorts-scraper/reviews) — it takes 10 seconds and is the single biggest thing that helps other trend researchers, creator-economy analysts, brand marketers and short-form video tool builders find this YouTube Shorts scraper.

A fast, production-grade **YouTube Shorts scraper** that extracts full metadata, engagement metrics and optional top comments from [YouTube Shorts](https://www.youtube.com/shorts) search results. For every Short it pulls video ID, title, description, channel name and URL, view count, like count, dislike count (via the community [Return YouTube Dislike](https://returnyoutubedislike.com/) dataset), comment count, publish date, hashtags / keywords, thumbnail URL, music or sound attribution, and — when enabled — the top comments with author, text, likes and relative timestamp.

No YouTube Data API v3 key, no OAuth, no daily quota, no waiting for Google to approve your app. Pass an array of search keywords like `"cooking hacks"`, `"fitness motivation"` or `"funny cats"` and get back clean JSON or CSV ready to drop into a trend dashboard, a creator CRM, a content-planning tool, a sentiment-analysis pipeline or a brand-safety system.

Built for trend researchers, creator economy analysts, YouTube creators benchmarking their own niche, brand marketers tracking campaign hashtags, music and sync-licensing analysts, content-strategy agencies, social listening vendors, creator CRMs, UGC discovery platforms and anyone doing YouTube Shorts research at scale.

### ✨ Why use this scraper

Given a list of search queries, this actor hits the internal YouTube / InnerTube API to retrieve Shorts-category results, extracts video IDs, resolves every ID to its full metadata via InnerTube video endpoints, augments the metrics with the [Return YouTube Dislike](https://returnyoutubedislike.com/docs) community-sourced dislike API and optionally opens each Short's comment panel to extract the top comments.

The `#shorts` hashtag is appended automatically to every search query so you don't accidentally mix regular long-form videos into your dataset. When `onlyShortsFilter` is enabled, the actor also filters out any result that exceeds ~60 seconds, guaranteeing a clean Shorts-only dataset.

Under the hood, the actor talks to an internal backend that wraps Patchright — an undetectable Chromium fork — and a hardened InnerTube client. That combination bypasses YouTube's typical bot-detection checks natively, without the stealth-plugin whack-a-mole that stock Puppeteer + `puppeteer-extra-plugin-stealth` runs into on YouTube.

The official [YouTube Data API v3](https://developers.google.com/youtube/v3) is free but has harsh trade-offs for short-form video research:

- **10,000-unit daily quota** — a single `search.list` call costs 100 units. That's 100 searches per day, total, across your entire project. Shorts research at scale blows through this in minutes.
- **No dislike count** — YouTube removed dislikes from the Data API in 2021. You cannot get `dislikeCount` from any official endpoint at any price.
- **No music / sound attribution** — Shorts audio metadata (song name, original sound) is not exposed in the Data API.
- **Shallow comment access** — the `commentThreads.list` endpoint is rate-limited and frequently rejected on Shorts specifically.
- **Quota-increase forms** — burst past the default and Google asks for a use-case justification and a multi-week review.

This actor works around every one of those limits. Dislikes come from Return YouTube Dislike's public API (a community project with hundreds of millions of cached counts). Music is parsed from the Shorts player. Comments are pulled from the Shorts comment panel directly. No quota, no review, no approvals.

### 📤 Output fields

One item per Short, flat JSON (with an optional `comments` array). Maps cleanly to a BigQuery schema, a Postgres table or a Google Sheet.

#### Video metadata

| Field | Type | Description |
|-------|------|-------------|
| `videoId` | string | 11-character YouTube video identifier |
| `url` | string | Direct link in `/shorts/` format |
| `title` | string | Video title including inline hashtags |
| `description` | string | Video description (often empty — YouTube hides it on Shorts without login) |
| `publishDate` | string | Human-readable publish date, e.g. `"Mar 30, 2026"` |
| `isShort` | boolean | Always `true` for Shorts |
| `keywords` | array | Hashtags extracted from the title |
| `thumbnail` | string | Thumbnail URL from `i.ytimg.com` |
| `music` | string | Song or sound name (`"Original Sound"`, artist / track name, sound creator) |

#### Engagement metrics

| Field | Type | Description |
|-------|------|-------------|
| `viewCount` | integer | Exact total views |
| `likeCount` | integer | Total likes |
| `dislikeCount` | integer | Estimated dislikes via [Return YouTube Dislike](https://returnyoutubedislike.com/) API |
| `commentCount` | integer | Total number of comments |

#### Channel data

| Field | Type | Description |
|-------|------|-------------|
| `channelName` | string | Creator's display name |
| `channelId` | string | Channel identifier in `UCxxxxxxxxxx` format |
| `channelUrl` | string | Link to the channel page |
| `subscriberCount` | integer | Subscriber count (often `0` on Shorts — YouTube hides this on the Shorts player) |

#### Comments (when `includeComments=true`)

Each Short gets an additional `comments` array. Comment fields:

| Field | Type | Description |
|-------|------|-------------|
| `author` | string | Commenter's `@handle` |
| `text` | string | Full comment text |
| `likes` | integer | Likes on the comment |
| `publishedTime` | string | Relative timestamp (`"2 hours ago"`) |

When enabled, the scraper clicks the comment button on each Short, waits for the panel to render, and extracts up to 20 visible comments per video.

#### Run metadata

| Field | Type | Description |
|-------|------|-------------|
| `scrapedAt` | string | ISO 8601 timestamp of extraction |

### 🎯 Use cases

- **Trend research** — search by keyword to spot which topics, hashtags and sounds are gaining traction before they peak. Shorts is the fastest-moving discovery layer on YouTube; catching a trend early has outsized ROI.
- **Creator analytics** — pull Shorts from search terms and benchmark engagement rates (`likeCount / viewCount`), comment velocity and publishing cadence across creators in a niche.
- **Competitor monitoring** — track what direct competitors publish, how fast their audience engages and what commenters are actually saying.
- **Content strategy** — analyze the top-performing Shorts in your category to understand which hooks, formats and audio drive views.
- **Music and sound tracking** — identify which songs, original sounds and creator audio are trending across Shorts. Feed into sync-licensing and music-discovery workflows.
- **Sentiment analysis and NLP** — extract comments to measure audience sentiment. Route through OpenAI, Claude or a local Llama for feature-request and bug extraction from creator content.
- **Engagement benchmarking** — compare like-to-view ratios and dislike ratios across videos, niches and creators. Ranking by these ratios uncovers viral sleepers that raw view-count lists miss.
- **Brand safety** — when your brand sponsors a creator, scrape their Shorts weekly, scan comments for toxic language or coordinated attacks, flag early.
- **Creator discovery for brand partnerships** — rank emerging creators by engagement velocity rather than lagging subscriber counts. Reach out before their rates balloon.
- **Training data for LLMs and recommenders** — Shorts titles and comments in underrepresented languages are valuable fine-tuning data.

### 🚀 How to use

#### Mode 1 — search for trending Shorts

```json
{
    "searchQueries": ["cooking hacks", "meal prep ideas"],
    "maxResultsPerQuery": 20
}
```

#### Mode 2 — search with comments

```json
{
    "searchQueries": ["funny cats"],
    "maxResultsPerQuery": 10,
    "includeComments": true,
    "maxComments": 5
}
```

#### Mode 3 — multi-keyword niche scan

```json
{
    "searchQueries": ["fitness motivation", "home workout", "gym fails"],
    "maxResultsPerQuery": 30
}
```

#### Mode 4 — sort by upload date for newest Shorts

```json
{
    "searchQueries": ["ai tools"],
    "maxResultsPerQuery": 50,
    "sortBy": "upload_date"
}
```

#### Mode 5 — sort by view count for top Shorts

```json
{
    "searchQueries": ["travel vlog"],
    "maxResultsPerQuery": 50,
    "sortBy": "view_count"
}
```

#### Mode 6 — high-volume competitive scan

```json
{
    "searchQueries": ["iphone 17 review", "pixel 10 review", "samsung s26 review"],
    "maxResultsPerQuery": 100,
    "includeComments": true,
    "maxComments": 20
}
```

### 📥 Input

Provide **at least one** of `searchQueries`, `channelUrls`, `videoUrls` or
`playlistUrls`. You can combine them in a single run — results are deduplicated
by video id.

```json
{
    "channelUrls": ["https://www.youtube.com/@MrBeast"],
    "playlistUrls": ["https://www.youtube.com/playlist?list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf"],
    "videoUrls": ["https://www.youtube.com/shorts/egvLKQe6I4I", "https://youtu.be/LgbyEFILLJI"],
    "maxResultsPerQuery": 50
}
```

Channel URLs accept `@handle`, `/channel/UC…` and `/c/…` forms. Video URLs accept
`/shorts/…`, `watch?v=…`, `youtu.be/…`, `/embed/…` and `/live/…`. With
`onlyShortsFilter: false` a channel is read from its **Videos** tab instead of
its **Shorts** tab.

#### Don't worry about which field a URL goes in

Drop everything into **`startUrls`** and each link is routed by what it is —
channel, video or playlist:

```json
{
    "startUrls": [
        "https://www.youtube.com/@MrBeast",
        "https://www.youtube.com/shorts/egvLKQe6I4I",
        "https://www.youtube.com/playlist?list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf"
    ]
}
```

`startUrls` takes plain strings or `{ "url": "…" }` objects, and a value that
isn't a URL is treated as a search keyword. The same routing applies to the
named fields, so a channel link pasted into `videoUrls` still works. `keywords`,
`queries` and `search` are accepted as aliases of `searchQueries`, and
`maxResults` as an alias of `maxResultsPerQuery`.

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `startUrls` | array | `[]` | Any mix of channel / video / playlist URLs — each one is routed automatically |
| `searchQueries` | array | `[]` | Keywords to search. `#shorts` is appended automatically |
| `channelUrls` | array | `[]` | Channel URLs to scrape Shorts from (e.g. `https://www.youtube.com/@MrBeast`) |
| `videoUrls` | array | `[]` | Direct Short or video URLs to scrape |
| `playlistUrls` | array | `[]` | Playlist URLs to scrape every video from |
| `maxResultsPerQuery` | integer | `20` | Max Shorts per query / channel (1–200) |
| `sortBy` | string | `relevance` | Order of the returned items: `relevance` (as found), `upload_date` (newest first) or `view_count` (most viewed first). Applied per query / channel / playlist |
| `publishedAfter` | string | — | ISO date — only Shorts published after this date |
| `publishedBefore` | string | — | ISO date — only Shorts published before this date |
| `includeComments` | boolean | `false` | Extract top comments per Short |
| `maxComments` | integer | `10` | Comments per Short when enabled (1–100) |
| `onlyShortsFilter` | boolean | `true` | Filter out videos longer than ~60s so you get pure Shorts data |

### 📋 Output example

#### Short with comments

```json
{
    "videoId": "Hh6beuoFjww",
    "url": "https://www.youtube.com/shorts/Hh6beuoFjww",
    "title": "cats being cats 🤣#youtubeshorts #funnycats #catvideos #shortvideo",
    "description": "",
    "channelName": "Hilarious_cats19",
    "channelId": "UCC1g5eTBsEvHPWWPthcxZ4g",
    "channelUrl": "https://www.youtube.com/@Hilarious_cats19",
    "viewCount": 7457,
    "likeCount": 664,
    "dislikeCount": 6,
    "commentCount": 7,
    "subscriberCount": 0,
    "keywords": ["youtubeshorts", "funnycats", "catvideos", "shortvideo"],
    "thumbnail": "https://i.ytimg.com/vi/Hh6beuoFjww/frame0.jpg",
    "publishDate": "Mar 30, 2026",
    "isShort": true,
    "music": "Original Sound",
    "scrapedAt": "2026-04-22T04:45:47.559Z",
    "comments": [
        { "author": "@deeannsmith7775", "text": "Love the Voids", "likes": 0, "publishedTime": "2 hours ago" },
        { "author": "@arien3776", "text": "Jajsjsjs", "likes": 0, "publishedTime": "4 hours ago" }
    ]
}
```

#### Popular Short (without comments)

```json
{
    "videoId": "V_tjF0lWmsw",
    "url": "https://www.youtube.com/shorts/V_tjF0lWmsw",
    "title": "Brave Chihuahua vs Calm Bulldog: Funny Dog Standoff 😱",
    "description": "",
    "channelName": "doggo.pranks",
    "channelId": "UCUINei7Oezna9eVO1KjbbHg",
    "channelUrl": "https://www.youtube.com/@doggo.pranks",
    "viewCount": 13392,
    "likeCount": 199,
    "dislikeCount": 4,
    "commentCount": 2,
    "subscriberCount": 0,
    "keywords": [],
    "thumbnail": "https://i.ytimg.com/vi/V_tjF0lWmsw/frame0.jpg",
    "publishDate": "Mar 29, 2026",
    "isShort": true,
    "music": "Original Sound",
    "scrapedAt": "2026-04-22T04:34:45.872Z"
}
```

Export the dataset as **JSON**, **CSV**, **Excel**, **XML**, **JSONL** or **HTML table** directly from the Apify console, or via the Apify API.

### 💻 Code examples

#### curl

```bash
curl -X POST 'https://api.apify.com/v2/acts/makework36~youtube-shorts-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchQueries": ["cooking hacks"],
    "maxResultsPerQuery": 30,
    "includeComments": true,
    "maxComments": 10
  }'
```

#### Python (apify-client)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("makework36/youtube-shorts-scraper").call(run_input={
    "searchQueries": ["ai tools", "ai startups"],
    "maxResultsPerQuery": 50,
    "sortBy": "view_count",
    "includeComments": True,
    "maxComments": 20,
})
for s in client.dataset(run["defaultDatasetId"]).iterate_items():
    ratio = s["likeCount"] / max(s["viewCount"], 1)
    print(f"{s['videoId']}  views={s['viewCount']:>8}  ratio={ratio:.3f}  {s['title'][:60]}")
```

#### Node.js (apify-client)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('makework36/youtube-shorts-scraper').call({
  searchQueries: ['travel vlog'],
  maxResultsPerQuery: 50,
  sortBy: 'upload_date',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.table(items.map((s) => ({
  id: s.videoId, views: s.viewCount, likes: s.likeCount, music: s.music,
})));
```

#### Export to CSV

From the run page → *Export* → *CSV*. Or via API:

```
https://api.apify.com/v2/datasets/DATASET_ID/items?format=csv&token=YOUR_TOKEN
```

#### Feed Shorts into a sentiment pipeline

```python
from apify_client import ApifyClient
import openai

client = ApifyClient("YOUR_APIFY_TOKEN")
oa = openai.OpenAI()

run = client.actor("makework36/youtube-shorts-scraper").call(run_input={
    "searchQueries": ["my_brand_campaign"],
    "maxResultsPerQuery": 30,
    "includeComments": True,
    "maxComments": 20,
})

for short in client.dataset(run["defaultDatasetId"]).iterate_items():
    joined = "\n".join(c["text"] for c in short.get("comments", []))
    if not joined: continue
    resp = oa.chat.completions.create(
        model="gpt-4o-mini",
        messages=[{"role": "user", "content": f"Sentiment (pos/neg/neu) of these Shorts comments:\n{joined}"}],
    )
    print(short["videoId"], resp.choices[0].message.content)
```

#### Zapier / Make.com no-code

Both Zapier and Make have an official Apify integration. Trigger on a schedule, action "Run Apify Actor", pass this actor's name and your input JSON, then send the output into a Google Sheet, Airtable, Slack alert or Notion row.

### ⚡ Performance

- **~3–5 seconds per Short** in metadata-only mode
- **~8–10 seconds per Short** with `includeComments` enabled
- **Up to 200 Shorts per query** — raise `maxResultsPerQuery` as needed
- **Multi-query runs process sequentially** to stay polite to YouTube
- No daily quota — runs are limited only by your Apify compute budget

### 📊 Comparison

Several YouTube scrapers live on the Apify Store. Here's how this one stacks up on what actually matters for short-form video research.

| Feature | This scraper | Alternative A | Alternative B | Alternative C |
|---------|--------------|---------------|---------------|---------------|
| Bypass bot detection | **Patchright (undetectable Chromium)** | Puppeteer + stealth | Raw HTTP (fragile) | Playwright |
| Dislike count | **Yes (Return YouTube Dislike)** | No | No | No |
| Comment extraction | **Built-in** | Separate actor ($) | No | Partial |
| Music / sound attribution | **Yes** | No | No | Partial |
| Channel data inline | **Yes** | Yes | Partial | Yes |
| Sort by relevance / date / views | **Yes** | Partial | No | Yes |
| Date-range filter | **Yes** (`publishedAfter` / `publishedBefore`) | No | No | Partial |
| Shorts-only filter (≤60s) | **Yes** | No | No | Partial |
| Multi-keyword per run | **Yes (array)** | Yes | Single | Yes |
| Max results per query | **200** | 100 | 50 | 100 |
| Needs YouTube Data API key | **No** | No | No | No |
| Code examples in README | **Python / Node / curl / OpenAI** | None | None | None |

The honest take: if you only need basic metadata and never care about dislikes, music or comments, a cheaper metadata-only scraper is fine. If you want the full signal set that lets you do serious Shorts research — dislike ratios, comment sentiment, music trends — this scraper bundles it all in one pass.

### 💵 Pricing

Pay-per-result model:

| Plan | Price per Short | 1K Shorts | 10K Shorts | 100K Shorts |
|------|-----------------|-----------|------------|--------------|
| FREE trial | $0 (up to $5 credit) | free | N/A | N/A |
| BRONZE | $0.004 | $4 | $40 | $400 |
| SILVER | $0.0035 | $3.50 | $35 | $350 |
| GOLD | $0.003 | $3 | $30 | $300 |
| DIAMOND | $0.0025 | $2.50 | $25 | $250 |

Apify gives every new user a $5 trial credit — enough to scrape ~1,250 Shorts while you evaluate. No subscription, no minimum, no egress fees. Adding `includeComments` does not change the per-result price; it only adds compute time.

### ❓ FAQ

**Can I scrape regular YouTube videos, not just Shorts?**
This actor is focused on Shorts. For regular long-form videos, use our [YouTube Scraper](https://apify.com/makework36).

**Can I scrape dislikes?**
Yes. Dislike counts come from the [Return YouTube Dislike](https://returnyoutubedislike.com/) community API. Very new or low-traffic videos may show zero dislikes until the community collects enough data.

**Can I extract comments from Shorts?**
Yes. Set `includeComments` to `true`. The scraper opens each Short's comment panel and extracts author, text, likes and timestamp. Up to 20 comments per Short are available.

**Why is `description` empty on Shorts?**
YouTube doesn't expose the full description on the Shorts player without login. The title usually contains the relevant hashtags and context.

**Why is `subscriberCount` zero on Shorts?**
YouTube's Shorts page doesn't display subscriber counts. The `channelUrl` lets you resolve subscribers via a separate lookup.

**Why is `music` null on some Shorts?**
Not every Short uses a tagged audio track. Creator-uploaded custom audio without a selected YouTube sound will leave `music` null.

**Is scraping YouTube legal?**
Scraping publicly available data is generally permissible in most jurisdictions. Respect YouTube's [Terms of Service](https://www.youtube.com/t/terms) and privacy regulations (GDPR, CCPA, LGPD). Consult legal counsel for your specific use case.

**Can I run this on a schedule?**
Yes. Apify's scheduler supports daily, weekly and custom cron expressions. Every run writes to a fresh dataset that you can pull over the Apify API.

**Do I need a YouTube Data API v3 key?**
No. This scraper doesn't touch the official Data API, so quota limits, key rotation and OAuth are all irrelevant.

**Can I filter by minimum view count or engagement ratio?**
Not in the input — filter client-side on `viewCount`, `likeCount` and `commentCount`. That's faster and more flexible than server-side filtering.

### 📝 Changelog

- **v1.0** (2026-04-22) — Full SEO rewrite, pricing tiers, comparison table, OpenAI sentiment example, advanced patterns, channel / playlist input parameters.
- **v0.4** (2026-03-30) — Comment extraction via Shorts comment panel.
- **v0.3** (2026-03-10) — Music / sound attribution.
- **v0.2** (2026-02-20) — Return YouTube Dislike integration.
- **v0.1** (2026-02-01) — Initial release — Shorts search metadata via InnerTube.

### 🔗 Related actors

- [Google Play Reviews Scraper](https://apify.com/makework36/play-store-reviews-scraper) — Android app reviews, ratings, locales
- [Telegram Channel Scraper](https://apify.com/makework36/telegram-channel-scraper) — public Telegram messages and metadata
- [Google Maps Lead Scraper](https://apify.com/makework36/google-maps-scraper-full) — business phone, email, website
- [Fast Airbnb Price Scraper](https://apify.com/makework36/fast-airbnb-price-scraper) — Airbnb listings, prices and coordinates
- [Reddit MCP Server](https://apify.com/makework36/reddit-mcp-server) — Reddit data as MCP tools for Claude and Cursor
- [TikTok Scraper](https://apify.com/makework36) — TikTok videos and creator analytics (same developer)

# Actor input Schema

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

Keywords to search for Shorts (e.g., 'cooking tips', 'fitness'). The scraper adds #shorts automatically.

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

YouTube channel URLs to scrape Shorts from (e.g., https://www.youtube.com/@MrBeast).

## `videoUrls` (type: `array`):

Direct YouTube Short or video URLs to scrape.

## `playlistUrls` (type: `array`):

YouTube playlist URLs to scrape all videos from (e.g., https://www.youtube.com/playlist?list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf).

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

Mix channel, video/Short and playlist URLs here and each one is routed automatically — no need to pick the right field above. A value that isn't a URL is treated as a search keyword.

## `maxResultsPerQuery` (type: `integer`):

Maximum number of Shorts to return per search query or channel.

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

How to sort search results. Only applies to search queries.

## `publishedAfter` (type: `string`):

Only include Shorts published after this date (ISO 8601 format, e.g., 2025-01-01).

## `publishedBefore` (type: `string`):

Only include Shorts published before this date (ISO 8601 format, e.g., 2026-12-31).

## `includeComments` (type: `boolean`):

Extract top comments for each Short. Adds ~0.5s per video.

## `maxComments` (type: `integer`):

Maximum number of comments to extract per video (if enabled).

## `onlyShortsFilter` (type: `boolean`):

Filter out regular videos, only keep Shorts (≤60 seconds).

## Actor input object example

```json
{
  "searchQueries": [
    "cooking tips"
  ],
  "maxResultsPerQuery": 20,
  "sortBy": "relevance",
  "publishedAfter": "2025-01-01",
  "includeComments": false,
  "maxComments": 10,
  "onlyShortsFilter": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

All scraped items in the default dataset (JSON).

## `csv` (type: `string`):

Default dataset formatted as CSV for spreadsheets (Google Sheets, Excel).

# 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": [
        "cooking tips"
    ],
    "publishedAfter": "2025-01-01"
};

// Run the Actor and wait for it to finish
const run = await client.actor("makework36/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 = {
    "searchQueries": ["cooking tips"],
    "publishedAfter": "2025-01-01",
}

# Run the Actor and wait for it to finish
run = client.actor("makework36/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 '{
  "searchQueries": [
    "cooking tips"
  ],
  "publishedAfter": "2025-01-01"
}' |
apify call makework36/youtube-shorts-scraper --silent --output-dataset

```

## MCP server setup

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