# YouTube Channel, Video & Comment Export - Official API (`digivibetech/youtube-data-api-export`) Actor

Export YouTube channel info, channel or playlist videos, video details and (opt-in) comments through the official YouTube Data API v3 with your own free API key. Quota-aware: stops before your daily units run out. Comments without author names or ids. $0.0008 per item plus $0.01 per run.

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

## Pricing

from $0.80 / 1,000 item exporteds

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 Channel, Video & Comment Export - Official API

**YouTube Channel, Video & Comment Export** — export YouTube channel info, channel or playlist videos, video details and (opt-in) comments through the official YouTube Data API v3 with your own free API key.

> **Try it free:** press **Start** — the prefilled input runs a small real job (a few items). Apify's free plan includes monthly platform credit, so a first test costs you nothing. You can also set a maximum cost per run.

- **What you get:** `itemType`, `title`, `text`, `publishedAt`, `channelTitle`, `url`
- **Who it's for:** marketers, creators and researchers
- **Price:** $0.0008 per item exported plus $0.01 per run ($0.80 per 1,000 items, plus the per-run start fee). Failed inputs free
- **Data source:** Uses the official YouTube Data API v3 with your own free API key; comment author names and ids are not returned.

### What is YouTube Channel, Video & Comment Export?

Export **YouTube channel info, channel uploads, playlist videos, video details and (opt-in) comments** to JSON, CSV or Excel through the **official YouTube Data API v3**, using **your own free Google API key**. One clean row per channel, video or comment, with stable columns, a quota counter that stops before your units run out, and **no comment-author data**.

### ✅ Why this one

- **Official API, your own key:** data comes from Google's documented Data API (`channels`, `playlistItems`, `videos`, `commentThreads`, `comments`), not from scraped pages. No proxy, no login, no anti-bot workaround.
- **Quota-aware:** every call this actor makes costs **1 quota unit** (up to 50 channels or videos, or 100 comments per call). It counts units as it goes and stops **before** the run's budget (`quotaBudgetUnits`, default 2,000 of the 10,000 a default key gets per day). The 100-unit search call is never used.
- **Comments are off by default, and never include the author:** comment rows hold text, likes, dates and reply counts only. Author name, author channel id/URL and profile picture are dropped before saving.
- **Your key stays private:** a secret input, sent only to `www.googleapis.com` in the `X-Goog-Api-Key` header, never written to the dataset, logs or run summary.
- **Price context:** the three most-used comparable YouTube video, channel and comment actors in the Apify Store charged about **$1.30–$4.00 per 1,000 results** at their free-plan price (checked 10 Nov 2026; some give lower prices on paid Apify plans). This one costs $0.80 per 1,000 items plus $0.01 per run and uses the official YouTube Data API v3 with your own key, so it stays within your Google quota.
- **Pay per item, plus $0.01 per run:** failed inputs, not-found ids, quota stops and a rejected key are not charged as items. A wrong key or an API that is not enabled fails the run before any item is charged.

### Modes

| Mode | Input | One row per | Quota units |
|---|---|---|---|
| Channel info | `channels` (UC... id, @handle, channel URL) | channel | 1 per 50 ids, 1 per handle |
| Channel videos | `channels` | video (newest uploads first) | 1 per channel + 1 per 50 videos (list) + 1 per 50 videos (details) |
| Playlist videos | `playlists` (PL... id or URL) | video | 1 per 50 videos (list) + 1 per 50 videos (details) |
| Video details | `videos` (id, watch / youtu.be / shorts / live URL) | video | 1 per 50 videos |
| Comments (needs `allowComments: true`) | `videos` | top-level comment (+ replies if `includeReplies`) | 1 per 100 comments |

With the default 10,000 units a day, that is up to about 250,000 videos with full stats, or about 1,000,000 comments, per key per day.

### ⬇️ What data you get

Every row has every column (`null` where it does not apply), so Console tables and CSV exports never have missing cells. Views: **All items**, **Channels**, **Videos**, **Comments**.

| Field | Meaning |
|---|---|
| `itemType`, `id`, `url`, `title`, `text`, `publishedAt` | Shared columns (`text` = description or comment text) |
| `channelId`, `channelTitle`, `channelHandle`, `channelCountry`, `subscriberCount` (+ `subscriberCountText`), `hiddenSubscriberCount`, `channelVideoCount`, `channelViewCount`, `uploadsPlaylistId`, `thumbnailUrl` | Channel rows (and the channel of each video) |
| `videoId`, `playlistId`, `playlistPosition`, `durationIso`, `durationSeconds`, `definition`, `hasCaptions`, `licensedContent`, `liveBroadcastContent`, `madeForKids`, `categoryId`, `tags`, `defaultLanguage`, `defaultAudioLanguage`, `viewCount`, `likeCount`, `commentCount` | Video rows. `likeCount` / `commentCount` are `null` when YouTube does not report them (likes hidden, comments turned off); the views show the text twins `likeCountText` / `commentCountText`, which are then empty |
| `commentId`, `parentCommentId`, `isReply`, `commentLikeCount`, `totalReplyCount`, `commentUpdatedAt` | Comment rows |
| `sourceInput`, `fetchedAt`, `isSample` | Which input produced the row, and when |

