# YouTube Video Data Scraper: metadata by URL, search, or channel (`solumdata/youtube-video-data`) Actor

Public YouTube video metadata: title, views, likes, duration, publish date, category, tags, description, channel. From video URLs, search queries, or channel uploads. Never downloads video.

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

## Pricing

from $3.00 / 1,000 results

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 Data Scraper

Collect public YouTube video metadata from video URLs, search queries or channel uploads. Get one row per unique video, with its title, views, likes, duration, dates, description, tags and channel details when YouTube provides them.

Use it to compare videos from several channels or collect results for a topic. Search and channel inputs lead to each video's watch page for metadata.

### Retries and limits

The Actor makes up to five attempts per page fetch or continuation request. A video lookup can repeat that page-fetch process across up to five bot-check sessions. These are nested limits, not a five-request total per video. With a proxy configured, new sessions request fresh proxy sessions.

Retries cannot guarantee access. Persistent blocking ends the run as failed; rows already delivered remain in the dataset. The Actor does not log in or solve CAPTCHAs.

### Pricing

Before running, check this Actor's Pricing tab for the per-result charge, any run-start fee and any additional platform charges.

`maxItems` limits the number of output rows, not the total run cost. Configure your Apify spending limit as well. Videos that produce no output row incur no result charge; a run can still incur other charges, including when YouTube blocks it.

### Inputs

- `videos`: watch, youtu.be, Shorts or live URLs, or bare video IDs.
- `searchQueries`: one or more YouTube searches.
- `searchSort`: `relevance`, `date`, `views` or `rating`. Default: `relevance`.
- `channels`: channel URLs, @handles or channel IDs. Reads the Videos tab in the order YouTube returns it.
- `maxItems`: total output-row limit. Default: 50.
- `maxPerSource`: video-candidate limit for each search or channel. Defaults to `maxItems`. Skipped or duplicate candidates can leave fewer output rows.
- `proxyConfiguration`: proxy settings. The input schema enables Apify Proxy by default; check availability and charges for your account.

Provide at least one video, query or channel. An unrecognized video entry, unrecognized channel entry or invalid search sort stops the run before any video is fetched. Playlist URLs are not supported inputs. The Actor processes direct videos first, then searches, then channels. It emits each video ID at most once per run.

#### First run

Paste a public video URL into `videos`, set `maxItems` to 1 and start the Actor. Inspect the row in the dataset before increasing your limit or adding searches and channels.

### Output fields

| Fields | What they contain |
|---|---|
| `videoId`, `url` | Video ID and watch URL |
| `title`, `description` | Public video title and description |
| `channelName`, `channelId`, `channelUrl` | Publishing channel details |
| `viewCount`, `likeCount` | Counts extracted from YouTube's page data; see the qualification below |
| `durationSeconds` | Duration in seconds |
| `publishDate`, `uploadDate` | Date values supplied by YouTube |
| `category`, `keywords` | Category and uploader tags |
| `isLive` | YouTube's live-content flag; not a guarantee the video is live now |
| `isShortsEligible`, `isFamilySafe` | Flags supplied by YouTube |
| `thumbnailUrl` | Last thumbnail URL in YouTube's thumbnail list |
| `playability` | YouTube's playability status |
| `source` | The direct-video, search or channel input that first produced the row |

Missing values can be null or empty. Hidden or absent likes do not mean zero. When no microformat like count exists, `likeCount` uses YouTube's `likeCountIfLikedNumber` value; its equivalence to the displayed total has not been verified. Dates, counts and availability reflect what YouTube exposes to the logged-out session.

### Scope and limitations

- Metadata only: no video, audio, captions, transcripts or comments.
- No subscriber lists, viewer data or personal-profile collection. Rows include the publishing channel's public identifiers.
- A watch page without video details produces no row. Private, removed or restricted videos may be unavailable; inspect `playability` on any returned row.
- Search ranking, channel availability and YouTube page changes can affect the results. A result cap does not promise that many rows.
- Solum Data is independent and is not affiliated with YouTube or Google.

Start with a small input. If a supported input fails, report it through this Actor's Issues tab with the run link and input, without credentials.

# Actor input Schema

## `videos` (type: `array`):

Watch, youtu.be, Shorts, or live URLs, or bare 11-character IDs.

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

Each query returns videos from YouTube search, in the order YouTube ranks them.

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

How YouTube orders search results.

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

A channel URL, an @handle, or a UC... channel ID. Returns its uploads from the Videos tab, in the order YouTube lists them.

## `maxPerSource` (type: `integer`):

Cap for each search query and each channel. Leave empty to use Max videos.

## `maxItems` (type: `integer`):

Stop after this many videos in total. You pay per video.

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

Apify Proxy rotates sessions if YouTube rate-limits a run.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "searchSort": "relevance",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Every row of the run, as JSON.

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

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

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

```

## MCP server setup

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

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/30C5fbadkkAL5a1So/builds/3s469MaSAY9lH5jBD/openapi.json
