# YouTube Video Tags Scraper (`automation-lab/youtube-video-tags-extractor`) Actor

Extract creator-assigned YouTube video tags with titles, channels, publication dates, canonical URLs, and retrieval provenance from supplied public URLs or IDs.

- **URL**: https://apify.com/automation-lab/youtube-video-tags-extractor.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** SEO tools, Social media, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.72 / 1,000 item extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

Extract **YouTube video tags** that creators assigned to public videos. Supply watch URLs, Shorts URLs, youtu.be links, embed/live URLs, or 11-character video IDs and receive one normalized record per video with tags, title, channel, publication date, canonical URL, and retrieval provenance.

This Actor is built for repeatable SEO research and catalog enrichment. It does not generate suggested tags or infer keywords from titles: `tags` contains only the creator-assigned values YouTube exposes publicly.

### What can YouTube Video Tags Scraper do?

- Resolve mixed YouTube URL formats and bare IDs.
- Extract the full public creator-assigned tag array.
- Normalize identity and channel fields for joins and exports.
- Deduplicate repeated video IDs within a run.
- Preserve the source URL, retrieval method, and timestamp.
- Process up to 1,000 supplied videos per run.

### Who is it for?

SEO researchers can compare how channels describe similar videos. Content teams can enrich an internal catalog before classification. Agencies can audit a supplied competitor set. Data engineers can schedule the same stable input and send normalized rows to a spreadsheet, warehouse, or webhook.

### Why use this Actor?

Browser tag-finder tools are awkward for batches and recurring work. This Actor accepts a list, produces typed dataset rows, and works through the Apify API, schedules, webhooks, integrations, and MCP. It retrieves lightweight structured data from public watch pages without downloading video media.

### What data is extracted?

| Field | Meaning |
| --- | --- |
| `input` | Original supplied URL or ID |
| `videoId` | Normalized YouTube video ID |
| `title` | Current public title |
| `tags` | Unique creator-assigned tags; empty if none were assigned |
| `tagCount` | Number of returned tags |
| `channelId`, `channelName`, `channelUrl` | Public channel identity |
| `publishedAt` | Publication date when exposed |
| `canonicalUrl` | Normalized watch URL |
| `sourceUrl` | Exact retrieved public page |
| `retrievalMethod`, `retrievedAt` | Retrieval provenance |

### How to extract YouTube video tags

1. Open the Actor input page.
2. Paste one or more public YouTube URLs or video IDs into **YouTube video URLs or IDs**.
3. Optionally lower **Maximum videos** for a small sample.
4. Click **Start**.
5. Open the Dataset tab and export JSON, CSV, Excel, XML, or another supported format.

### Input parameters

#### `videoInputs`

Required array of 1–1,000 strings. Supported forms include `https://www.youtube.com/watch?v=...`, `https://youtu.be/...`, Shorts/live/embed URLs, and bare 11-character IDs. Invalid values are rejected before retrieval.

#### `maxItems`

Maximum unique videos to process, from 1 to 1,000. The default is 100. Duplicate URLs that resolve to the same ID count once.

### Example input

```json
{
  "videoInputs": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "M7lc1UVf-VE"
  ],
  "maxItems": 2
}
```

### Example output

```json
{
  "input": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "videoId": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "tags": ["rick astley", "Never Gonna Give You Up", "official music video"],
  "tagCount": 3,
  "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "channelName": "Rick Astley",
  "channelUrl": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
  "publishedAt": "2009-10-25",
  "canonicalUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "sourceUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&hl=en&gl=US",
  "retrievalMethod": "youtube-watch-embedded-player-response",
  "retrievedAt": "2026-08-29T12:30:00.000Z"
}
```

The complete `tags` array is returned; this shortened example shows only three values.

### How much does it cost to extract YouTube video tags?

Pay-per-event pricing includes a **$0.006 start fee** plus the active tier price for each successfully extracted video record. At the BRONZE tier, a record costs **$0.001192**: 10 videos cost about **$0.01792**, 100 cost about **$0.1252**, and 1,000 cost about **$1.198**. Higher usage tiers automatically lower the per-record price. Failed or invalid videos do not incur the item event.

Apify platform compute is included through event pricing. Check the Actor pricing tab for the tier applicable to your account.

### Reliability, retries, and failure behavior

