# YouTube Shorts Scraper: Channels, Hashtags, Search, Sounds (`zhtech/youtube-shorts-scraper`) Actor

Scrape YouTube Shorts from channels, hashtags, keyword search, sound pages or URLs: exact views, likes, comment count, exact publish time, duration, description, hashtags, sound or music, channel subscribers. Date filters, optional transcripts. No login.

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

## Pricing

from $0.90 / 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

## YouTube Shorts Scraper: Channels, Hashtags, Search, Sounds

Scrape **YouTube Shorts** from **channels, hashtags, keyword searches, sound pages or Shorts URLs** and get one clean row per Short: title, full description, hashtags, creator tags, **exact views and likes**, comment count, **exact publish date and time**, duration, **sound or music used**, engagement rate, thumbnails and **channel stats** (subscribers, verified badge, total views, country). Add an **optional transcript** of what is said in each Short.

Free date filters, no login, no YouTube API key or quota. You only pay for Shorts that were actually delivered: filtered, private, removed and failed Shorts are never charged and come back as free rows with a clear error code.

Built and maintained by **ZH Tech**.

### What can this YouTube Shorts Scraper do?

- **Every Shorts source in one run**: a channel's Shorts tab (`@handle`, `/channel/UC...`, `/c/`, `/user/` or any channel URL), single Shorts URLs or IDs, hashtag pages (`youtube.com/hashtag/name`), **sound pages** (`youtube.com/source/VIDEO_ID/shorts`, all Shorts that use a song), playlists and YouTube search URLs. Plus separate lists for hashtags and search keywords. Duplicates are removed.
- **Keyword search filtered to Shorts**: YouTube's own Shorts filter, sorted by relevance or popularity (view count), with an upload date window (last hour, today, this week, this month, this year).
- **Full data for every Short**, not just the feed card: complete description, hashtags, creator tags, exact publish timestamp, exact views and likes, comment count, comments disabled flag, duration, category, engagement rate, horizontal and vertical (9:16) thumbnails.
- **Sound and music info**: the sound title shown on the Short (song name or "Original Sound"), the artist or sound owner, whether it is licensed music, original audio or a remix of another Short, the source video ID and a link to every Short using that sound.
- **Channel stats on every row**: subscribers, verified badge, avatar, total channel views, video count, join date, country and channel description. Each channel is looked up once per run.
- **Channel Shorts in any order**: newest first, **most popular first** or oldest first.
- **Free filters on the exact publish time**: published after and before (absolute dates or "7 days", "3 months"), minimum views. On newest first channels the actor stops reading as soon as it reaches older Shorts, so date filtered runs are fast.
- **Optional transcripts** (charged separately, only when delivered): manual or auto generated captions, preferred languages with fallback to the spoken language, optional timestamped segments.
- **Monitoring mode**: "Only new Shorts" remembers what earlier runs returned, so a daily schedule pays only for new Shorts.
- **Built to avoid blocking**: Apify Proxy with session rotation, retries and automatic escalation from datacenter to residential IPs only for the requests YouTube blocks. Small JSON responses, no browser.
- **Never crashes on a bad input**: each problem becomes a free row with an `errorCode`.

### Use cases

- **Short form trend research**: search a niche with "This week" and sort by views to see which Shorts are taking off, with their sounds and hashtags.
- **Trending sounds and music**: collect `soundTitle` and `soundArtist` across a niche, then paste a sound page to get every Short that uses it.
- **Competitor and creator analysis**: pull a channel's most popular Shorts with views, likes, comments and engagement rate, and see posting cadence over time.
- **Influencer discovery**: search or browse hashtags, then filter creators by subscriber count, country and engagement.
- **Hashtag research**: find which hashtags the top Shorts in your niche actually use.
- **Content and AI pipelines**: add transcripts to build datasets of hooks, scripts and spoken content for analysis or LLM summaries.
- **Monitoring**: schedule daily runs with "Only new Shorts" and push new Shorts to Slack, Google Sheets or your own API.

### How to use it

1. Click **Try for free**.
2. Paste channels, Shorts, hashtag or sound URLs into **Channels, Shorts, hashtag or sound URLs**, and/or add **Hashtags** and **Search keywords**.
3. Set **Max Shorts per channel, hashtag, sound or search**, the sort order and any filters.
4. Click **Start**. Results appear in the **Output** tab within seconds. Download them as JSON, CSV, Excel, XML or HTML, or fetch them via the API.

