# YouTube Shorts Scraper (Views, Likes, Sounds, Hashtags) (`locaihost/youtube-shorts`) Actor

YouTube Shorts from keywords, #hashtags, channels' Shorts tabs or links. Every row is a Short: views, likes, comments, length, sound when named, hashtags, publish date, channel and subscribers. Comments, only-new mode for schedules. $2 per 1,000 Shorts. No login, no API key.

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

## Pricing

Pay per event

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 (Views, Likes, Sounds, Hashtags)

Get YouTube Shorts as rows you can export to JSON, CSV or Excel. Every video row is a Short: views, exact likes, comment count, length in seconds, hashtags, publish date, the channel's handle and subscriber count, thumbnail, and the sound it uses when YouTube's page names it. Search with keywords or #hashtags, read any channel's Shorts tab, or paste links to single Shorts, with comments and replies if you want them. You don't need a login, an API key or a daily quota.

### What do people use it for?

- Trend spotting: what a hashtag surfaces this week, with views, likes and comment counts for every Short.
- Sound research: which titled sounds licensed tracks appear on, across a hashtag's or a channel's Shorts.
- Following channels: every new Short from a list of channels, newest or most popular first.
- Reading an audience: the top or newest comments under a Short, with replies, likes and the creator's pinned and hearted picks.
- Scheduled monitoring: with **Only new Shorts and comments** on, you pay only for what appeared since the last run.

### How do I run it?

Paste this into the **JSON** tab of the input and click **Start**:

```json
{"searchTerms": ["cold brew coffee"], "maxResults": 10}
```

That returns the top 10 Shorts YouTube shows for that search, each opened for its full details: 10 rows, usually in under 15 seconds.

More examples:

```json
{"channels": ["@NASA", "https://www.youtube.com/@nike"], "maxResults": 50}
```

```json
{"searchTerms": ["#coldbrew"], "maxResults": 25}
```

```json
{"videoUrls": ["https://www.youtube.com/shorts/hZIJ2PyFHME"], "includeComments": true, "maxComments": 500, "includeReplies": true}
```

```json
{"channels": ["@nasa"], "publishedAfter": "7 days", "maxResults": 50}
```

A hashtag reads the hashtag's own Shorts feed when YouTube's page offers one, and YouTube's Shorts search for that hashtag otherwise. A link to a regular (long) video never becomes a paid row: it comes back as a free row saying it is not a Short.

### What does it return?

Four kinds of row, set by the `type` field: **video** (always a Short), **channel**, **comment** and **unavailable** (a free row for a missing video, a regular-video link, comments turned off, a channel without a Shorts tab, a hashtag with no Shorts, or an unusable entry, saying why).

| Row | Fields |
|---|---|
| Short | `id`, `url`, `title`, `channelName`, `channelId`, `channelHandle`, `channelUrl`, `channelVerified`, `subscriberCount`, `viewCount`, `likeCount`, `commentCount`, `commentsTurnedOff`, `durationSeconds`, `duration`, `publishedAt` (exact time, UTC), `publishDate`, `publishedText`, `description`, `tags`, `hashtags`, `category`, `soundTitle`, `thumbnail`, `isLive`, `watchingNow`, `wasLive`, `isUpcoming`, `details`, `rank`, `descriptionLinks` (outside links, unwrapped), `isAgeRestricted`, `channelTotalViews` (from a channel tab), `commentsFetched` and `commentsNote` (with comments on) |
| Channel | `id`, `url`, `handle`, `name`, `description`, `subscriberCount`, `subscriberCountText`, `videoCount`, `viewCount` (all videos), `joinedDate`, `country`, `links` (title and link), `keywords`, `avatar`, `banner`, `verified`, `lastUploadText` and `lastUploadApproxDate` (newest video on the Videos tab) |
| Comment | `videoId`, `videoUrl`, `commentId`, `parentId` (for replies), `isReply`, `text`, `likeCount`, `replyCount`, `publishedText`, `isEdited`, `authorHandle`, `authorChannelUrl`, `authorIsCreator`, `authorIsVerified`, `isPinned`, `isHeartedByCreator`, `sortedBy` |
| Every row | `type`, `source` (search, hashtag, channel, playlist or url), `input` (what you typed), `scrapedAt` |

