# YouTube Research & Transcript Scraper (`lentic_clockss/youtube-research-scraper`) Actor

Search YouTube, export channel and video data, and pull transcripts for shortlisted videos. No API key, no browser. Fast HTTP-only research workflow.

- **URL**: https://apify.com/lentic\_clockss/youtube-research-scraper.md
- **Developed by:** [kane liu](https://apify.com/lentic_clockss) (community)
- **Categories:** Social media, Videos, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 base video rows

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Research & Transcript Scraper

Search YouTube, export channel and video data, and pull transcripts for shortlisted videos without managing the YouTube Data API.

This actor is built for a shortlist-first workflow:

- discover videos by keyword
- snapshot one or more channels
- enrich a shortlisted set with publish date, category, and fuller metadata
- pull transcripts only for the videos you actually need

That makes it a better fit for research, content analysis, LLM ingestion, and competitor monitoring than a one-price-fits-all commodity scraper.

### What you can do with it

#### 1. Build a research shortlist from search

Use `searchQueries` when you want to map a topic quickly and export a clean table of candidate videos.

```json
{
  "searchQueries": ["ai workflow automation"],
  "maxResults": 50
}
````

Typical output fields:

- `videoId`
- `title`
- `url`
- `channelName`
- `channelId`
- `viewCount`
- `duration`
- `publishedText`
- `description`
- `thumbnailUrl`
- `source`

This is the lightest tier and the best first pass when you are still exploring.

#### 2. Snapshot one or more channels

Use `channelUrls` to export the latest videos from a creator, company, competitor, or media outlet.

```json
{
  "channelUrls": ["https://www.youtube.com/@freecodecamp"],
  "maxResults": 100
}
```

This is useful for:

- competitor channel monitoring
- editorial audits
- recurring content snapshots
- identifying which videos deserve deeper enrichment

#### 3. Enrich a shortlisted set with stronger metadata

Turn on `scrapeDetails` when you need a more research-ready record for each item.

```json
{
  "searchQueries": ["legal ai"],
  "maxResults": 20,
  "scrapeDetails": true
}
```

Detail enrichment is the middle tier. It fills in fields such as:

- `publishedAt`
- `category`
- richer `description`
- refreshed `viewCount`

#### 4. Pull transcripts for selected videos

Use `videoUrls` plus `includeTranscript` when you already know which videos matter and want timestamps and full text.

```json
{
  "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
  "includeTranscript": true,
  "transcriptLanguage": "en"
}
```

Transcript rows can include:

- `transcript`
- `transcriptLanguage`
- `transcriptText`
- `enrichmentLevel`

The actor only adds the transcript tier when transcript segments are actually returned.

### Input fields

You can run the actor with any combination of these inputs:

| Field | Type | What it does |
| --- | --- | --- |
| `searchQueries` | array | Search YouTube by keyword for discovery and shortlist building |
| `channelUrls` | array | Export videos from one or more channels |
| `videoUrls` | array | Target specific videos directly |
| `maxResults` | integer | Caps search and channel result volume |
| `scrapeDetails` | boolean | Adds richer metadata for each row |
| `includeTranscript` | boolean | Attempts transcript extraction |
| `transcriptLanguage` | string | Preferred transcript language, with fallback if unavailable |

### Output contract

Every row includes the core video record, plus two fields that make downstream handling easier:

- `recordVersion` — current output contract version
- `enrichmentLevel` — `base`, `detail`, or `transcript`

That means downstream automations can branch cleanly without guessing which tier produced the row.

### Pricing

This actor uses tiered pay-per-event pricing.

| Event | Price |
| --- | --- |
| Actor start | `$0.00005` |
| Base video row | `$0.0015` |
| Detailed video row | `$0.0025` |
| Transcript-ready row | `$0.0040` |

Two practical notes matter:

- transcript rows are priced separately because transcript extraction is materially heavier than plain metadata collection
- this actor is configured so Apify bills platform usage directly to the user, which keeps creator-side economics clean but means heavy transcript runs cost more than lightweight discovery runs

The intended workflow is:

1. run search or channel discovery cheaply
2. shortlist what you actually need
3. run detail or transcript mode only on that shortlist

That is the fastest way to keep both runtime and spend under control.

### What makes this different

This actor is not trying to hide the difference between cheap and expensive work.

Search and channel listing are lightweight.
Metadata enrichment is heavier.
Transcript extraction is the heaviest path.

Instead of pretending those modes should all be sold at one flat price, this actor exposes the tiers directly so the economics match the actual work being done.

### Common use cases

- competitor content tracking
- creator and channel research
- sourcing YouTube examples for sales, research, and consulting
- transcript collection for LLM or RAG pipelines
- building structured datasets for media analysis
- shortlist-first workflows where broad discovery and deep extraction should not be priced the same way

### What this actor does not promise

- transcripts for every video
- a single flat cost across discovery and transcript-heavy runs
- full parity with every endpoint in the official YouTube API

It is best when you want fast research-oriented extraction without managing API quota, and when you are willing to run heavy transcript jobs selectively instead of blindly across large batches.

### Example workflow

Start broad:

```json
{
  "searchQueries": ["warehouse automation ai"],
  "maxResults": 30
}
```

Then enrich the videos you actually care about:

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=XVv6mJpFOb0",
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "scrapeDetails": true,
  "includeTranscript": true,
  "transcriptLanguage": "en"
}
```

That split workflow is what this product is optimized for.

# Actor input Schema

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

Keywords to search on YouTube. Each query runs independently and returns up to maxResults videos. Use this for topic discovery and shortlist building before detail or transcript runs.

## `channelUrls` (type: `array`):

YouTube channel URLs to scrape all videos from. Supports @handle, /channel/ID, and /c/name formats. Example: \["https://www.youtube.com/@freecodecamp"].

## `videoUrls` (type: `array`):

Individual YouTube video URLs for targeted metadata or transcript extraction. Use with scrapeDetails or includeTranscript for full data.

## `maxResults` (type: `integer`):

Maximum number of videos to return per search query or channel. Applies to searchQueries and channelUrls. Keep this small when using scrapeDetails or includeTranscript; heavy modes are best run on a shortlisted subset. Default: 50.

## `scrapeDetails` (type: `boolean`):

Fetch richer metadata for each result, such as exact publish date, category, and fuller description. This is the middle pricing tier and is best used after an initial shortlist.

## `includeTranscript` (type: `boolean`):

Attempt transcript extraction with timestamps for each video. Supports both auto-generated and manually uploaded captions when available. This is the heaviest run mode and is best used on targeted videoUrls or a small shortlisted subset.

## `transcriptLanguage` (type: `string`):

Preferred transcript language code (e.g. "en" for English, "es" for Spanish, "ja" for Japanese). If the requested language is not available, falls back to the first available language.

## Actor input object example

```json
{
  "searchQueries": [
    "python automation",
    "machine learning beginner"
  ],
  "channelUrls": [
    "https://www.youtube.com/@freecodecamp"
  ],
  "videoUrls": [
    "https://www.youtube.com/watch?v=XVv6mJpFOb0"
  ],
  "maxResults": 50,
  "scrapeDetails": false,
  "includeTranscript": false,
  "transcriptLanguage": "en"
}
```

# Actor output Schema

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

Dataset containing all scraped YouTube rows

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("lentic_clockss/youtube-research-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("lentic_clockss/youtube-research-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call lentic_clockss/youtube-research-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lentic_clockss/youtube-research-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Research & Transcript Scraper",
        "description": "Search YouTube, export channel and video data, and pull transcripts for shortlisted videos. No API key, no browser. Fast HTTP-only research workflow.",
        "version": "0.1",
        "x-build-id": "TL0ImppVpFGHm51co"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lentic_clockss~youtube-research-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lentic_clockss-youtube-research-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/lentic_clockss~youtube-research-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lentic_clockss-youtube-research-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/lentic_clockss~youtube-research-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lentic_clockss-youtube-research-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchQueries": {
                        "title": "Search Queries",
                        "type": "array",
                        "description": "Keywords to search on YouTube. Each query runs independently and returns up to maxResults videos. Use this for topic discovery and shortlist building before detail or transcript runs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "channelUrls": {
                        "title": "Channel URLs",
                        "type": "array",
                        "description": "YouTube channel URLs to scrape all videos from. Supports @handle, /channel/ID, and /c/name formats. Example: [\"https://www.youtube.com/@freecodecamp\"].",
                        "items": {
                            "type": "string"
                        }
                    },
                    "videoUrls": {
                        "title": "Video URLs",
                        "type": "array",
                        "description": "Individual YouTube video URLs for targeted metadata or transcript extraction. Use with scrapeDetails or includeTranscript for full data.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of videos to return per search query or channel. Applies to searchQueries and channelUrls. Keep this small when using scrapeDetails or includeTranscript; heavy modes are best run on a shortlisted subset. Default: 50.",
                        "default": 50
                    },
                    "scrapeDetails": {
                        "title": "Scrape Video Details",
                        "type": "boolean",
                        "description": "Fetch richer metadata for each result, such as exact publish date, category, and fuller description. This is the middle pricing tier and is best used after an initial shortlist.",
                        "default": false
                    },
                    "includeTranscript": {
                        "title": "Include Transcript",
                        "type": "boolean",
                        "description": "Attempt transcript extraction with timestamps for each video. Supports both auto-generated and manually uploaded captions when available. This is the heaviest run mode and is best used on targeted videoUrls or a small shortlisted subset.",
                        "default": false
                    },
                    "transcriptLanguage": {
                        "title": "Transcript Language",
                        "type": "string",
                        "description": "Preferred transcript language code (e.g. \"en\" for English, \"es\" for Spanish, \"ja\" for Japanese). If the requested language is not available, falls back to the first available language.",
                        "default": "en"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
