# Youtube Shorts Scraper - Cheapest (`socialdataapi/youtube-shorts-scraper`) Actor

YouTube Shorts Scraper — Extract YouTube Shorts data including titles, URLs, views, likes, comments, channel details, upload dates, and engagement metrics. Ideal for Shorts research, competitor analysis, content discovery, and lead generation.

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

## Pricing

from $1.00 / 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 Shorts Scraper — Views, Likes, Comments and Channel Stats

YouTube Shorts Scraper pulls Shorts from **any YouTube channel or keyword search** and returns each one with its title, view count, like count, comment count, publish time, duration, hashtags, caption tracks and the channel's subscriber count. Every response is structured JSON — ready to pass directly to an LLM, index into a vector store, or feed a social listening pipeline. No YouTube account or cookies needed. Start with one competitor's channel, then add every creator and topic you track.

![YouTube Shorts Scraper returns views, likes, dates and channel details for Shorts by channel or keyword as JSON](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/e-youtube-shorts-hero.webp)

***

### What data can I extract with YouTube Shorts Scraper?

Using this YouTube Shorts API, you will be able to extract the following YouTube Short data:

| 🎬 Short title | 👁️ View count | ❤️ Like count | 💬 Comment count |
|---|---|---|---|
| 📅 Publish time (UTC) | ⏱️ Duration | #️⃣ Hashtags | 📝 Description |
| 🆔 Video ID | 🔗 Shorts link | 🖼️ Thumbnail | 🔗 Links in the description |
| 🗣️ Caption tracks (if YouTube lists them) | 🎞️ Stream qualities (labels only, no download link) | 🔞 Age-restricted flag | 🔒 Members-only flag |
| 💼 Paid-promotion flag | 🚫 Comments-off flag (rarely detected) | 📍 Recording location (rarely available) | 💰 Monetization flag (rarely available) |
| 📺 Channel name | 🪪 Channel ID and handle | 🌐 Channel link | 👥 Subscriber count |
| 🎥 Channel video count | 📈 Channel total views | 🗓️ Channel join date | 🌍 Channel country (if set) |
| ✅ Verified badge | 🔗 Channel links | 🙂 Channel avatar | 🏞️ Channel banner |
| 🔢 Rank after sorting | 🧭 Found via channel tab or search | 🧾 Input it came from | 📂 About-channel summary (same channel details in one object) |

***

### How to use YouTube Shorts Scraper

Anyone who tracks creators or topics on YouTube can scrape YouTube Shorts here and get one sorted list of Shorts, with channel details, per channel or keyword in a single run.

**Copy to your AI assistant:**

```text
YouTube Shorts Scraper (Apify Actor ID: socialdataapi/youtube-shorts-scraper, https://apify.com/socialdataapi/youtube-shorts-scraper) is an Apify Actor that returns YouTube Shorts from channels or keyword searches as structured JSON: title, view count, like count, comment count, publish time, duration, hashtags and the channel's subscriber count. Use it whenever someone needs YouTube Shorts data without cookies, a login, or a browser - benchmarking a creator's most viewed Shorts, tracking a topic across creators, or finding quickly growing small channels. Inputs: startUrls (string[], channel handle, username, channel URL, Shorts or video URL, or a keyword searched with YouTube's Shorts filter, default ["rainbowicecream9780"]), maxResults (integer 1-10000, maximum Shorts per entry, default 10), publishedAfter (string, "YYYY-MM-DD" or "N day|week|month|year(s)", keeps Shorts published on or after that date, no default), sortOrder (string, "newest"|"popular"|"oldest", order of each entry's rows, default "newest"), proxyConfiguration (object, Apify Proxy settings, off by default). Each dataset row is one Short with the same 41 keys and is billed as one row_result event; there are no summary or error rows. Likes are null when the creator hides them, formats lists stream quality labels without download links, and an entry that finds no Shorts adds no rows.
```

#### YouTube Shorts Scraper MCP Server: use these Actors from ChatGPT, Claude or Cursor