A real Short row from a run on 2026-11-14 (some fields left out for brevity):

```json
{
  "type": "video",
  "id": "-62C9R_41Sc",
  "url": "https://www.youtube.com/shorts/-62C9R_41Sc",
  "title": "From the Moon to the 50-Yard Line",
  "channelName": "NASA",
  "channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
  "channelHandle": "@NASA",
  "channelUrl": "https://www.youtube.com/@NASA",
  "channelVerified": true,
  "subscriberCount": 15100000,
  "viewCount": 59866,
  "likeCount": 1135,
  "commentCount": null,
  "commentsTurnedOff": true,
  "durationSeconds": 39,
  "duration": "0:39",
  "publishedAt": "2026-10-05T23:21:46.000Z",
  "publishDate": "2026-10-05",
  "hashtags": ["#ArtemisII", "#FlyEaglesFly", "#MoonJoy"],
  "category": "Science & Technology",
  "soundTitle": null,
  "thumbnail": "https://i.ytimg.com/vi/-62C9R_41Sc/hqdefault.jpg",
  "isLive": false,
  "wasLive": false,
  "details": "full",
  "source": "channel",
  "input": "@NASA",
  "scrapedAt": "2026-11-14T01:29:03.242Z"
}
```

**Full video details** is on by default. Each Short is opened on its own page for exact likes, the exact upload time, the full description, tags, category, the comment count and the channel's subscribers. Turn it off for faster runs that return only what the search, hashtag feed or channel tab shows (title, views, channel). The price is the same either way.

**About `soundTitle`:** YouTube's own page names the sound for some Shorts, usually a licensed track, in the description's music section. When YouTube names it, you get the title. When it doesn't (most Shorts use an original or untitled sound), the field is empty rather than guessed, which is why the example above shows null.

### How much does it cost?

You pay per row. The run itself is free apart from a one-time $0.00005 start fee.

| Row | Free and Starter plans | Scale | Business |
|---|---|---|---|
| Short | $2 per 1,000 | $1.50 per 1,000 | $1.10 per 1,000 |
| Channel | $1 per 1,000 | $0.75 per 1,000 | $0.55 per 1,000 |
| Comment or reply | $0.50 per 1,000 | $0.375 per 1,000 | $0.275 per 1,000 |

**Free rows, never charged:** missing or removed videos, links to regular videos, Shorts with comments turned off, channels without a Shorts tab, hashtags and searches with no Shorts, unusable input, and anything skipped by **Only new Shorts and comments**. Shorts left out by the date window, and repeats of a Short already returned in the same run (YouTube lists some Shorts on more than one search page or in more than one search), are never returned and never charged.

Apify's free $5 monthly credit covers about 2,500 Shorts or 10,000 comments. On the Free plan a run stops at 1,000 rows; any paid Apify plan removes that cap. Set a **Max cost per run** in the run options and the run stops cleanly at that amount.

#### Measured runs

Real runs on build 0.1.7, 2026-11-15. Cost is the run's charges on the Starter price, start fee included.

| Input | Rows | Run time | Cost |
|---|---|---|---|
| Quick start (`cold brew coffee`, 20 Shorts) | 20 Shorts | 6 s | $0.040 |
| `#skincare`, 30 Shorts | 30 Shorts | 8 s | $0.060 |
| Channel `@NASA`, 25 Shorts and the channel row | 25 Shorts, 1 channel | 9 s | $0.051 |
| One Shorts link with 40 comments | 1 Short, 40 comments | 5 s | $0.022 |
| Upload date "this week", 15 Shorts | 15 Shorts (58 older left out, free) | 59 s | $0.030 |
| Four searches and a channel, 150 each | 698 Shorts, 1 channel (350 repeats left out, free) | 78 s | $1.40 |
| Five searches with 100 comments each, 60-second timeout | 99 Shorts, 4,707 comments | 45 s | $2.55 |

