# YouTube Video Details: metadata, tags, category, duration (`steadydata/youtube-video-details`) Actor

Full metadata for up to 500 YouTube videos per run: title, description, view count, duration, publish date, category, tags, channel and thumbnail. Paste URLs, short links, shorts or bare video ids. Only delivered videos are charged.

- **URL**: https://apify.com/steadydata/youtube-video-details.md
- **Developed by:** [Steadydata Team](https://apify.com/steadydata) (community)
- **Categories:** Videos, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.40 / 1,000 video delivereds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## YouTube Video Details Scraper (bulk, lightweight)

Full metadata for up to **500 YouTube videos in one run**: title, description, view
count, duration, publish date, category, tags, channel and thumbnail. Paste watch URLs,
short links, shorts, embeds or bare video ids. **You only pay for videos that are
actually delivered.**

### Why this scraper

- **Built on a lightweight route.** The same question answered through YouTube's own
  internal API costs about 10 KB per video here, where the obvious route needs 252 KB.
  That is where the low price comes from, and why a 500 video run finishes in a minute.
- **Only delivered videos are charged.** Deleted videos, private videos and temporary
  blocks come back as clear error records at no cost.
- **Metadata survives playback restrictions.** A video that will not play in a given
  country still has a title, a view count and a publish date, and this actor returns
  them instead of writing the whole row off.
- **Agent-ready output.** One flat row per video with a stable schema and explicit
  error codes, so it drops straight into a pipeline or an LLM tool.
- **Every input format works.** `dQw4w9WgXcQ`, a watch URL with timestamps,
  `youtu.be/...`, `/shorts/...`, `/embed/...` or `/live/...`.

### Who this is for

Content and competitor researchers who need the numbers behind a list of videos, teams
enriching their own video catalogue, and anyone feeding video metadata into an AI
pipeline. It pairs naturally with the channel and transcript scrapers from the same
publisher: list a channel's videos, pull their details, then fetch the transcripts.

### Who this is not for

If you need one video's view count once, the YouTube page is faster and free. This
actor earns its place from roughly the tenth video onwards, and from the moment you
need the data in a table instead of on a screen.

It returns public video and channel metadata only. No comments, no commenter names, no
personal data.

### Input example

```json
{
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://youtu.be/JGwWNGJdvx8",
        "Od6M0AXpcxQ"
    ],
    "language": "en",
    "country": "US"
}
```

### Output example

```json
{
    "videoId": "dQw4w9WgXcQ",
    "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "title": "Rick Astley - Never Gonna Give You Up",
    "description": "The official video for ...",
    "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "channelName": "Rick Astley",
    "channelUrl": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
    "viewCount": 1814441286,
    "durationSeconds": 213,
    "publishDate": "2009-10-24T00:00:00-07:00",
    "uploadDate": "2009-10-25T00:00:00-07:00",
    "category": "Music",
    "tags": ["rick astley", "never gonna give you up"],
    "isLiveContent": false,
    "isFamilySafe": true,
    "thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
    "availability": "OK",
    "status": "ok"
}
```

A video that cannot be delivered produces an error record instead, and is **not**
charged:

```json
{
    "input": "aaaaaaaaaaa",
    "status": "error",
    "errorCode": "VIDEO_UNAVAILABLE",
    "error": "Video aaaaaaaaaaa is unavailable (ERROR)"
}
```

Error codes: `INVALID_VIDEO_ID`, `VIDEO_UNAVAILABLE`, `BLOCKED`. `INPUT_TRUNCATED` appears once when your input is longer than this actor accepts.

### Related actors from steadydata

- [youtube-transcript-bulk](https://apify.com/steadydata/youtube-transcript-bulk): the spoken text of the same videos
- [youtube-comments](https://apify.com/steadydata/youtube-comments): the comments, without author names
- [youtube-channel-videos](https://apify.com/steadydata/youtube-channel-videos): every video of a channel, as input for this actor

### Pricing

Pay per event: one `video-fetched` event per delivered video. No charge for videos that
fail, no charge for deleted or private videos, no separate platform-usage surcharge.

### FAQ

**Does it work for Shorts and live streams?**
Yes. Shorts are ordinary videos with a different URL, and past live streams return
their metadata like any other video. `isLiveContent` tells you which is which.

**Why are there two dates?**
`publishDate` is when the video went public and `uploadDate` is when it was uploaded.
For most videos they match; for premieres and re-published videos they do not.

**Do I get the full description?**
Yes, the complete description text as YouTube stores it, not a truncated preview.

**Is personal data collected?**
No. Public video and channel metadata only.

**What happens when YouTube changes something?**
Internal routes shift from time to time; that is the nature of this work. The
difference here is the response: the actor is monitored daily and fixed fast, and while
it is broken you are not charged, because only delivered videos cost anything.

# Actor input Schema

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

Video URLs or ids, up to 500 per run. Watch URLs, youtu.be links, shorts, embeds and bare 11-character ids all work.

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

Interface language for the texts YouTube returns, e.g. en, nl, de.

## `country` (type: `string`):

ISO country code used for the request, e.g. US, NL, DE. Some videos are region restricted.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "JGwWNGJdvx8"
  ],
  "language": "en",
  "country": "US"
}
```

# Actor output Schema

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

No description

# 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",
        "JGwWNGJdvx8"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadydata/youtube-video-details").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",
        "JGwWNGJdvx8",
    ] }

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

```

## MCP server setup

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

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/0bcWKaeCd2SjVcJ0a/builds/adUJPnev8FxGuibPL/openapi.json