Point your AI assistant at Apify's MCP server with this Actor already loaded as a tool, and it can read YouTube Shorts on its own: it calls the actor tool directly, then runs it and reads the rows. No glue code, no scraping logic in your prompts.

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/youtube-shorts-scraper"
```

#### Step by step

1. [Create a free Apify account](https://console.apify.com/sign-up).
2. Open [YouTube Shorts Scraper](https://apify.com/socialdataapi/youtube-shorts-scraper) in the Apify Store.
3. Enter the YouTube channel handles, channel URLs, Shorts URLs or keywords, one per line.
4. Click **Start** (or send your API request).
5. Download or stream your results in JSON, CSV or Excel.

#### How to scale YouTube Shorts Scraper to bulk

Put every channel, URL and keyword into the same list, one per line: one run works through them in order and writes all rows into one dataset. The per-entry maximum applies to each line, so 50 channels at 100 Shorts each means up to 5,000 rows. For a recurring bulk YouTube Shorts scraper job, save the input as an Apify task and run it on a schedule, or start several runs through the Apify API with different lists. Each saved Short is one `row_result` charge event, so the per-entry maximum is also your spend cap.

***

### ✨ Features

This YouTube Shorts data extractor fetches clean, structured Shorts from YouTube ⚡. It's ideal for competitor benchmarking, trend spotting, creator scouting and feeding a YouTube Shorts analytics tool or dashboard.

It extracts, per Short:

- **YouTube Shorts views and likes** – plus the comment count, as whole numbers
- **Title, description and hashtags** – the Short's text, with hashtags pulled out
- **Publish time** – the exact time in UTC
- **Duration** – length as hours:minutes:seconds
- **Channel details** – subscribers, total views, video count, join date, country, verified badge and links
- **Caption tracks** – links to the captions YouTube lists for the Short
- **Stream qualities** – quality labels such as 1080p, without a download link

⚡ No browser and no login: plain HTTP requests and ten Shorts processed at a time, so a recorded run of 40 Shorts took 7.0 seconds.

***

### Use cases 💡

- **Content strategist** — sort competitors' Shorts by most viewed to spot winning formats.
- **Social listening analyst** — search a brand keyword daily, keeping only yesterday's and today's Shorts.
- **Talent scout** — shortlist niche creators by subscriber count and channel join date.
- **Researcher** — export YouTube Shorts to CSV weekly and chart views against publish time.
- **AI engineer** — feed titles, descriptions, hashtags and captions into a RAG index for agents.

Building an AI agent? [Connect YouTube Shorts Scraper over MCP](#mcp-integration-for-ai-agents) and let it call the actor on its own.

***

### Why choose this actor?

- **Whole channels and topics in seconds.** A recorded run returned 40 Shorts from two channels in 7.0 seconds, and 60 Shorts for three keywords in 9.9 seconds, each with full channel details.
- **The numbers behind each Short.** A recorded Short came back with 58,879,530 views, 1,696,006 likes and 61,586 comments, next to its channel's 519,000,000 subscribers and 141,227,305,543 total views.
- **41 fields, four ways in.** Enter a channel handle or username, a channel URL, a Shorts URL or a keyword, then sort by newest, oldest or most viewed and filter by publish date.

***

### ⬇️ Input

![YouTube Shorts Scraper input: channels or keywords, max results, published after and sort order](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/e-youtube-shorts-input.webp)

Use it as a YouTube Shorts channel scraper (handle, username, channel URL or a Shorts URL, which scrapes that Short's channel) or as a YouTube Shorts search scraper (any other text, searched with YouTube's Shorts filter); a single word is tried as a channel first and searched as a keyword if that channel has no Shorts. The list of channels or keywords is the only required field.

Accepted formats:

- `@MrBeast` or `mrbeast` (channel handle or username)
- `https://www.youtube.com/@MrBeast` or `https://www.youtube.com/channel/UC...` (channel URL)
- `https://www.youtube.com/shorts/LiH-P4rSkLI` (Shorts or video URL)
- `cooking hacks` (keyword)

| Parameter | Required | Type | Description | Example value |
|---|---|---|---|---|
| `startUrls` | Yes | array of strings | Channels, URLs or keywords, one per entry. Default `["rainbowicecream9780"]`. | `["@MrBeast", "cooking hacks"]` |
| `maxResults` | No | integer | Maximum Shorts per entry, 1 to 10,000. Default `10`. | `40` |
| `publishedAfter` | No | string | Keep only Shorts published on or after a date (`YYYY-MM-DD`) or within a period (`7 days`, `2 weeks`, `1 month` = 30 days, `1 year` = 365 days). No default (all Shorts). | `"2026-08-01"` |
| `sortOrder` | No | string | Order of each entry's rows: `newest` (default), `popular` (most views first) or `oldest`. | `"newest"` |
| `proxyConfiguration` | No | object | Apify Proxy settings. Off by default (direct connection). | `{"useApifyProxy": false}` |

#### Free plan limits

Users on the Apify free plan can fetch up to 20 Shorts per run (all channels, URLs and keywords together) and 200 Shorts per month. When the limit is reached, the run finishes successfully with a status message explaining the limit. Upgrade to any paid Apify plan to remove these limits.