### How do I narrow it by date or filter?

All optional. Left unset, a run returns everything it finds up to your Max results.

- **Published after / Published before** take a date (2026-10-01) or a period ("7 days", "3 months"). A channel's Shorts tab read newest first stops at the first Short older than the window, so "everything since last week" costs only those Shorts. Other lists aren't strictly by date (YouTube's Upload date order for a Shorts search mixes years together): older Shorts are skipped and the list goes on, giving up after 10 pages in a row with nothing inside. Shorts links are always returned.
- **Upload date** ("today", "this week", "this month", "this year") reads the search in YouTube's Upload date order and leaves out every Short older than that period, free; it gives up after 10 pages in a row with nothing inside. YouTube's own upload-date filter often answers nothing for Shorts, so we apply the period ourselves. It narrows channels the same way. **Sort by** and **Features** are YouTube's own search filters; if YouTube's Popularity order returns nothing for a search, the run says so and uses its default order.
- **Comments newer than** reads comments newest first and stops each Short's comments at the first older one. **Replies per comment** caps each thread, so one huge thread doesn't use up the comment limit.
- Every Short with comments on carries `commentsFetched` and `commentsNote`: how many comment rows came, and in plain words why that is fewer than YouTube's comment count (your limit, the cutoff, replies not asked for, or comments YouTube counts but doesn't show publicly).
- **Start URLs** take any YouTube link, including hashtag pages (`youtube.com/hashtag/coldbrew`), Shorts links, playlists and search result pages (their filters are kept). Only Shorts are returned from any of them.

### Can I paste input written for another Shorts tool?

Yes, through the API or the JSON tab. These field names are read as ours, and our own field wins whenever you set it to something other than its default:

- Search: `search_keywords`, `keywords`, `queries`, `query` as **Search terms**; `hashtags` (with or without `#`) as hashtag searches; `upload_date` (`today`, `this_week`, `this_month`, `this_year`), `sort_by` or `sort`, and `country` or `region` as Region.
- Channels and links: `channelUrls`, `channelHandles`, `youtubeHandles` or `handles` as **Channels**; `urls`, `links`, `shortsUrls` or `directUrls` as **Start URLs**.
- Amounts and order: `maxResultsShorts`, `max_results`, `maxItems` or `maxShorts` as **Max results** (there, `0` means as many as YouTube lists, up to 5,000 per source); `sortChannelShortsBy` (`NEWEST`, `POPULAR`, `OLDEST`) as the channel order.
- Dates and details: `oldestPostDate` or `dateFrom` as **Published after**, `newestPostDate` or `dateTo` as **Published before**, `fetch_video_details` as **Full video details**, `maxCommentsPerVideo` as the comment limit. Durations and features spelled `under_3`, `3_to_20`, `over_20` or `creative_commons` are understood too.

### Can it run on a schedule?

Turn on **Only new Shorts and comments** and schedule the run daily or weekly in Apify Console. Each run then returns only the Shorts and comments this same input hasn't returned before. The rest are skipped and not charged.

It works as a window. With a limit of 50, you get the new ones among the latest 50 Shorts of each source, and the run doesn't dig further back to make up the number. With comments on, Shorts you've already seen are still checked for new comments. Channel rows are always returned, so their subscriber and view counts stay current.

### How do I get the data out?

- API: start a run and fetch the dataset with Apify's REST API or its JavaScript and Python clients. Every row is JSON.
- Exports: JSON, CSV, Excel, XML or HTML from the dataset tab, or into another app through Apify's integrations.
- Webhooks and scheduling from the run options in Apify Console.
- The Actor also works as a tool through Apify's MCP server, so an assistant that can call Apify Actors can pull Shorts for you.

### What doesn't it do?

