# YouTube Video Info Scraper - Formats, Sizes & Metadata (`coder2077/youtube-video-info`) Actor

Get YouTube video metadata: title, channel, duration, thumbnails and every downloadable format (144p-4K, audio) with exact file size. Perfect before downloading or for building a YouTube downloader. $0.13 per 1,000 videos.

- **URL**: https://apify.com/coder2077/youtube-video-info.md
- **Developed by:** [FastSaver](https://apify.com/coder2077) (community)
- **Categories:** Videos, Social media, Developer tools
- **Stats:** 1 total users, 0 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.

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 Video Info Scraper - Formats, File Sizes & Metadata

Get **YouTube video metadata** for any video: **title, channel, duration, thumbnails** and **every downloadable format with its exact file size** (144p up to 4K, plus audio). Ideal for showing users what they are about to download, or for building a YouTube downloader.

### What does YouTube Video Info Scraper do?

- Title, channel name and channel URL
- Duration in seconds
- Thumbnails in standard and max resolution
- **All available formats** (video and audio) with **file size in bytes**

### Why use it?

- **Fast and stable** - runs on the same infrastructure as [fastsaver.io](https://fastsaver.io) and [@fastsaver_bot](https://t.me/fastsaver_bot), serving **millions of requests a day**. When a platform changes, it gets fixed here first.
- **No proxies, cookies or logins** - blocks and bot checks are our problem, not yours.
- **Bulk** - paste hundreds of links, processed in parallel.
- **Cheap and predictable** - pay only for successful results. Failed links are free.
- **Developer-friendly** - clean JSON, same shape for every platform, ready for the Apify API, webhooks, Make, Zapier and n8n.

### Use cases

- Show quality options and sizes before downloading in your app or bot
- Enrich lists of YouTube links with titles, channels and durations
- Check which videos are available in 1080p or 4K
- Validate YouTube links in bulk

### How to use it

1. Click **Try for free**.
2. Paste your links into the input.
3. Click **Start** and wait a few seconds.
4. Download results as **JSON, CSV, Excel** or get them through the **Apify API**.

### Input

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=HanBb8FonWs",
    "https://youtu.be/6dG1WWjew8s"
  ]
}
```

### Output

```json
{
  "inputUrl": "https://www.youtube.com/watch?v=HanBb8FonWs",
  "ok": true,
  "video_id": "HanBb8FonWs",
  "title": "Snails - Frogbass",
  "author": "DubstepGutter",
  "author_url": "https://www.youtube.com/channel/UCG6QEHCBfWZOnv7UVxappyw",
  "thumbnail": "https://i.ytimg.com/vi/HanBb8FonWs/sddefault.jpg",
  "duration": 234,
  "thumbnails": {
    "low": "https://i.ytimg.com/vi/HanBb8FonWs/mqdefault.jpg",
    "max": "https://i.ytimg.com/vi/HanBb8FonWs/maxresdefault.jpg"
  },
  "formats": [
    {
      "type": "video",
      "format": "360p",
      "filesize": 21096358
    },
    {
      "type": "video",
      "format": "720p",
      "filesize": 60448393
    }
  ],
  "url": "https://www.youtube.com/watch?v=HanBb8FonWs"
}
```

To get the file itself, pass the same URL and a format from `formats` to **YouTube Video Downloader**.

Failed links do not stop the run - they appear as `{ "ok": false, "inputUrl": "...", "error": "..." }` and are **not billed**.

### Pricing

Pay per result. You only pay for successful results.

| Result | Price per 1,000 |
|---|---|
| YouTube video info | $0.13 |

Plus $0.00005 per run start. Apify's free plan includes $5 of monthly credit, enough for tens of thousands of results.

### Use it as an API

Run the actor and get results in one HTTP call:

```bash
curl -X POST "https://api.apify.com/v2/acts/coder2077~youtube-video-info/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://www.youtube.com/watch?v=HanBb8FonWs","https://youtu.be/6dG1WWjew8s"]}'
```

Works the same from Python (`apify-client`), Node.js (`apify-client`), Make, Zapier, n8n and any HTTP client.

### FAQ

#### Does it download the video?

No, it only returns metadata and formats. Use YouTube Video Downloader for the file.

#### Do I need a YouTube API key?

No. No key, no quota.

#### Does it work with Shorts?

Yes. youtube.com/shorts/... links work.

#### Is it legal to download content from social media?

The actor only accesses publicly available content. Respect copyright and each platform's terms: download content you own, have permission to use, or use under fair use. Do not redistribute other people's content without permission.

#### Something does not work?

Open an issue in the **Issues** tab with the link that failed - we usually fix it the same day.

### More downloaders by the same developer

- [Instagram Downloader - Reels, Video, Photo & Stories](https://apify.com/coder2077/instagram-downloader)
- [TikTok Downloader - No Watermark Video & Music](https://apify.com/coder2077/tiktok-downloader)
- [YouTube Video Downloader - MP4 up to 4K & MP3](https://apify.com/coder2077/youtube-video-downloader)
- [YouTube Search Scraper - Videos by Keyword](https://apify.com/coder2077/youtube-search-scraper)
- [Pinterest, Facebook & X (Twitter) Video Downloader](https://apify.com/coder2077/pinterest-facebook-x-downloader)
- [All-in-One Social Media Downloader - Instagram, TikTok, YouTube](https://apify.com/coder2077/social-media-downloader)

Need a plain REST API instead? See [FastSaverAPI](https://api.fastsaver.io).

# Actor input Schema

## `urls` (type: `array`):

Links to YouTube videos or Shorts.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=HanBb8FonWs"
  ]
}
```

# Actor output Schema

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

All results as a dataset (JSON, CSV, Excel).

# 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 = {
    "urls": [
        "https://www.youtube.com/watch?v=HanBb8FonWs"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("coder2077/youtube-video-info").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 = { "urls": ["https://www.youtube.com/watch?v=HanBb8FonWs"] }

# Run the Actor and wait for it to finish
run = client.actor("coder2077/youtube-video-info").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 '{
  "urls": [
    "https://www.youtube.com/watch?v=HanBb8FonWs"
  ]
}' |
apify call coder2077/youtube-video-info --silent --output-dataset

```

## MCP server setup

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

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/YrkIbfMtxP3QkZErO/builds/97EKBTgirhng7h0cs/openapi.json