#### Example input

```json
{
  "startUrls": ["@MrBeast"],
  "maxResults": 40,
  "publishedAfter": "2026-08-01",
  "sortOrder": "newest",
  "proxyConfiguration": { "useApifyProxy": false }
}
```

***

### ⬆️ Output

![YouTube Shorts Scraper output: one JSON row per Short with viewCount, likes, date and channelName](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/e-youtube-shorts-output.webp)

Every Short is one typed, normalized JSON item with the same 41 keys on every run, whether it came from a channel's Shorts tab or a keyword search; a value YouTube doesn't show comes back as null or an empty list. Export formats: JSON (default), CSV, Excel.

#### Example output

```json
{
  "title": "Can You Pass This Classroom Quiz?",
  "type": "shorts",
  "id": "LiH-P4rSkLI",
  "url": "https://www.youtube.com/shorts/LiH-P4rSkLI",
  "thumbnailUrl": "https://i.ytimg.com/vi_webp/LiH-P4rSkLI/maxresdefault.webp",
  "viewCount": 58879530,
  "date": "2026-08-11T16:00:06.000Z",
  "likes": 1696006,
  "location": null,
  "channelName": "MrBeast",
  "channelUrl": "https://www.youtube.com/@MrBeast",
  "channelUsername": "MrBeast",
  "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
  "channelDescription": "SUBSCRIBE FOR A COOKIE!\nNew MrBeast or MrBeast Gaming video every single Saturday at noon eastern time!\nAccomplishments:\n- Raised $20,000,000 To Plant 20,000,000 Trees\n- Removed 30,000,000 pounds of trash from the ocean\n- Helped 2,000 people walk again\n- Helped 1,000 blind people see\n- Helped 1,000 deaf people hear\n- Built wells in Africa\n- Built and gave away 100 houses\n- Adopted every dog in a shelter (twice)\n- Given millions to charity\n- Started my own snack company Feastables\n- Started my own software company Viewstats\n- Gave away a private island (twice)\n- Gave away 1 million meals\n- I counted to 100k\n- Ran a marathon in the world's largest shoes\n- Survived 50 hours in Antarctica\n- Recreated Squid Game in real life\n- Created the largest competition show with 1000 people (Beast Games)\n- Gave $5,000,000 to one person\n- Raised $40,000,000 To Bring Clean Water To Millions Of People\n- Granted 100+ Dream Wishes for Kids Fighting Cancer\n- Gave Away Another $5,000,000 On Beast Games S2",
  "channelJoinedDate": "Feb 19, 2012",
  "channelDescriptionLinks": [
    "https://www.themostdangerousgames.com/",
    "https://www.instagram.com/mrbeast/",
    "https://twitter.com/MrBeast",
    "https://facebook.com/mrbeast/"
  ],
  "channelLocation": "United States",
  "channelAvatarUrl": "https://yt3.googleusercontent.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s160-c-k-c0x00ffffff-no-rj",
  "channelBannerUrl": "https://yt3.googleusercontent.com/mHMO_eEMp0dPvh0ADwXhPXNYb_GnjSVsLI8biqF1CpxT8OPl7izhNQsDPD3JHhd5y5Mg9GrP=w2560-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj",
  "channelTotalVideos": 1000,
  "channelTotalViews": 141227305543,
  "numberOfSubscribers": 519000000,
  "isChannelVerified": true,
  "inputChannelUrl": "https://www.youtube.com/@MrBeast",
  "isAgeRestricted": false,
  "aboutChannelInfo": {
    "channelDescription": "SUBSCRIBE FOR A COOKIE!\nNew MrBeast or MrBeast Gaming video every single Saturday at noon eastern time!\nAccomplishments:\n- Raised $20,000,000 To Plant 20,000,000 Trees\n- Removed 30,000,000 pounds of trash from the ocean\n- Helped 2,000 people walk again\n- Helped 1,000 blind people see\n- Helped 1,000 deaf people hear\n- Built wells in Africa\n- Built and gave away 100 houses\n- Adopted every dog in a shelter (twice)\n- Given millions to charity\n- Started my own snack company Feastables\n- Started my own software company Viewstats\n- Gave away a private island (twice)\n- Gave away 1 million meals\n- I counted to 100k\n- Ran a marathon in the world's largest shoes\n- Survived 50 hours in Antarctica\n- Recreated Squid Game in real life\n- Created the largest competition show with 1000 people (Beast Games)\n- Gave $5,000,000 to one person\n- Raised $40,000,000 To Bring Clean Water To Millions Of People\n- Granted 100+ Dream Wishes for Kids Fighting Cancer\n- Gave Away Another $5,000,000 On Beast Games S2",
    "channelJoinedDate": "Feb 19, 2012",
    "channelDescriptionLinks": [
      "https://www.themostdangerousgames.com/",
      "https://www.instagram.com/mrbeast/",
      "https://twitter.com/MrBeast",
      "https://facebook.com/mrbeast/"
    ],
    "channelLocation": "United States",
    "channelUsername": "MrBeast",
    "channelAvatarUrl": "https://yt3.googleusercontent.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s160-c-k-c0x00ffffff-no-rj",
    "channelBannerUrl": "https://yt3.googleusercontent.com/mHMO_eEMp0dPvh0ADwXhPXNYb_GnjSVsLI8biqF1CpxT8OPl7izhNQsDPD3JHhd5y5Mg9GrP=w2560-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj",
    "channelTotalVideos": 1000,
    "channelTotalViews": 141227305543,
    "numberOfSubscribers": 519000000,
    "isChannelVerified": true,
    "channelName": "MrBeast",
    "channelUrl": "https://www.youtube.com/@MrBeast",
    "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
    "inputChannelUrl": "https://www.youtube.com/@MrBeast",
    "isAgeRestricted": false
  },
  "duration": "00:01:14",
  "commentsCount": 61586,
  "text": "#oldnavypartner",
  "descriptionLinks": null,
  "subtitles": [
    {
      "url": "https://www.youtube.com/api/timedtext?v=LiH-P4rSkLI&ei=0u68arT0HoWC9fwPqODH-AY&caps=asr&opi=112496729&exp=xpo&xoaf=5&xowf=1&xowatf=1&xospf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1790792002&sparams=ip,ipbits,expire,v,ei,caps,opi,exp,xoaf&signature=B11630B154EB225182DAD40A6CC3F2532D467913.BF831D83AFCE7B62CCB9D6E0FC3C6274F24A8CC7&key=yt8&kind=asr&lang=en&variant=gemini",
      "languageCode": "en",
      "name": "English (auto-generated)"
    }
  ],
  "order": 4,
  "commentsTurnedOff": false,
  "fromYTUrl": "https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA/shorts",
  "isMonetized": null,
  "hashtags": [
    "oldnavypartner"
  ],
  "formats": [
    {
      "quality": "2160p",
      "url": null
    },
    {
      "quality": "2160p",
      "url": null
    }
  ],
  "isMembersOnly": false,
  "input": "@MrBeast",
  "fromChannelListPage": "shorts",
  "isPaidContent": false
}
```