- Public data only, read the way a signed-out visitor sees it. Private, members-only and some age-restricted Shorts (YouTube asks for a signed-in account) return a free "not found" row. We never sign in.
- Long videos are out of scope by design: a link to one comes back as a free "not a Short" row, and searches return only Shorts.
- YouTube rounds subscriber counts and comment likes above 1,000 (4.55M, 72K). Views and likes on Shorts are exact. Comment counts are exact when comments are collected and rounded the same way otherwise.
- Lists show only a rounded date ("3 months ago"), so the date window opens Shorts near its edge for their exact upload time. A Short whose date YouTube doesn't show at all is kept.
- The sound's title comes from YouTube's page when it names one; YouTube's data doesn't carry audio identification for every Short, so the field is empty for those. There is no sound page id or audio download.
- Transcripts and subtitles of a Short, live chat, video downloads and the channel's business email (which YouTube shows only after a sign-in and CAPTCHA) are not included.
- **Region** changes which Shorts YouTube offers and how searches rank; text stays in English, because counts and dates are read from English wording. There is no separate language option for the same reason.
- Email addresses and phone numbers are removed from comments, descriptions and channel About text, and replaced with `[email removed]` or `[phone removed]`. Commenters appear only as the public @handle and channel link YouTube shows.

### Is it legal to scrape YouTube?

This Actor reads only public pages, the way a signed-out visitor sees them, with no account and no cookies. Videos, descriptions and comments belong to their creators and commenters: use the data for analysis and research, respect copyright, and follow the laws on personal data that apply to you (GDPR, CCPA). If in doubt, ask a lawyer.

### Other questions

**What does a typical run cost?** 100 Shorts with full details cost $0.20. The same 100 Shorts with 100 comments each cost $0.20 + 10,000 comments × $0.50 / 1,000 = $5.20.

**Can I use it from code?** Yes. Call the Actor through the Apify API with the same JSON input as in the examples above, then read the dataset.

**Why are some fields empty?** A list-only row (Full video details off) has no likes, tags or exact date. `soundTitle` is empty when YouTube's page names no sound. Comment counts are empty when comments are turned off.

**What if YouTube changes its pages?** We run a test of the Actor every day, so we usually see a break before you do and fix it.

Did it help? A short rating on the Store helps other people find it.

Questions or a field you need? Open an issue on the **Issues** tab: we answer issues within 24 hours.

# Changelog

This Actor's version history is a separate document: https://apify.com/locaihost/youtube-shorts/changelog.md

# Actor input Schema

## `searchTerms` (type: `array`):

What you would type into YouTube's search box, or a #hashtag like #shorts. A hashtag reads the hashtag's own Shorts feed when YouTube's page offers one, and its Shorts search otherwise. Each term returns up to Max results Shorts.

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