### Input examples

Latest Shorts of a few channels from the last 30 days:

```json
{
  "startUrls": ["https://www.youtube.com/@NASA", "@mkbhd"],
  "publishedAfter": "30 days",
  "maxShortsPerSource": 50
}
```

Most viewed Shorts for a keyword this month, with transcripts:

```json
{
  "searchQueries": ["latte art"],
  "searchSort": "views",
  "searchUploadDate": "month",
  "maxShortsPerSource": 100,
  "includeTranscript": true
}
```

A hashtag and all Shorts that use one song:

```json
{
  "hashtags": ["asmr"],
  "startUrls": ["https://www.youtube.com/source/yOzJtIirUJw/shorts"],
  "maxShortsPerSource": 200,
  "minViews": 10000
}
```

#### All input options

| Field | Type | Default | What it does |
|---|---|---|---|
| `startUrls` | array | | Channels, Shorts URLs or IDs, hashtag URLs, sound pages, playlists, search URLs |
| `hashtags` | array | | Hashtags with or without `#` |
| `searchQueries` | array | | Keyword searches filtered to Shorts |
| `maxShortsPerSource` | integer | 20 | Shorts per channel, hashtag, sound, playlist or search (0 = all). Filtered Shorts do not count |
| `maxShorts` | integer | 0 | Stop the run after this many Shorts in total (0 = no limit) |
| `publishedAfter`, `publishedBefore` | string | | `2026-01-31` or relative like `7 days`, `2 weeks`, `3 months` |
| `minViews` | integer | 0 | Skip Shorts with fewer views |
| `channelSort` | string | `newest` | `newest`, `popular` or `oldest` |
| `searchSort` | string | `relevance` | `relevance` or `views` (popularity). YouTube no longer sorts searches by upload date or rating: old inputs with `date` run as `relevance`, `rating` as `views`, with a log note. For the newest Shorts use `searchUploadDate` or `publishedAfter` |
| `searchUploadDate` | string | `any` | `hour`, `today`, `week`, `month`, `year`. Picked automatically from `publishedAfter` when left on `any` |
| `includeChannelInfo` | boolean | true | Channel stats on every row |
| `includeDescription` | boolean | true | Full description text |
| `includeTranscript` | boolean | false | Spoken text of each Short (separate charge, only when delivered) |
| `transcriptLanguages` | array | `["en"]` | Preferred caption languages in order |
| `transcriptSegments` | boolean | false | Add timestamped segments |
| `onlyNewShorts`, `stateKey` | boolean, string | false, `default` | Skip Shorts returned by earlier runs with the same key |
| `includeErrorItems` | boolean | true | Free rows for Shorts or inputs that failed |
| `proxyConfiguration` | object | Apify Proxy | Proxy settings |
| `residentialFallback` | boolean | true | Retry blocked requests on residential IPs |
| `maxConcurrency`, `maxRetries` | integer | 10, 5 | Parallel Shorts and retries per request |

### Output example

```json
{
  "type": "short",
  "status": "success",
  "id": "V_uq3v6xK-4",
  "url": "https://www.youtube.com/shorts/V_uq3v6xK-4",
  "title": "The Sphere Intersection Puzzle",
  "description": "Part of a series of monthly puzzles\nEarly view of some other solutions: ...",
  "hashtags": [],
  "tags": ["Mathematics", "three blue one brown", "3b1b"],
  "viewCount": 301359,
  "likeCount": 8820,
  "commentCount": 382,
  "commentCountText": "382",
  "commentsDisabled": false,
  "engagementRate": 0.03054,
  "publishedAt": "2026-10-25T07:30:46-07:00",
  "publishDate": "2026-10-25",
  "durationSeconds": 46,
  "isShort": true,
  "thumbnailUrl": "https://i.ytimg.com/vi/V_uq3v6xK-4/maxresdefault.jpg",
  "verticalThumbnailUrl": "https://i.ytimg.com/vi/V_uq3v6xK-4/oar2.jpg",
  "soundTitle": "Original Sound",
  "soundArtist": "@3blue1brown",
  "soundType": "original",
  "soundSourceVideoId": "V_uq3v6xK-4",
  "soundUrl": "https://www.youtube.com/source/V_uq3v6xK-4/shorts",
  "category": "Education",
  "isFamilySafe": true,
  "isUnlisted": false,
  "isAgeRestricted": false,
  "isMembersOnly": false,
  "channelId": "UCYO_jab_esuFRV4b17AJtAw",
  "channelName": "3Blue1Brown",
  "channelHandle": "@3blue1brown",
  "channelUrl": "https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw",
  "channelSubscribers": 8760000,
  "channelSubscribersText": "8.76M subscribers",
  "channelVerified": true,
  "channelAvatarUrl": "https://yt3.googleusercontent.com/ytc/AIdro_nFzZ...=s160-c-k-c0x00ffffff-no-rj",
  "channelTotalViews": 794601820,
  "channelVideoCount": 247,
  "channelJoinedDate": "2015-03-03",
  "channelCountry": "United States",
  "channelDescription": "Videos here cover a variety of topics in math ...",
  "position": null,
  "input": "https://www.youtube.com/shorts/V_uq3v6xK-4",
  "source": "video:V_uq3v6xK-4",
  "scrapedAt": "2026-11-17T03:59:03+00:00"
}
```