***

### How does it work?

The actor reads the same public data the YouTube website shows to any visitor, so it never needs a YouTube account. For a channel, it goes through the channel's Shorts tab; for a keyword, it runs a YouTube search with the Shorts filter. For each Short it then collects the details, captions and available qualities, together with the channel's public details. There is no browser: requests are plain HTTP, sent directly by default, and you can switch on Apify Proxy in the input if YouTube blocks your region. Each request is retried up to three times. It returns only publicly visible data, what any logged-out visitor sees. Every row keeps the same 41 keys in the same order; when YouTube doesn't show a value, the key stays and the value is empty.

***

### How do you integrate YouTube Shorts Scraper into your stack?

It works with what you already use: the Apify REST API from any language, MCP for AI agents, and no-code tools.

#### MCP integration for AI agents

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/youtube-shorts-scraper"
```

This registers Apify's MCP server in your client with this Actor already loaded as a tool; your agent then calls it directly, passing the same JSON input you would use in the Console. Sign in with your Apify account when the client asks. Compatible clients include Claude Code, Cursor and Windsurf.

#### No-code tools (n8n, Make, LangChain)

**n8n:** add the Apify node, choose "Run an Actor", pick this Actor and pass the same JSON input; the next node receives the dataset rows.

**Make:** use the Apify app's "Run an Actor" module, then "Get Dataset Items" to map the title, view count and channel name into Google Sheets or a CRM.

**LangChain:** the `langchain-apify` package's `ApifyActorsTool` runs an Apify Actor by its ID, which you copy from this Actor's page in Apify Console; the agent then gets the Shorts rows back as tool output.

***

### Is it legal to scrape YouTube data?

Scraping publicly available YouTube data is generally legal. YouTube Shorts Scraper returns only publicly available data, what any user sees without logging in: public Shorts, their counts and public channel pages. Under the GDPR, scraping public data is generally permissible, but storing and using it must comply with local data-protection law, and channel names or descriptions can identify people. Consult legal counsel if your use case involves bulk storage of personal data.

***

### Frequently asked questions

#### What fields does YouTube Shorts Scraper return?

Each Short comes back with its title, view count, like count, publish time and the channel's subscriber count, among 41 fields in total. See [the data fields section](#what-data-can-i-extract-with-youtube-shorts-scraper).

#### Does YouTube Shorts Scraper require a YouTube account or login?

No. Only public Shorts and channel data is read, so no credentials, cookies or YouTube API key are needed.

#### How fast does YouTube Shorts Scraper run?

A recorded run returned 40 Shorts from two channels in 7.0 seconds, and 60 Shorts for three keywords in 9.9 seconds (local runs on 2026-09-30). Data is live on every run, not cached.

#### What happens if a Short is private or doesn't exist?

It is skipped: no row is written for it and the run continues. A Short whose requests fail three times gets a warning line in the log; a Short YouTube returns no usable data for is counted under "failed" in the end-of-run summary. A channel with an empty Shorts tab is retried as a keyword search, and an entry that finds nothing adds zero rows. In code, group rows by the input each one came from and treat an entry with no rows as "nothing found".

#### Can I scrape multiple YouTube Shorts at once?

Yes. Put every channel, URL and keyword into one list; each entry returns up to your per-entry maximum, sorted on its own, into the same dataset.

#### Does YouTube Shorts Scraper work with Claude, ChatGPT, and other AI agent tools?

Yes — it is available as an MCP tool through Apify's MCP server. Register the server in Claude Code, Cursor or Windsurf:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/youtube-shorts-scraper"
```

