# YouTube (`superapis/youtube`) Actor

Fast JSON API for YouTube - search with every filter, video details, comments and replies, transcripts, related videos, channels with their videos, shorts, live streams, playlists and posts, playlists and hashtags.

- **URL**: https://apify.com/superapis/youtube.md
- **Developed by:** [SuperAPIs](https://apify.com/superapis) (community)
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 api requests

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 API** gives you YouTube (youtube.com) data - search of videos, shorts, channels, playlists and movies with every filter of the site, search suggestions, video details, related videos, comments and their replies, video transcripts, channel details with their videos, shorts, live streams, playlists and community posts, channel search, playlist details and videos, hashtag videos and link resolving, through a plain HTTP JSON API.

### What makes it different

**It answers instantly.** This Actor runs in Standby mode, so it behaves like a normal REST API instead of a scraper you start and wait for. You send a `GET` request, you get JSON back in the same response - no runs to poll, no datasets to fetch.

**You pay per call, not per row.** A request can return a whole page of results or a full item with everything attached, and is billed as a single request.

**Search.** Videos, shorts, channels, playlists and movies, all at once or one kind at a time, with the filters of the site: upload date (today, this week, this month, this year), duration (under 3 minutes, 3 to 20 minutes, over 20 minutes), features (live, 4K, HD, subtitles, Creative Commons, 360°, VR180, 3D, HDR, location, purchased) and relevance or popularity order, plus the search suggestions YouTube shows while typing.

**Videos.** Title, full description, duration, views, likes, number of comments, publish date, keywords, hashtags, chapters with their start time, caption languages, whether the video is live, and the channel with its handle, subscribers and verified and artist badges. Plus the videos YouTube recommends next to it.

**Comments.** Top comments or newest first, with the total count, each with its text, likes, number of replies, pinned and hearted flags and its author, and every reply to a comment.

**Transcripts.** The full text of a video's captions and every line with its start and end time, in any language the video has captions in.

**Channels.** Handle, description, artist biography, subscribers, number of videos, total views, join date, country, verified badge, keywords, avatar, banner and external links; the channel's videos, shorts and live streams newest, most viewed or oldest first, its playlists and community posts (text, images, attached video and polls), and search inside the channel.

**Playlists and hashtags.** Playlist details with the number of videos, views and owner, every video of a playlist in order, and the videos tagged with a hashtag.

**Links work too.** Every id parameter also takes the YouTube link, channels also take their `@handle`, and the resolve endpoint tells what any youtube.com or youtu.be link points to.

**All endpoints, all documented.** Every endpoint is a plain `GET` with query parameters and a full OpenAPI schema, visible in the API tab. No input schemas to learn and no wrapper objects to unpack.

### Versioning

Endpoints are versioned in the path. Everything today lives under `/v1/`, and it will keep working exactly as it does now - new versions ship alongside it under their own prefix, never by changing what `/v1/` returns.

### Pricing

**$1.00 per 1,000 API requests.** A request is a request, no matter how much data comes back in it. There is no per-row charge, no minimum, and no charge for validation errors, missing parameters or upstream failures.

*Note: as with every Standby Actor on Apify, your run also consumes Apify platform usage while it is awake, billed to your own account at your plan's rate. This Actor is deliberately kept small, and its run shuts down automatically after 5 minutes without requests.*

### Notes and support

Found a bug or need an endpoint that is not covered yet? Open an issue in the **Issues** tab.

# Actor input Schema

## Actor input object example

```json
{}
```

# Actor output Schema

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("superapis/youtube").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("superapis/youtube").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 '{}' |
apify call superapis/youtube --silent --output-dataset

```

## MCP server setup

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

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/1QEzJHfCNucTEgclC/builds/2esFJHSq5zAF1Y9O5/openapi.json