A Short that uses licensed music has sound fields like these:

```json
{
  "soundTitle": "Can I Ride",
  "soundArtist": "@youasidepiece",
  "soundType": "music",
  "soundSourceVideoId": "yOzJtIirUJw",
  "soundUrl": "https://www.youtube.com/source/yOzJtIirUJw/shorts"
}
```

With **Add transcript** on, each row also has `transcript` (plain text), `transcriptLanguage`, `transcriptLanguageName`, `transcriptIsAutoGenerated`, `transcriptStatus` (`OK`, `LANGUAGE_FALLBACK`, `NO_CAPTIONS` or `FAILED`) and, if requested, `transcriptSegments` with start, end and text in seconds.

#### Error codes

Error rows have `status: "error"` and are never charged.

| `errorCode` | Meaning |
|---|---|
| `VIDEO_UNAVAILABLE`, `PRIVATE_VIDEO` | The Short was removed, made private or never existed |
| `AGE_RESTRICTED`, `MEMBERS_ONLY`, `LOGIN_REQUIRED` | YouTube requires a login for this Short |
| `CHANNEL_NOT_FOUND` | The channel handle or URL does not exist |
| `CHANNEL_HAS_NO_SHORTS`, `NO_RESULTS` | The channel, hashtag, sound or search returned no Shorts |
| `LISTING_FAILED` | A channel, hashtag, sound or search could not be listed |
| `BLOCKED` | YouTube kept refusing requests after all retries (rare) |
| `FETCH_FAILED` | Unexpected error for this Short |
| `INVALID_INPUT` | The input is not a supported YouTube URL, ID or hashtag |

Each run also saves a `RUN_SUMMARY` record in its key-value store with counts, time taken, filtered Shorts and proxy statistics.

### How much does it cost to scrape YouTube Shorts?

This actor uses **pay per event** pricing:

- **Short**: charged once per Short row delivered (`status: "success"`).
- **Transcript**: charged once per Short whose transcript was actually delivered (only when "Add transcript" is on).
- **Actor start**: a tiny fixed fee per run.

Date filters are free, filtered Shorts and error rows are free, and Shorts without captions are not charged for a transcript. The exact prices are on the **Pricing** tab. Platform usage (compute and proxy) is included, so the price you see is the price you pay. Cap your spend with **Max Shorts in total** or the "Maximum cost per run" setting: the actor checks the remaining budget (Short plus transcript) before each Short and stops cleanly.

Tips to keep costs low:

- Use `publishedAfter` with newest first channels: reading stops as soon as older Shorts appear.
- Use `onlyNewShorts` for scheduled runs so you never pay twice for the same Short.
- Turn on transcripts only when you need the spoken text.

### Use with the API, integrations, LLMs and MCP

#### API