Channel @handles, links or UC… ids (@NASA, https://www.youtube.com/@nike). Each returns that channel's Shorts tab, up to Max results, plus a channel row with its subscriber count (see Channel options to turn that off).

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

Links to single Shorts (youtube.com/shorts/…, youtu.be/…) or bare video ids. A regular video link comes back as a free row saying so, never as a charged result. Add comments below to get each Short's comments.

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

Most Shorts per search term, hashtag, channel tab and playlist. 0 with channels returns the channel row only.

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

Playlist links (youtube.com/playlist?list=…) or ids. Only the Shorts in a playlist are returned; a playlist of regular videos gets a free row saying so.

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

Any YouTube link: hashtag pages (youtube.com/hashtag/coldbrew), Shorts and channel links, playlists and search result pages (their filters are kept). Only Shorts are returned from any of them.

## `videoDetails` (type: `boolean`):

Open every Short for exact likes, exact upload time, description, tags, category, comment count, the sound it uses and channel subscribers. Same price either way; off is faster and returns only what the search, hashtag feed or channel tab shows (title, views). Always on for Shorts links and when comments are on.

## `uploadDate` (type: `string`):

Only Shorts uploaded within this time (YouTube's own Upload date filter).

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

Relevance or Popularity, the two orders YouTube offers for search today.

## `features` (type: `array`):

Only Shorts that have all of these.

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

Only Shorts published on or after this: a date like 2026-10-01 (midnight UTC) or a period like "7 days", "2 weeks" or "3 months". A channel tab read newest first stops at the first older Short, so you get exactly the recent ones. Other lists, searches included, aren't strictly by date: older Shorts are skipped and the list goes on (it gives up after 10 pages in a row with nothing inside). Left-out Shorts are free and don't count toward Max results. Shorts links are always returned. Empty = any date.

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

Only Shorts published before this: a date like 2026-10-01 or a period like "1 month" (published more than a month ago). Newer Shorts are skipped, free, and the list goes on. Combine with Published after for a range. Shorts links are always returned. Empty = up to now.

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

Order of each channel's Shorts tab, as the tab's own Latest / Popular / Oldest buttons sort it.

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

One row per channel with subscribers, number of videos, total views, joined date, country, description and links. Charged as a channel.

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

Return each Short's comments too, charged per comment. Each row carries the text, likes, reply count, date, the commenter's public @handle, and whether it is pinned or hearted by the creator. Shorts with comments turned off get a free row saying so.

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

Most comment rows per Short, replies included.

## `commentsSort` (type: `string`):

Top comments (YouTube's default order) or newest first.

## `includeReplies` (type: `boolean`):

Also return replies, each right after the comment it answers, with parentId set. They count toward Comments per Short.

## `maxRepliesPerComment` (type: `integer`):

With Replies on: the most replies returned under each comment, so a few huge threads don't use up Comments per Short. 0 or empty = no cap beyond Comments per Short.

## `commentsNewerThan` (type: `string`):

Only comments posted after this: a date like 2026-10-01 or a period like "24 hours" or "7 days". Comments are then read newest first and each Short's comments stop at the first older one (a pinned comment doesn't end them). Replies older than the cutoff are left out too. Left-out comments are free. Empty = every date.

## `onlyNew` (type: `boolean`):

Of the latest Shorts and comments (Max results / Comments per Short), return only those this input hasn't returned in an earlier run. For daily or weekly schedules. Skipped rows are not charged. Channel rows are always returned (their counts change).

## `gl` (type: `string`):

Two-letter country code (GB, IN, DE…) for YouTube's region: which results a search shows and which Shorts are offered, as for a visitor in that country. Text stays in English, because counts and dates are read from English wording. Empty = US.

## Actor input object example

```json
{
  "searchTerms": [
    "cold brew coffee",
    "#cats",
    "space facts"
  ],
  "channels": [
    "@NASA",
    "https://www.youtube.com/@nike"
  ],
  "videoUrls": [
    "https://www.youtube.com/shorts/41UzbuW6wJs"
  ],
  "maxResults": 20,
  "playlistUrls": [
    "https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI"
  ],
  "startUrls": [
    "https://www.youtube.com/hashtag/coldbrew",
    "https://www.youtube.com/@nike/shorts"
  ],
  "videoDetails": true,
  "uploadDate": "any",
  "sortBy": "relevance",
  "features": [],
  "channelSort": "newest",
  "includeChannelInfo": true,
  "includeComments": false,
  "maxComments": 20,
  "commentsSort": "top",
  "includeReplies": false,
  "onlyNew": false,
  "gl": ""
}
```

# Actor output Schema

## `videos` (type: `string`):

One row per Short: title, channel, views, likes, comments, length, sound, date.

## `channels` (type: `string`):

One row per channel: subscribers, videos, total views, joined date, country, links.

## `comments` (type: `string`):

One row per comment or reply: text, author handle, likes, replies, pinned, hearted.

## `full` (type: `string`):

Every field of every row, including free rows.

## `summary` (type: `string`):

Counts, free rows by reason, anything that failed, access stats and cost.

# 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 = {
    "searchTerms": [
        "cold brew coffee"
    ],
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("locaihost/youtube-shorts").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 = {
    "searchTerms": ["cold brew coffee"],
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("locaihost/youtube-shorts").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 '{
  "searchTerms": [
    "cold brew coffee"
  ],
  "maxResults": 20
}' |
apify call locaihost/youtube-shorts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,locaihost/youtube-shorts"
        }
    }
}
```

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/WLMBhX5UfiVwx7vX0/builds/zTzd4V2HV1yxchHHG/openapi.json