This loads the Actor as a ready-to-call tool, so your agent can call it directly. Any agent that can call an HTTP endpoint can use the Apify REST API directly.

#### Does YouTube Shorts Scraper return data in a format LLMs can use directly?

Yes. Every row is typed, normalized JSON with the same field names on every run. No HTML parsing, no selectors: pass it straight to an LLM, index it into a vector store, or feed it to an agent tool, with no transformation step.

#### What happens when YouTube changes its layout or updates its anti-bot system?

The output keys stay the same, so your code keeps working; fields hit by a YouTube change come back empty until the actor's parsing is updated. The actor was last checked against live YouTube on 2026-09-30.

#### Can I use YouTube Shorts Scraper without managing proxies or browser infrastructure?

Yes. There is no browser to run and no proxy account to set up: the actor connects directly by default, retries failed requests up to three times, and Apify Proxy is one switch in the input if YouTube blocks your region. You start a run and get structured JSON back.

#### Which YouTube Short fields work best for AI training data and RAG indexing?

For RAG indexing: the title, description, hashtags, channel description and caption tracks carry the text. For training data: view count, like count, comment count, subscriber count and publish time are consistent numbers and timestamps. Values are typed (strings, integers, booleans and lists), so no normalization is needed.

***

### Your feedback

Found a bug or missing a field? Let us know on the Issues tab of this Actor's page in Apify Console. Include the channels or keywords you ran, so the problem can be reproduced quickly.

# Actor input Schema

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

One entry per line. A channel handle (@MrBeast), username (mrbeast), channel URL (https://www.youtube.com/@MrBeast) or Shorts/video URL scrapes that channel's Shorts tab. Anything else (e.g. funny shorts) runs a YouTube search with the Shorts filter. A single word is tried as a channel first; if that channel has no Shorts, it is searched as a keyword.

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

Maximum number of Shorts to scrape for each entry in the list above (1 to 10,000). Free plan: up to 20 Shorts per run (all entries together) and 200 per month; paid plans have no limit.

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

Keep only Shorts published on or after this date: an absolute date (YYYY-MM-DD) or a relative period (e.g. 7 days, 2 weeks, 1 month = 30 days, 1 year = 365 days). The filter is applied to the Shorts collected for each entry, so a run can return fewer rows than Max Shorts. Leave empty to keep all.

## `sortOrder` (type: `string`):

Order of the rows for each entry: Newest first or Oldest first (by publish time), or Popular (most views first). The Shorts are collected first, then sorted; the `order` field holds the rank.

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

Optional. Turn on Apify Proxy if YouTube blocks requests from your region. Off = direct connection. When on, every YouTube request of the run uses the proxy.

## Actor input object example

```json
{
  "startUrls": [
    "rainbowicecream9780"
  ],
  "maxResults": 10,
  "sortOrder": "newest",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All scraped items in the Actor's default dataset.

# 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": [
        "rainbowicecream9780"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialdataapi/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": ["rainbowicecream9780"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("socialdataapi/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": [
    "rainbowicecream9780"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call socialdataapi/youtube-shorts-scraper --silent --output-dataset

```

## MCP server setup

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