Run the actor and get the results in one request (replace `YOUR_TOKEN`):

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

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("zhtech/youtube-shorts-scraper").call(run_input={
    "searchQueries": ["home workout"],
    "searchUploadDate": "week",
    "searchSort": "views",
    "maxShortsPerSource": 50,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item["status"] == "success":
        print(item["viewCount"], item["soundTitle"], item["title"])
```

JavaScript:

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

const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('zhtech/youtube-shorts-scraper').call({
    startUrls: ['@mkbhd'],
    channelSort: 'popular',
    maxShortsPerSource: 25,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((i) => i.status === 'success').map((i) => `${i.viewCount} ${i.title}`));
```

#### Integrations

Connect the actor to Make, Zapier, n8n, Google Sheets, Slack, Airtable, webhooks and more from the **Integrations** tab. A typical flow: schedule a daily run on a few hashtags or competitor channels with `onlyNewShorts`, append new Shorts to a Google Sheet and post the top ones to Slack.

#### Using it with LLMs and AI agents (MCP)

The actor works as a tool for AI agents through the Apify MCP server (mcp.apify.com). Add `zhtech/youtube-shorts-scraper` as a tool in Claude, Cursor, VS Code or any other MCP client, then ask things like "Which sounds do the top 50 latte art Shorts this month use?" or "Summarize the hooks of @mkbhd's 20 most popular Shorts" (with transcripts on). Set `includeDescription: false` and `includeChannelInfo: false` when you only need stats, to keep the context small.

### FAQ

**Are the publish dates exact?**
Yes. `publishedAt` is the exact publish timestamp with time zone from YouTube's video metadata, and the date filters use it. No "2 weeks ago" approximations.

**Can I scrape every Short of a channel?**
Yes. Set **Max Shorts per channel, hashtag, sound or search** to 0.

**How many Shorts does a hashtag return?**
YouTube shows logged out visitors only the first 30 to 40 Shorts of a hashtag page. The actor then continues with a Shorts search for the hashtag, so you can go well beyond that (search results end after a few hundred).

**What is the sound data?**
The sound shown on the Short in the YouTube app: a song (`soundType: "music"`, with the artist channel), the creator's own audio (`"original"`) or audio reused from another Short (`"remix"`). `soundUrl` opens the page with every Short that uses the sound, and you can paste that URL as an input.

**Why is a like count missing?**
Creators can hide likes. In that case `likeCount` is null.

**Are comment and subscriber counts exact?**
Comment counts are exact up to 999; above that YouTube only shows rounded numbers (1.2K), which the actor converts. Subscriber counts are rounded by YouTube for everyone (for example 8.76M). Views and likes are exact.

**Why do some Shorts have no transcript?**
Transcripts come from YouTube captions. Shorts with only music or no speech usually have none. They are still returned (with `transcriptStatus: "NO_CAPTIONS"`) and are not charged for a transcript.

**Can I get regular long videos or comments too?**
Use the companion actors from ZH Tech: YouTube Channel & Video Scraper, YouTube Comments Scraper and YouTube Transcript Scraper.

**Can I download the video files?**
No. This actor returns data and links only.

**Is it legal to scrape YouTube Shorts?**
The actor only collects publicly available data and never logs in. Make sure your use respects YouTube's terms and privacy laws such as GDPR. If you are unsure, consult a lawyer.

### Limitations

- Hashtag pages are limited by YouTube to roughly 30 to 40 Shorts for logged out visitors; more results come from a Shorts search for the same hashtag, which can include Shorts that only mention it.
- Search results end after a few hundred Shorts per query. Use several related keywords or an upload date window.
- YouTube sometimes ignores an upload date window combined with the Shorts filter for single word queries; the actor then searches without the window and still applies your exact date filter.
- Date and view filters apply to channels, hashtags, sounds, playlists and searches. Shorts you list explicitly are always returned. Long videos found in playlists are skipped for free; long videos you list explicitly are returned with `isShort: false`.
- Large comment counts and subscriber counts are rounded by YouTube. Shares, saves and remix counts are not public.
- Counts are a snapshot at the time of the run.

### Support

Found a problem or need a feature? Open an issue on the **Issues** tab with the run ID and the input you used.

# Actor input Schema

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

Channel URLs or @handles (the actor reads the channel's Shorts tab), Shorts URLs or video IDs, hashtag URLs (youtube.com/hashtag/name), sound pages (youtube.com/source/VIDEO_ID/shorts), playlist URLs or YouTube search URLs.

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

Hashtags without or with the # sign. The actor reads the hashtag's Shorts feed and continues with a Shorts search for the hashtag to get more results.

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

Searches YouTube with the Shorts filter on, so only Shorts come back. Use the search options below for sort order and upload date.

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

How many Shorts to return from each channel, hashtag, sound, playlist or search. 0 means all that YouTube lists. Shorts removed by your filters do not count.

## `maxShorts` (type: `integer`):

Stop the whole run after this many Shorts. 0 means no limit. Your maximum cost per run setting is always respected too.

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

Only Shorts published on or after this date. Absolute (2026-01-31) or relative (7 days, 2 weeks, 3 months). On a channel sorted by newest the actor stops reading once it reaches older Shorts. For searches and hashtags the matching YouTube upload date filter is applied automatically.

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

Only Shorts published before this date. Absolute (2026-01-31) or relative (30 days).

## `minViews` (type: `integer`):

Skip Shorts with fewer views than this (for example to find viral Shorts only). Skipped Shorts are free.

## `channelSort` (type: `string`):

Order of a channel's Shorts, same as the sort chips on the channel's Shorts tab.

## `searchSort` (type: `string`):

Sort order for keyword searches. These are the only two orders YouTube still applies. YouTube removed sorting by upload date and rating in 2025 (it silently ignores them): for recent results use the upload date filter or Published after. Old saved inputs with "date" run in relevance order and "rating" runs as popularity, with a note in the log.

## `searchUploadDate` (type: `string`):

YouTube's own upload date filter for keyword and hashtag searches. Leave on Any time when you set Published after: the right window is picked automatically.

## `includeChannelInfo` (type: `boolean`):

Adds channel subscribers, verified badge, avatar, total channel views, video count, join date, country and description. Each channel is looked up once per run.

## `includeDescription` (type: `boolean`):

Full description text of each Short. Turn off for smaller rows.

## `includeTranscript` (type: `boolean`):

Adds the spoken text of each Short from YouTube captions (manual or auto generated). Charged as a separate transcript event, only when a transcript is actually delivered. Shorts without speech have no captions and are not charged for a transcript.

## `transcriptLanguages` (type: `array`):

Language codes in order of preference (en, es, de, pt-BR ...). If none is available the original spoken language is used and transcriptStatus says LANGUAGE_FALLBACK.

## `transcriptSegments` (type: `boolean`):

Adds transcriptSegments: a list of {start, end, duration, text} in seconds.

## `onlyNewShorts` (type: `boolean`):

Skip Shorts that an earlier run with the same state key already returned. Use it on a schedule to pay only for new Shorts.

## `stateKey` (type: `string`):

Name of the list of already scraped Shorts. Use a different key per monitored set.

## `includeErrorItems` (type: `boolean`):

Adds a free row with an errorCode for every Short or input that could not be scraped (private, removed, channel without Shorts, invalid URL). Error rows are never charged.

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

Apify Proxy datacenter IPs work for most runs. Requests that YouTube blocks are retried on residential IPs automatically.

## `residentialFallback` (type: `boolean`):

Retry blocked requests through Apify residential IPs. Only used with Apify Proxy datacenter groups.

## `maxConcurrency` (type: `integer`):

Shorts processed in parallel.

## `maxRetries` (type: `integer`):

Retries with a fresh proxy session for each failed request.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/@NASA",
    "@mkbhd",
    "https://www.youtube.com/shorts/V_uq3v6xK-4",
    "https://www.youtube.com/hashtag/latteart",
    "https://www.youtube.com/source/yOzJtIirUJw/shorts"
  ],
  "hashtags": [
    "latteart",
    "#asmr"
  ],
  "searchQueries": [
    "latte art",
    "budget travel japan"
  ],
  "maxShortsPerSource": 10,
  "maxShorts": 0,
  "minViews": 0,
  "channelSort": "newest",
  "searchSort": "relevance",
  "searchUploadDate": "any",
  "includeChannelInfo": true,
  "includeDescription": true,
  "includeTranscript": false,
  "transcriptLanguages": [
    "en"
  ],
  "transcriptSegments": false,
  "onlyNewShorts": false,
  "stateKey": "default",
  "includeErrorItems": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true,
  "maxConcurrency": 10,
  "maxRetries": 5
}
```

# Actor output Schema

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

No description

# 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/@NASA"
    ],
    "searchQueries": [
        "latte art"
    ],
    "maxShortsPerSource": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zhtech/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/@NASA"],
    "searchQueries": ["latte art"],
    "maxShortsPerSource": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("zhtech/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/@NASA"
  ],
  "searchQueries": [
    "latte art"
  ],
  "maxShortsPerSource": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call zhtech/youtube-shorts-scraper --silent --output-dataset

```

## MCP server setup

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