The Actor retries network errors, rate limits, and temporary server errors with bounded backoff. It does not repeatedly retry malformed input or unavailable videos. One unavailable video does not discard successful rows from other inputs. If every supplied video fails, the run fails visibly instead of returning a misleading empty success.

### Limits and tips

- Only public, anonymously accessible videos are supported.
- Private, deleted, age/account-gated, or region-restricted videos may not expose metadata.
- Some creators assign no tags; those valid rows contain `tags: []` and `tagCount: 0`.
- Tags can change when a creator edits metadata. Use schedules and compare datasets when monitoring changes.
- The Actor does not download media, captions, comments, or thumbnails.

### Export and automation workflows

Export the default dataset directly to CSV or Excel for tag comparison. Use an Apify schedule for recurring catalog checks, then trigger a webhook or integration after each run. In a data pipeline, join records on `videoId`; compare `tags` between observations using `retrievedAt` as provenance.

### Run with the Apify API using cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~youtube-video-tags-extractor/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoInputs":["dQw4w9WgXcQ"],"maxItems":1}'
```

Never commit your Apify token. Retrieve the completed run's default dataset through the run response links or Apify Console.

### Run with JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/youtube-video-tags-extractor').call({
  videoInputs: ['dQw4w9WgXcQ', 'M7lc1UVf-VE'],
  maxItems: 2,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Run with Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/youtube-video-tags-extractor').call(
    run_input={'videoInputs': ['dQw4w9WgXcQ'], 'maxItems': 1}
)
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### Use with MCP and AI agents

Add the Actor to Claude Code:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/youtube-video-tags-extractor"
```

**Claude Desktop**, **Cursor**, and **VS Code** can each use this HTTP MCP server configuration in their MCP settings:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/youtube-video-tags-extractor"
    }
  }
}
```

Example prompts:

- “Extract creator-assigned tags from these five YouTube URLs and group shared tags.”
- “Normalize this list of video IDs, then return title, channel, publication date, and tags as a table.”

### Legality and responsible use

Use only public data for legitimate research, analysis, and catalog management. Follow YouTube's terms, applicable law, privacy obligations, and intellectual-property rules. Do not use the output for spam, harassment, deceptive ranking manipulation, or attempts to identify private information. You are responsible for the inputs and downstream use.

### Troubleshooting and FAQ

#### Why is the tags array empty?

The creator may not have assigned tags. The Actor intentionally does not invent tags from the title or description.

#### Why did one video not produce a row?

The video may be private, deleted, account-gated, region-restricted, temporarily unavailable, or malformed. Review the run log for the specific video ID. Other public inputs continue.

#### Does this find popular or suggested tags?

No. It extracts tags assigned to supplied videos. It does not perform YouTube search or keyword-volume estimation.

#### Can I monitor tag changes?

Yes. Schedule the same input and compare output datasets by `videoId`. Each row contains `retrievedAt`; change detection is performed by your workflow or downstream integration.

### Related automation-lab Actors

- [YouTube Channel Videos Scraper](https://apify.com/automation-lab/youtube-channel-videos-scraper) discovers public videos from supplied channels before a tag-enrichment run.
- [YouTube Thumbnail Downloader](https://apify.com/automation-lab/youtube-thumbnail-downloader) stores public thumbnail assets for authorized catalog workflows.
- [YouTube Transcript Scraper](https://apify.com/automation-lab/youtube-transcript) extracts available transcript text when the buyer job requires spoken content rather than creator-assigned tags.

# Actor input Schema

## `videoInputs` (type: `array`):

Public YouTube watch, Shorts, live, embed, or youtu.be URLs, or 11-character video IDs. Up to 1,000 entries.

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

Maximum number of unique supplied videos to process.

## Actor input object example

```json
{
  "videoInputs": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "M7lc1UVf-VE"
  ],
  "maxItems": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

Open the overview view of the default dataset containing extracted video tag records.

# 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 = {
    "videoInputs": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "M7lc1UVf-VE"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/youtube-video-tags-extractor").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 = {
    "videoInputs": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "M7lc1UVf-VE",
    ],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/youtube-video-tags-extractor").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 '{
  "videoInputs": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "M7lc1UVf-VE"
  ],
  "maxItems": 10
}' |
apify call automation-lab/youtube-video-tags-extractor --silent --output-dataset

```

## MCP server setup

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

```

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/fS3Bo2hk4lnL0i4ym/builds/nMOvtnbg19JQ8Gl8t/openapi.json