Run summary with quota units used per endpoint (`SUMMARY`) and every skipped input or stop reason (`ERRORS`, never charged) are in the key-value store.

### 🎯 Use cases

- Export a channel's or playlist's videos with stats
- Get video details in bulk
- Collect opt-in comments without author data for sentiment analysis

### ▶️ How to use

1. Open the actor; the input is prefilled with a small real example.
2. Replace it with your own input and set `maxItems` to control the cost.
3. Press **Start**. Results appear in the **Output** tab (Overview view).
4. Download JSON, CSV or Excel, call the results via API, or schedule the actor.

#### Try it first (free)

- **Run with no key:** the actor validates your input and returns **3 illustrative sample rows** for the mode you picked (`isSample: true`, fictional channel, not live data). Nothing is charged.
- **First real run:** the default `maxItems` is 20, which costs **$0.026** (20 × $0.0008 + $0.01 start). You can also set `maxChargeUsd` or Apify's own max cost per run.

#### Real runs (22 Nov 2026, build 1.1.1)

![Results table from a real YouTube Data API export on 22 Nov 2026](https://api.apify.com/v2/key-value-stores/8dx7mDMr71NbvtKdp/records/youtube-data-api-export-11-std-02-results-table.png)

![One result item from the same real export](https://api.apify.com/v2/key-value-stores/8dx7mDMr71NbvtKdp/records/youtube-data-api-export-11-std-03-result-item.png)

![Input form for the same real run, API key masked](https://api.apify.com/v2/key-value-stores/8dx7mDMr71NbvtKdp/records/youtube-data-api-export-11-std-01-input.png)

![Run cost for the same real export](https://api.apify.com/v2/key-value-stores/8dx7mDMr71NbvtKdp/records/youtube-data-api-export-11-std-04-run-cost.png)

**Channel videos**, run `PykhnchVR9SUvDWWV`: input `{"mode": "channelVideos", "channels": ["@YouTube", "https://www.youtube.com/@Google"], "maxVideosPerChannel": 8, "maxItems": 16}`. 16 videos exported in 4.6 s using **6 quota units**. At the current price that is 16 × $0.0008 = **$0.0128** plus the $0.01 start (this run was charged at the earlier per-item price). First rows:

| Channel | Video | Published | Seconds | Views | Likes | Comments |
|---|---|---|---|---|---|---|
| YouTube | Oprah said add to cart, so of course, we listened! 🎁 | 2026-11-21 | 28 | 30504 | 172 | 131 |
| YouTube | red carpet odds were in our favor 🤩 happy premiere day to th | 2026-11-20 | 59 | 30005 | 273 | 165 |
| YouTube | and the crowd goes wild! @VanossGaming had a  🚌and a dream. | 2026-11-20 | 24 | 40189 | 597 | 181 |
| YouTube | guess who walked through HQ? @BoyThrob!! check out their new | 2026-11-20 | 21 | 68829 | 474 | 70 |
| YouTube | some memories are just too good not to smile at 🌸 | 2026-11-18 | 75 | 236976 | 9742 | 329 |
| YouTube | one unforgettable year, now yours to watch 🌸 | 2026-11-18 | 90 | 268074 | 27084 | 593 |

**Comments** (opt-in), run `k01YAGYdmNAF2UE4s`: 5 top-level comments on one public video, **1 quota unit**; at the current price 5 × $0.0008 = $0.004 plus the $0.01 start (this run was charged at the earlier per-item price). One row; there is no author field to show:

```json
{"itemType": "comment", "id": "UgzKJy60hYaU8e1OAJR4AaABAg", "videoId": "az-aKc_p9oc", "text": "Justice for those who don't have premium 😭", "publishedAt": "2026-11-21T06:09:50Z", "commentLikeCount": 52, "totalReplyCount": 3, "isReply": false, "parentCommentId": ""}
```

Cost at the current prices: 200 videos = **$0.17** (200 × $0.0008 + $0.01 start; about 9 quota units).

### ⚙️ Input

#### Example input

```json
{
  "channels": [
    "@YouTube"
  ],
  "maxItems": 20
}
```

### ⬆️ Output

Each dataset row is one channel, video or comment (`itemType`). A real video row from run `PykhnchVR9SUvDWWV` (22 Nov 2026), shortened to the main fields:

```json
{
  "itemType": "video",
  "id": "QwhynRkyiYQ",
  "url": "https://www.youtube.com/watch?v=QwhynRkyiYQ",
  "title": "Oprah said add to cart, so of course, we listened! 🎁",
  "publishedAt": "2026-11-21T20:00:40Z",
  "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
  "channelTitle": "YouTube",
  "durationSeconds": 28,
  "definition": "hd",
  "viewCount": 30504,
  "likeCount": 172,
  "commentCount": 131,
  "sourceInput": "@YouTube",
  "fetchedAt": "2026-11-22T15:46:33.782878+00:00",
  "isSample": false
}
```

### 💵 Pricing and cost estimate

Pay per event: $0.0008 per item exported plus $0.01 per run ($0.80 per 1,000 items). Sample rows, failed inputs, not-found ids and stopped runs are not charged as items. Apify platform usage is included.

### 🔌 Integrations and API

Run it from **n8n, Make, Zapier, Clay** or any tool that can call an HTTP endpoint, connect a **webhook** to get notified when a run finishes, or let AI agents call it through the **Apify MCP server** (`mcp.apify.com`).

Run it and get the results in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/digivibetech~youtube-data-api-export/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"channels": ["@YouTube"], "maxItems": 20}'
```

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("digivibetech/youtube-data-api-export").call(run_input={"channels": ["@YouTube"], "maxItems": 20})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### Get a free API key (about 5 minutes)

1. Open [console.cloud.google.com](https://console.cloud.google.com), create (or pick) a project.
2. **APIs & Services → Library →** enable **YouTube Data API v3**.
3. **APIs & Services → Credentials → Create credentials → API key.** If you restrict it, restrict it to the YouTube Data API v3 (an HTTP-referrer or IP restriction blocks Apify's servers).
4. Paste the key into `apiKey`.

### ⚠️ Limits

- **Comment export is off by default.** You must set `allowComments: true`. Comment rows never contain the author's name, channel id, channel URL or profile picture. Comment text itself is written by people; handle it under the data-protection law that applies to you.
- **No keyword search.** Search costs 100 units per call, so this actor works from channel, playlist and video ids/URLs only. Custom `/c/` URLs need search and are not supported: use the `@handle` or `/channel/UC...` URL.
- **What the API shows is what you get:** subscriber counts are rounded by YouTube and hidden when the channel hides them; dislike counts are not public; held-for-review and hidden comments are not returned; private and deleted videos are reported as not found.
- **Quota is per Google Cloud project** and resets at midnight Pacific Time. When Google reports the daily quota as used up, the run stops and keeps what it already exported.
- **No video, audio or caption download.** Metadata, statistics and comment text only.
- **Real-run screenshots are not in this README yet.** A real private run exists (10 Nov 2026, build 1.0.2, channel videos mode); its Console screenshots are still to be taken.

### 🛡️ Data source, privacy and legality

Uses the official YouTube Data API v3 with your own free API key; comment author names and ids are not returned.

#### Responsible use

Use the export within YouTube's API Services Terms and Developer Policies, and the data-protection law that applies to you. This actor collects only public metadata through the official API and leaves out comment-author identity by design.

Built by DigiVibeTech with AI assistance; tested against fixtures in the documented API response shape and a local Apify pay-per-event test run. Questions or a field you need: [digivibetech.com/support](https://digivibetech.com/support).

### ❓ FAQ

#### How much does YouTube Channel, Video & Comment Export cost?

The pay-per-event price will be published before the actor goes public.

#### Can I try it for free?

Yes. Press Start with the prefilled input: it runs a small real job (a few items). Apify's free plan includes monthly platform credit, which covers a first test.

#### Is it legal to use YouTube Channel, Video & Comment Export?

Uses the official YouTube Data API v3 with your own free API key; comment author names and ids are not returned. Use the results lawfully (terms of the source, GDPR where it applies). This is not legal advice.

#### Can I use it through the API or an MCP server?

Yes. Every run is available through the Apify API and the official client libraries, and AI agents can call the actor through the Apify MCP server. See Integrations and API above.

#### Something does not work. Where do I get help?

Open an issue on the Issues tab or use [digivibetech.com/support](https://digivibetech.com/support/). Include the run ID so we can reproduce it.

### 📝 Changelog

#### 1.1 (22 Nov 2026)

- Verified end to end with a real key (runs `PykhnchVR9SUvDWWV`, `k01YAGYdmNAF2UE4s`); README shows those runs instead of sample rows. Price shown in the listing.

#### 20 Nov 2026 — listing refresh

- README, listing text and input form restructured to the DigiVibeTech Apify quality standard v1. No feature or price change.

#### 1.0 — builds 1.0.1 to 1.0.3

- First build 2026-11-10, latest build 2026-11-10 (3 successful builds).

### 🧩 More DigiVibeTech actors

- [Website SEO & AI Search Audit (GEO/AEO)](https://apify.com/digivibetech/ai-search-citation-readiness)
- [Audio & Video Transcription - Speech to Text, Whisper, SRT](https://apify.com/digivibetech/audio-video-transcriber)
- [Broken Link & Image Checker - Sitemap or Crawl](https://apify.com/digivibetech/broken-link-image-checker)
- [Bulk Image Converter & Compressor - WebP, AVIF, JPEG, PNG](https://apify.com/digivibetech/bulk-image-converter-compressor)

*Maintained by DigiVibeTech. Questions or bugs: use the Issues tab or [digivibetech.com/support](https://digivibetech.com/support/); we reply within 2–5 business days.*

# Changelog

This Actor's version history is a separate document: https://apify.com/digivibetech/youtube-data-api-export/changelog.md

# Actor input Schema

## `apiKey` (type: `string`):

Your own Google API key with 'YouTube Data API v3' enabled (Google Cloud Console -> APIs & Services -> Credentials). Stored encrypted by Apify, sent only to www.googleapis.com in the X-Goog-Api-Key header, never logged. Leave empty to get 3 free illustrative sample rows.

## `mode` (type: `string`):

Each item exported (channel, video or comment) is one 'item-exported' event.

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

Channel ids (UC...), @handles or channel URLs (/channel/UC..., /@handle, /user/name). Used by 'Channel info' and 'Channel videos'. Custom /c/ URLs are not supported (they need a 100-unit search call).

## `playlists` (type: `array`):

Playlist ids (PL...) or playlist URLs. Used by 'Playlist videos'.

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

Video ids or URLs (watch, youtu.be, shorts, live, embed). Used by 'Video details' and 'Comments'.

## `allowComments` (type: `boolean`):

Comment export is off by default. Turn on to use the Comments mode. Comment rows contain text, likes, dates and reply counts only: never the author's name, channel id, channel URL or profile image.

## `publishedAfter` (type: `string`):

Channel/playlist modes: skip older videos (YYYY-MM-DD). Optional.

## `commentOrder` (type: `string`):

Order of top-level comments.

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

Safety cap on exported items (channels, videos or comments). The small default keeps a first test run to about one cent.

## `maxVideosPerChannel` (type: `integer`):

Newest uploads first for channels; playlist order for playlists.

## `maxCommentsPerVideo` (type: `integer`):

Comments mode: top-level comments (and replies, if on) per video.

## `quotaBudgetUnits` (type: `integer`):

The run stops before it would use more YouTube Data API units than this. A default key has 10,000 units per day; every call this actor makes costs 1 unit (up to 50 channels/videos or 100 comments). Search (100 units) is never used.

## `maxChargeUsd` (type: `number`):

Extra cap on top of Apify's own max cost per run.

## `includeReplies` (type: `boolean`):

Comments mode: also export replies (one extra quota unit per 100 replies). Same no-author rule.

## Actor input object example

```json
{
  "mode": "channelInfo",
  "channels": [
    "@YouTube"
  ],
  "allowComments": false,
  "commentOrder": "relevance",
  "maxItems": 20,
  "maxVideosPerChannel": 50,
  "maxCommentsPerVideo": 100,
  "quotaBudgetUnits": 2000,
  "includeReplies": false
}
```

# Actor output Schema

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

All result items (overview view)

## `channels` (type: `string`):

Channel rows

## `videos` (type: `string`):

Video rows

## `comments` (type: `string`):

Comment rows (no author data)

## `errors` (type: `string`):

Inputs that could not be processed, with the reason

## `summary` (type: `string`):

Counts of processed, billed and failed items

# 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 = {
    "channels": [
        "@YouTube"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("digivibetech/youtube-data-api-export").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 = {
    "channels": ["@YouTube"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("digivibetech/youtube-data-api-export").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 '{
  "channels": [
    "@YouTube"
  ],
  "maxItems": 20
}' |
apify call digivibetech/youtube-data-api-export --silent --output-dataset

```

## MCP server setup

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

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/xdGiFag4KR0Lny3sJ/builds/LXkbC42SEKHmadl6t/openapi.json
