# YouTube Shorts API - Channel Shorts with Views (`stas_k/youtube-shorts-api`) Actor

Most Shorts scrapers quietly drop what they cannot read, so you pay for a list that looks complete and is not. This actor returns one row per Short with views, title, thumbnail and link, and every channel it could not read comes back free with the reason.

- **URL**: https://apify.com/stas_k/youtube-shorts-api.md
- **Developed by:** [Stas K](https://apify.com/stas_k) (community)
- **Categories:** Social media, Developer tools, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.20 / 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.

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 API - Channel Shorts with Views

You should not have to open a channel, scroll its Shorts shelf by hand and copy ids
one at a time. Give this actor a channel handle, a channel url or a channel id, and it
returns one row per Short: the video id, a direct `youtube.com/shorts/<id>` link, the
title, the view count as a number and as shown, its position on the shelf and the
thumbnail. Paging follows the continuation token the page itself hands back, so a
channel with hundreds of Shorts is covered, not just the first screen.

### What you get

One row per Short:

| field | meaning |
|---|---|
| `channelInput` | the channel exactly as you sent it |
| `channelId`, `channelTitle` | the resolved channel id (`UC...`) and its title |
| `videoId`, `url` | the id and `https://www.youtube.com/shorts/<id>` |
| `title` | the Short's title as the shelf shows it |
| `views`, `viewsText` | view count as a number and as shown (`79M views`, `17K views`) |
| `position` | its place on the shelf, starting at 0 |
| `thumbnailUrl` | the frame YouTube shows on the shelf |
| `status`, `billable` | `OK` for a delivered Short; a status row carries a reason instead of data |

### Depth, measured

On 2026-11-12 one Shorts page returned **48 entries and a continuation token**, and
three pages gave **144 unique** Shorts. `maxShortsPerChannel` defaults to 100 and is
capped at 1000. The Shorts tab is found on the channel page itself: the actor reads the
tab list and takes the Shorts params from it, so a change to YouTube's own tabs does not
silently turn into an empty run.

### What this actor does not do

- It does not read long-form videos. Shorts only - the search and video actors cover the rest.
- It does not read comments, captions or transcripts.
- It does not return upload dates: the shelf shows a view count, not a date, and inventing
  one would be worse than leaving it out.
- It does not search by keyword. It reads channels you name; a channel with no Shorts tab
  comes back as a free row saying so.
- It does not bypass a block. If YouTube answers something other than a channel or a
  Shorts shelf, the row says so and costs nothing.

### Money

Price: **$0.0002 per delivered Short** (`short-delivered`), The lowest spending limit you can set per run is $0.05.

A row is charged only when it reached the dataset. A status row never carries a video id,
a title or a thumbnail, so it can never be mistaken for the product.

Free, with the reason in the row:

| status | when |
|---|---|
| `INVALID_INPUT` | the channel could not be resolved from what you sent |
| `DUPLICATE` | the same channel appears twice in one run |
| `NO_SHORTS_FOUND` | the channel has no Shorts tab, or the tab is open and empty |
| `NOT_CHECKED_LIMIT` | beyond `maxShortsPerChannel` |
| `NOT_CHECKED_TIME` | not enough time before the platform deadline |
| `NOT_CHECKED_ERROR` | the channel or Shorts page could not be read; the reason names the error |
| `NOT_CHECKED_CAP` | the spending cap leaves no budget |
| `NOT_CHECKED_BILLING` | the price could not be read, so nothing is sold |
| `NOT_CHECKED_CHARGE_UNVERIFIED` | the charge failed and the row was not confirmed |

`stopReason` names the money fact first: `spending-cap`, `billing-price-unknown`,
`charge-error`, `dataset-write-error` or `deadline`. `counterMismatch` in the summary is
`true` when delivered rows do not add up to charged plus delivered-unpaid, and
`datasetNote` explains a doubt the counters cannot express.

### Input

| field | default | meaning |
|---|---|---|
| `channels` | required | handles, urls or channel ids, one or more |
| `maxShortsPerChannel` | 100 | stop after this many Shorts per channel |
| `region` | US | two letter country code that shapes the mix |
| `language` | en | two letter language code for titles and labels |

### Resource use

512 MB of memory and no browser: the actor talks to the public innertube endpoint with
plain HTTP, so a run of 100 Shorts finishes in seconds.

### Status of this build

`0.1`. The parsing is checked against a saved real Shorts page and a real channel page,
and the money path is checked by running the real `main()` against a stand that repeats
the SDK, including its silent cut of a batch that does not fit the budget.

# Actor input Schema

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

One or more channels: a handle (@MrBeast), a channel url or a channel id (UC...). Each channel is read once and gives its own rows.

## `maxShortsPerChannel` (type: `integer`):

Stop after this many Shorts for each channel. Paging follows the page's own continuation token, about 48 Shorts per page.

## `region` (type: `string`):

Two letter country code that shapes the mix, for example US or DE.

## `language` (type: `string`):

Two letter language code for titles and labels, for example en or de.

## Actor input object example

```json
{
  "channels": [
    "@MrBeast",
    "@Google"
  ],
  "maxShortsPerChannel": 100,
  "region": "US",
  "language": "en"
}
```

# Actor output Schema

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

Every delivered Short has channelInput, channelId, channelTitle, videoId, url, title, views, viewsText, position and thumbnailUrl. Rows with a status other than OK carry a reason instead of data.

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

Counters, chargedEvents, byStatus, stopReason, datasetNote and counterMismatch. Status codes: OK, INVALID_INPUT, DUPLICATE, NO_SHORTS_FOUND, NOT_CHECKED_LIMIT, NOT_CHECKED_TIME, NOT_CHECKED_ERROR, NOT_CHECKED_CAP, NOT_CHECKED_BILLING, NOT_CHECKED_CHARGE_UNVERIFIED. Stop reasons: spending-cap, billing-price-unknown, charge-error, dataset-write-error, deadline.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "channels": [
        "@MrBeast",
        "@Google"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("stas_k/youtube-shorts-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "channels": [
        "@MrBeast",
        "@Google",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("stas_k/youtube-shorts-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "channels": [
    "@MrBeast",
    "@Google"
  ]
}' |
apify call stas_k/youtube-shorts-api --silent --output-dataset

```

## MCP server setup

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

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/UqenCp5ZNOCKgDY8w/builds/7HQCSLhua4fgctPo8/openapi.json
