# YouTube Transcript Scraper (`myagizm/youtube-transcript-scraper`) Actor

Extract YouTube video transcripts / subtitles as plain text. Any language, auto-captions supported. No login.

- **URL**: https://apify.com/myagizm/youtube-transcript-scraper.md
- **Developed by:** [MYM](https://apify.com/myagizm) (community)
- **Categories:** Videos
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 transcripts

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/platform/actors/running/actors-in-store#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 Transcript Scraper — scrape YouTube transcripts & subtitles (No API Key, No Login)

<p align="center">
  <a href="https://apify.com/myagizm/youtube-transcript-scraper"><img src="https://img.shields.io/badge/Apify-Actor-00b96b?logo=apify&logoColor=white" alt="Apify Actor"></a>
  <img src="https://img.shields.io/badge/No%20API%20Key-required-blue" alt="No API Key required">
  <img src="https://img.shields.io/badge/No%20Login-needed-blue" alt="No Login needed">
  <img src="https://img.shields.io/badge/Export-JSON%20%7C%20CSV%20%7C%20Excel%20%7C%20XML-orange" alt="Export formats">
  <img src="https://img.shields.io/badge/MCP-AI%20agents-8A2BE2" alt="MCP AI agents">
  <img src="https://img.shields.io/badge/Pricing-pay%20per%20result-success" alt="Pay per result">
</p>

**Scrape YouTube transcripts and subtitles** from any public video, channel, Shorts tab, or search query — no API key, no login, no cookies or account required. This YouTube Transcript Scraper turns spoken video content into clean, structured, time-stamped text you can drop straight into an LLM, a search index, a summarizer, or a spreadsheet. Get the full transcript, per-line timestamps, language, and video context for one video or thousands at once. Export scraped data to JSON, CSV, Excel, or XML, schedule runs via API, and integrate with your tools and AI workflows.

> **Get your first results free in under 2 minutes** — paste a YouTube link, click Start, and read the transcript. No configuration, no credit card to try.

***

### Table of contents

- [What can the YouTube Transcript Scraper do?](#what-can-the-youtube-transcript-scraper-do)
- [Who scrapes YouTube transcripts?](#who-scrapes-youtube-transcripts)
- [What data can I scrape from a YouTube transcript?](#what-data-can-i-scrape-from-a-youtube-transcript)
- [How to scrape YouTube transcripts](#how-to-scrape-youtube-transcripts)
- [Input example](#input-example)
- [Output example](#output-example)
- [How much will scraping YouTube transcripts cost?](#how-much-will-scraping-youtube-transcripts-cost)
- [Tips for scraping YouTube transcripts](#tips-for-scraping-youtube-transcripts)
- [Want other YouTube data?](#want-other-youtube-data)
- [Use YouTube transcript data with AI agents (MCP)](#use-youtube-transcript-data-with-ai-agents-mcp)
- [Integrations & API](#integrations--api)
- [FAQ — scraping YouTube transcripts](#faq--scraping-youtube-transcripts)
- [Disclaimer](#disclaimer)

***

### What can the YouTube Transcript Scraper do?

The YouTube Transcript Scraper extracts subtitles and transcripts from publicly available YouTube videos at scale, with zero setup. Use it to:

- 📝 **Get the full transcript** of any public YouTube video as clean, readable text.
- ⏱️ **Extract time-stamped lines** — every caption line with its start time and duration for precise navigation.
- 🌍 **Pick the caption language** — request `en`, `es`, `tr`, `de`, `fr`, or any language code the video offers.
- 🤖 **Choose auto-captions or manual subtitles** — fall back to YouTube's auto-generated captions or restrict to human-written ones.
- 📺 **Scrape a whole channel or Shorts tab** — paste a channel URL and expand it into its videos automatically.
- 🔎 **Scrape transcripts from search** — feed plain search queries and transcribe the matching videos.
- 📦 **Scrape YouTube transcripts in bulk** — process a list of many videos at once, with no limitations on the number of URLs you queue.
- 🧠 **Feed AI workflows** — pipe transcripts into summarization, translation, RAG, sentiment, or keyword extraction.
- 🗂️ **Build clean datasets** — every video becomes one consistent, structured record ready for analysis.
- 📤 **Export scraped data** to JSON, CSV, Excel, or XML, or pull it live via the API.

Go beyond the limitations of the official YouTube API: no OAuth, no quota juggling, no per-project keys — just paste links and collect publicly available transcript data.

***

### Who scrapes YouTube transcripts?

The YouTube Transcript Scraper fits any workflow that needs the *words* out of a video, fast:

- 🧑‍💻 **AI & LLM builders** — feed transcripts into RAG pipelines, summarizers, and chat-over-video assistants without writing a scraper.
- 📈 **Content & SEO teams** — mine transcripts for keywords, repurpose long videos into blog posts, and audit competitor content at scale.
- 📰 **Researchers & journalists** — turn hours of interviews, talks, and press conferences into searchable text.
- 🎓 **Educators & students** — generate study notes and translations from lectures and tutorials.
- 🏢 **Market & competitor analysts** — track what channels are saying across many videos at once for competition monitoring and market research.
- ♿ **Accessibility & localization** — export captions for subtitling, translation, and compliance workflows.

Whatever the use case — content auditing, lead generation research, sentiment analysis, or dataset building — you scrape YouTube transcripts once and reuse the structured output everywhere.

***

### What data can I scrape from a YouTube transcript?

Each processed video returns a structured record. Typical fields:

| Field | Type | Description |
|-------|------|-------------|
| `sourceUrl` | string | The YouTube URL that was processed. |
| `videoId` | string | The 11-character YouTube video ID. |
| `url` | string | Canonical watch URL for the video. |
| `title` | string | Video title. |
| `channel` | string | Channel / uploader name. |
| `channelUrl` | string | URL of the channel. |
| `language` | string | Language code of the returned captions (e.g. `en`). |
| `isAutoGenerated` | boolean | `true` if the captions are auto-generated, `false` for manual subtitles. |
| `duration` | number | Video length in seconds. |
| `transcript` | array | Ordered caption lines, each `{ text, start, duration }` (seconds). |
| `text` | string | The full transcript joined into a single plain-text block. |
| `ok` | boolean | `true` when a transcript was extracted for this URL. |

> Fields depend on what the video exposes publicly. Videos with captions disabled return a record flagged so you can filter them downstream.

***

### How to scrape YouTube transcripts

1. **Open the YouTube Transcript Scraper** on [Apify](https://apify.com/myagizm/youtube-transcript-scraper).
2. **Paste one or more YouTube URLs** into *YouTube URLs* — a video link, a channel URL, a `/shorts` tab, or a search-result URL. You can also add plain **search terms**.
3. *(Optional)* Set the **caption language** (default `en`) and decide whether to **allow auto-generated captions**.
4. *(Optional)* Set **Max videos** to cap how many videos a single run processes.
5. Click **▶ Start** and the transcripts are extracted for you.
6. **Export** the results to JSON, CSV, Excel, or XML, or fetch them through the API.

That's it — no login, no cookies, no account required. Fast, fresh data delivered straight from public pages.

You can start small with a single video to see the shape of the output, then scale the same run up to a full channel or a batch of search terms once you're happy with the format. Every field stays consistent across one video or thousands, so downstream code you write against a test run keeps working at scale.

***

### Input example

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }
  ],
  "lang": "en",
  "auto": true,
  "maxItems": 50,
  "searchTerms": ["best places of england"]
}
```

- **startUrls** — video, channel, Shorts-tab, or search-result URLs. Each is expanded automatically.
- **lang** — subtitle language code (e.g. `en`, `es`, `tr`).
- **auto** — allow YouTube auto-generated captions (`true`) or only human/manual subtitles (`false`).
- **maxItems** — cap on videos processed per run (1–100).
- **searchTerms** — plain YouTube search queries, processed alongside any links.

***

### Output example

```json
{
  "sourceUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "title": "Me at the zoo",
  "channel": "jawed",
  "channelUrl": "https://www.youtube.com/@jawed",
  "language": "en",
  "isAutoGenerated": true,
  "duration": 19,
  "transcript": [
    { "text": "All right, so here we are", "start": 1.2, "duration": 2.8 },
    { "text": "in front of the elephants", "start": 4.0, "duration": 2.1 },
    { "text": "the cool thing about these guys", "start": 6.4, "duration": 2.3 }
  ],
  "text": "All right, so here we are in front of the elephants the cool thing about these guys...",
  "ok": true
}
```

Every run produces a clean dataset you can page through in the Apify Console or pull via API. Export scraped data to JSON, CSV, Excel, or XML in one click.

***

### How much will scraping YouTube transcripts cost?

The YouTube Transcript Scraper uses simple, predictable **pay-per-result** pricing — you pay for the transcripts you actually get, not for time or infrastructure. Bulk runs stay cheap because there are no per-request API fees and no limitations on the number of URLs you queue.

- 💸 **Pay per result** — cost scales with the number of videos transcribed.
- 🆓 **Free to try** — get your first transcripts free in under 2 minutes on the Apify free tier.
- ⚡ **Fast, fresh data** — no caching; each run reads the current public page.

See the live rate on the [Apify store page](https://apify.com/myagizm/youtube-transcript-scraper). New Apify accounts include monthly free usage to test the actor at no cost.

Because pricing is tied to results rather than compute time, you can estimate spend up front: multiply the number of videos you plan to transcribe by the per-result rate. There are no hidden proxy fees, no per-request API charges, and no minimums — scrape one transcript or scrape YouTube transcripts in bulk with the same simple math.

***

### Tips for scraping YouTube transcripts

Get the most out of the YouTube Transcript Scraper:

- 🎯 **Mix input types freely.** Combine direct video links, a channel URL, a `/shorts` tab, and search terms in a single run — everything is expanded and de-duplicated for you.
- 🌍 **Set the language first.** If you need a specific language, set the code before you run; leaving auto-captions on ensures coverage when a manual track isn't published.
- 💯 **Use Max videos to control run size.** A single run lasts about ten minutes, so cap large channels and schedule follow-up runs to page through the rest.
- 🧠 **Keep both text shapes.** Use the joined `text` field for LLM prompts and the per-line `transcript` array when you need timestamps for chaptering or deep links.
- 📌 **Filter empty records downstream.** Videos with captions disabled are flagged, so a quick filter on your side keeps datasets clean.
- 🔁 **Schedule recurring runs.** Point the scraper at a channel and schedule it to capture transcripts of new uploads automatically.

***

### Want other YouTube data?

Transcripts are one piece of the picture. Pair this scraper with the rest of the myagizm YouTube toolkit to build a complete pipeline — metadata, comments, downloads, and channel catalogs:

- 📺 **[YouTube Channel Scraper](https://apify.com/myagizm/youtube-channel-scraper)** — scrape a channel's full video catalog and stats.
- 💬 **[YouTube Comment Scraper](https://apify.com/myagizm/youtube-comment-scraper)** — pull comments, replies, likes, and authors.
- ℹ️ **[YouTube Video Info Scraper](https://apify.com/myagizm/youtube-video-info)** — get titles, views, likes, descriptions, and metadata.
- ⬇️ **[YouTube Video Downloader](https://apify.com/myagizm/youtube-video-downloader)** — download full videos as files.
- 🎬 **[YouTube Shorts Downloader](https://apify.com/myagizm/youtube-shorts-downloader)** — grab Shorts as video files.
- 🎵 **[YouTube MP3 Downloader](https://apify.com/myagizm/youtube-mp3-downloader)** — extract audio as MP3.

Browse the full family on the [myagizm store profile](https://apify.com/myagizm) to combine transcripts, comments, metadata, and downloads into one YouTube data pipeline.

***

### Use YouTube transcript data with AI agents (MCP)

The YouTube Transcript Scraper is available through the **Apify MCP server**, so AI assistants can call it as a tool and read transcripts on demand.

- 🧩 **Claude** — add the Apify MCP server and let Claude fetch and summarize transcripts.
- 🤖 **ChatGPT** — use the actor as a tool for research and content workflows.
- 🖊️ **Cursor** — pull transcript data directly into your coding and prototyping sessions.

Ask your agent to "get the transcript of this YouTube video and summarize the key points," and it will run the scraper, read the structured output, and answer — no glue code required. This makes it easy to build RAG pipelines, meeting-style notes, and content-analysis agents on top of public YouTube data.

Common AI-agent recipes that work well with YouTube transcript data:

- 🗒️ **Summarize & chapter** — turn a long transcript into a bullet summary with timestamped chapters.
- 🌐 **Translate** — pull a transcript and translate it into another language on the fly.
- ❓ **Chat over video** — index the `text` field so users can ask questions and get answers grounded in the video.
- 🔑 **Keyword & topic extraction** — mine transcripts for entities, topics, and SEO keywords across a whole channel.

***

### Integrations & API

Connect the YouTube Transcript Scraper to the tools you already use: **Make, Zapier, n8n, Slack, Airbyte, Gumloop, CrewAI, IFTTT, Lindy, GitHub, Google Sheets, and Google Drive** — plus webhooks and the MCP server. Schedule runs via API and route fresh transcripts wherever you need them.

#### Run synchronously and get the dataset (Apify API)

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~youtube-transcript-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startUrls": [{ "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }],
    "lang": "en",
    "auto": true,
    "maxItems": 10
  }'
```

#### Start a run asynchronously

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~youtube-transcript-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startUrls": [{ "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }],
    "lang": "en"
  }'
```

#### Fetch dataset items later

```bash
curl "https://api.apify.com/v2/acts/myagizm~youtube-transcript-scraper/runs/last/dataset/items?token=YOUR_APIFY_TOKEN&format=csv"
```

Change `format` to `json`, `csv`, `xlsx`, or `xml` to export scraped data in your preferred format. The Apify Console also auto-generates ready-to-paste **JavaScript, Python, and CLI** snippets, plus an **OpenAPI** spec, for this actor.

***

### FAQ — scraping YouTube transcripts

**Is it legal to scrape YouTube transcripts?**
The scraper only collects data that is publicly available — transcripts and subtitles that YouTube already displays to any visitor. It does not access private or unlisted content behind a login. As with any scraping, you are responsible for how you use the data; if you process personal data, follow GDPR/CCPA and other applicable regulations, and respect YouTube's terms.

**Do I need an API key or login to scrape YouTube transcripts?**
No. There is no API key, no login, and no cookies or account required. Paste a link and run.

**Can I use the YouTube Transcript Scraper with the Apify API?**
Yes. Start runs, poll status, and fetch datasets via the Apify API using the path `myagizm~youtube-transcript-scraper`. Sync and async endpoints are shown above.

**Can I get YouTube transcript data through an MCP server for AI agents?**
Yes. The actor is exposed via the Apify MCP server, so Claude, ChatGPT, and Cursor can call it as a tool and read the structured transcript output.

**Do I need proxies to scrape YouTube transcripts?**
No. Proxy handling is built in and managed for you — you don't configure or supply anything.

**Can I integrate YouTube transcript data with other apps?**
Yes — via Make, Zapier, n8n, Slack, Airbyte, Gumloop, CrewAI, IFTTT, Lindy, GitHub, Google Sheets, Google Drive, and webhooks.

**Can I export transcripts to CSV, Excel, or JSON?**
Yes. Export scraped data to JSON, CSV, Excel, or XML from the Console or via the API `format` parameter.

**Can I scrape multiple YouTube transcripts at once?**
Yes. Queue many video URLs, a channel, a Shorts tab, or search terms in a single run and scrape transcripts in bulk at scale.

**Can I schedule the YouTube Transcript Scraper?**
Yes. Use Apify Schedules or trigger runs via API/webhooks to keep transcripts fresh on a cadence you choose.

**Can I scrape transcripts from private or members-only videos?**
No — only publicly available videos. The scraper never bypasses logins or access controls.

**What if a video has no captions?**
If a video has captions disabled, its record is flagged accordingly so you can filter those out in your workflow. Turning on auto-captions maximizes coverage.

**Can I choose the transcript language?**
Yes. Set the language code (e.g. `en`, `es`, `tr`) and the scraper returns captions in that language when the video offers them.

**Are the transcripts time-stamped?**
Yes. Each caption line includes its `start` time and `duration` in seconds, plus a joined full-text `text` field for convenience.

**Can I scrape an entire channel or Shorts tab?**
Yes. Paste a channel or `/shorts` URL and it expands into its videos automatically, subject to your Max videos limit.

**How fresh is the data?**
There is no caching — every run reads the current public page, so you get fast, fresh transcript data.

**Can I scrape YouTube transcripts in multiple languages?**
Yes. Run the scraper once per language code, or queue separate runs, to collect transcripts in each language a video publishes. This is handy for localization and multilingual datasets.

**Does the transcript include timestamps I can link to?**
Yes. Each line's `start` value (in seconds) maps directly to a `&t=` deep link on the watch URL, so you can jump viewers to the exact moment a phrase is said.

**How do I feed transcripts into a summarizer or chatbot?**
Export the `text` field (the full joined transcript) or the per-line `transcript` array, then pass it to your LLM of choice — directly, through the MCP server, or via an integration like n8n, Make, or Zapier.

**Is there a limit on how many transcripts I can scrape?**
There are no limitations on requests or the number of calls. Use the Max videos setting to cap a single run; queue additional runs or schedule them to process larger catalogs.

***

### Related searches {#related-searches}

youtube transcript scraper · youtube transcript extractor · download youtube subtitles · youtube transcript api alternative · video to text · rag video corpus · youtube captions export · youtube subtitle downloader · transcript with timestamps · youtube to blog post · x402 actor · ai agent scraper no account · pay with usdc api · mcp scraper for agents

***

### Run it from an AI agent — no Apify account needed (x402) {#x402}

This actor accepts **agentic payments** over the open [x402 protocol](https://docs.apify.com/integrations/x402). An AI agent can pay for a run in **USDC on Base** and get the data without an Apify account, a credit card, or an API key:

```bash
## one-time: wallet + prepaid token (agent side)
npx -y awal auth login <email>
npx awal x402 pay 'https://agi.apify.com/protocols/x402/prepaid-tokens?amount=1&currency=usd' --max-amount 1000000 --json
## then use the returned token exactly like an Apify API token
curl "https://api.apify.com/v2/acts/myagizm~youtube-transcript-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $PREPAID_TOKEN" -H 'Content-Type: application/json' -d '{INPUT}'
```

Why it works here: this actor is **pay per event** and runs with **limited permissions**, the two conditions x402 requires. You are charged per result, so an agent pays only for the rows it receives. The prepaid token is a hard spending cap and expires 14 days after purchase.

***

### Disclaimer

This is an independent tool and is not affiliated with, endorsed by, or sponsored by YouTube or Google. All product names, logos, and brands are property of their respective owners.

Use the YouTube Transcript Scraper only for publicly available data and in compliance with applicable laws and platform terms.

***

## 中文说明 —— YouTube 字幕抓取工具

**免登录抓取 YouTube 公开数据** —— 把视频语音转成带时间戳的结构化文本。不需要 API Key、不需要 OAuth 应用、不需要登录或 Cookie。结果可导出为 JSON、CSV、Excel、XML，也可通过 Apify API 定时运行并接入 n8n、Zapier、Make 等工具。

> **两分钟内免费拿到第一批数据** —— 填入内容、点击 Start 即可。无需配置，试用不需要信用卡。

### 能做什么

- 📝 **抓取完整字幕**，含逐行时间戳与总时长。
- 🌍 **可指定语言**（`lang`）。
- 🤖 **可选自动生成字幕**（`auto`），最大化覆盖率。
- 📺 **支持频道、Shorts 页与搜索词批量展开**。
- 🧠 **同时给出 `text` 全文与 `transcript` 逐行数组**，前者喂大模型，后者做定位。
- 🚫 **无需 API Key、无 OAuth**。
- 📤 **导出** JSON / CSV / Excel / XML。

### 谁在用

- 🧑‍💻 **AI / RAG 开发者** —— 把视频变成可检索文本。
- 🧠 **内容与 SEO** —— 从字幕里挖关键词、把长视频改写成文章。
- 📰 **研究者与记者** —— 把访谈与发布会变成可搜索文本。
- 🎓 **教育** —— 生成学习笔记与翻译。
- ♿ **无障碍与本地化** —— 导出字幕用于翻译与合规。

### 可以抓取哪些数据

| 字段 | 类型 | 说明 |
|------|------|------|
| `sourceUrl` | string | 处理的原始链接 |
| `videoId` | string | 视频 ID |
| `url` | string | 链接 |
| `title` | string | 标题 / 职位名称 |
| `channel` | string | 频道名称 |
| `channelUrl` | string | 频道链接 |
| `language` | string | 字幕语言 |
| `isAutoGenerated` | boolean | 是否为自动生成字幕 |
| `duration` | number | 时长（秒） |
| `transcript` | array | 逐行字幕数组（`text` / `start` / `duration`） |
| `text` | string | 正文 |
| `ok` | boolean | 该行是否成功提取 |

> 字段取决于该条目公开了什么；不存在的值返回 `null`，数据结构保持稳定。

### 输入示例

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }
  ],
  "lang": "en",
  "auto": true,
  "maxItems": 50,
  "searchTerms": ["best places of england"]
}
```

### 输出示例

```json
{
  "sourceUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "title": "Me at the zoo",
  "channel": "jawed",
  "channelUrl": "https://www.youtube.com/@jawed",
  "language": "en",
  "isAutoGenerated": true,
  "duration": 19,
  "transcript": [
    { "text": "All right, so here we are", "start": 1.2, "duration": 2.8 },
    { "text": "in front of the elephants", "start": 4.0, "duration": 2.1 },
    { "text": "the cool thing about these guys", "start": 6.4, "duration": 2.3 }
  ],
  "text": "All right, so here we are in front of the elephants the cool thing about these guys...",
  "ok": true
}
```

### 价格

采用**按结果计费**：只为真正拿到的数据付费，不按运行时间收费。

- 💸 成本 = 结果数量 × 单价，预算可提前算清。
- 📉 Apify 的 Bronze / Silver / Gold / Platinum / Diamond 套餐享阶梯折扣。
- 🆓 新账号自带每月免费额度，第一次运行不花钱。
- 🚫 无代理附加费、无单次请求费、无最低消费。

实时价格见 [Apify 商店页面](https://apify.com/myagizm/youtube-transcript-scraper)。

### 使用建议

- 🧠 **`text` 喂大模型，`transcript` 做时间定位**，两个都留着。
- 🌍 需要特定语言先设 `lang`；开启 `auto` 可保证覆盖率。
- 📌 关闭字幕的视频会被标记，下游一行过滤即可。
- 🔗 `start` 秒数可直接拼成 `&t=` 深链，跳到原话位置。

### 其他YouTube数据

- 📺 **[YouTube 频道抓取](https://apify.com/myagizm/youtube-channel-scraper)** —— 频道视频目录与统计。
- 💬 **[YouTube 评论抓取](https://apify.com/myagizm/youtube-comment-scraper)** —— 评论、作者与点赞。
- 📝 **[YouTube 字幕抓取](https://apify.com/myagizm/youtube-transcript-scraper)** —— 带时间戳的逐行字幕。
- ℹ️ **[YouTube 视频信息](https://apify.com/myagizm/youtube-video-info)** —— 标题、观看数、点赞、简介等元数据。
- ⬇️ **[YouTube 视频下载](https://apify.com/myagizm/youtube-video-downloader)** —— 按清晰度下载完整视频。
- 🎬 **[YouTube Shorts 下载](https://apify.com/myagizm/youtube-shorts-downloader)** —— 批量保存 Shorts。
- 🎵 **[YouTube 转 MP3](https://apify.com/myagizm/youtube-mp3-downloader)** —— 提取音频。

其他平台同样是免登录、按结果计费：**[Instagram](https://apify.com/myagizm/instagram-profile-scraper-v2)** ·
**[TikTok](https://apify.com/myagizm/tiktok-profile-scraper-v2)** · **[X（推特）](https://apify.com/myagizm/x-tweets-scraper)** ·
**[Reddit](https://apify.com/myagizm/reddit-scraper-v2)** · **[Google 地图](https://apify.com/myagizm/google-maps-scraper)** ·
**[Google 新闻](https://apify.com/myagizm/google-news-scraper)**。完整家族见 **[myagizm 商店主页](https://apify.com/myagizm)**。

### 配合 AI 智能体使用（MCP）

本 Actor 已接入 **Apify MCP 服务器**，Claude、ChatGPT、Cursor 等助手可以把它当作工具直接调用，用自然语言提问即可拿到结构化结果，无需写胶水代码。

### 集成与 API

支持 **Make、Zapier、n8n、Slack、Airbyte、Gumloop、CrewAI、IFTTT、Lindy、GitHub、Google Sheets、Google Drive**，以及 Webhook、定时任务与 MCP 服务器。

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~youtube-transcript-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }
  ],
  "lang": "en",
  "auto": true,
  "maxItems": 50,
  "searchTerms": ["best places of england"]
}'
```

把 `format` 改成 `json`、`csv`、`xlsx` 或 `xml` 即可导出不同格式。

### 常见问题

**需要 API Key 或登录吗？**
不需要。没有 API Key、没有 OAuth 应用、不登录、不用 Cookie，也不会使用你的账号。

**抓取YouTube合法吗？**
只采集公开可见的数据，即任何未登录访客都能看到的内容，不登录、不绕过访问控制。合规责任由使用者承担：如涉及个人数据请遵守 GDPR / CCPA 与平台条款。

**能抓私密内容吗？**
不能，需要登录或已删除的内容会被跳过并记录在日志中。

**需要配置代理吗？**
不需要，已内置托管。

**支持导出 CSV / Excel / JSON 吗？**
支持 JSON、CSV、Excel、XML。

**可以通过 Apify API 调用吗？**
可以，见上方示例。

**支持 AI 智能体（MCP）吗？**
支持，Claude、ChatGPT、Cursor 均可当作工具调用。

**可以定时运行吗？**
可以，支持 Apify Schedules、API 与 Webhook。

**数据有多新？**
不缓存，每次运行都读取当前公开页面。

### 让 AI 代理直接调用 —— 无需 Apify 账号（x402）

本工具支持基于开放 [x402 协议](https://docs.apify.com/integrations/x402) 的**代理支付**：AI 代理可以用 **Base 链上的 USDC** 直接付费运行，无需 Apify 账号、信用卡或 API 密钥。

```bash
npx -y awal auth login <邮箱>
npx awal x402 pay 'https://agi.apify.com/protocols/x402/prepaid-tokens?amount=1&currency=usd' --max-amount 1000000 --json
curl "https://api.apify.com/v2/acts/myagizm~youtube-transcript-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $PREPAID_TOKEN" -H 'Content-Type: application/json' -d '{INPUT}'
```

之所以可用：本工具采用**按事件计费**且以**受限权限**运行，这正是 x402 的两个前提条件。按结果计费，代理只为拿到的数据付费；预付令牌本身就是消费上限，购买后 14 天到期。

***

### 免责声明

本工具为独立第三方工具，与 YouTube / Google LLC 无任何隶属、认可或赞助关系，所有商标归各自所有者。

本 Actor 只采集**公开可见**的数据，不登录、不绕过访问控制、不获取私密内容。数据使用的合规责任由使用者承担。

### 相关搜索

youtube 字幕抓取 · youtube 转文字 · 视频字幕导出 · youtube transcript api · rag 视频语料 · 免 api key 字幕 · 视频转文章 · x402 支付 · ai 代理抓取 · usdc 付费 api

# Actor input Schema

## `startUrls` (type: `array`):

YouTube video URLs to extract transcripts/subtitles from, e.g. "https://www.youtube.com/watch?v=jNQXAC9IVRw". You can also pass channel/profile URLs (incl. the /shorts tab) and YouTube search-result URLs; each is expanded automatically.

## `lang` (type: `string`):

Subtitle language code, e.g. "en" for English, "es" for Spanish, or "tr" for Turkish. The scraper returns captions in this language when the video offers them.

## `auto` (type: `boolean`):

Use YouTube auto-generated captions (on) or only human/manual subtitles (off). Example: keep this on to also transcribe videos that only have machine captions, maximizing coverage.

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

Maximum number of videos to process in one run, e.g. 50. A run lasts at most ~10 minutes. Range 1–100.

## `searchTerms` (type: `array`):

Plain YouTube search queries, e.g. "best places of england". Matching videos are processed alongside any links above. For Shorts, only Shorts among the results are kept.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    }
  ],
  "lang": "en",
  "auto": true,
  "maxItems": 50,
  "searchTerms": []
}
```

# Actor output Schema

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

All scraped items as structured 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 = {
    "startUrls": [
        {
            "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
        }
    ],
    "lang": "en",
    "auto": true,
    "maxItems": 50,
    "searchTerms": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("myagizm/youtube-transcript-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 = {
    "startUrls": [{ "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }],
    "lang": "en",
    "auto": True,
    "maxItems": 50,
    "searchTerms": [],
}

# Run the Actor and wait for it to finish
run = client.actor("myagizm/youtube-transcript-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 '{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    }
  ],
  "lang": "en",
  "auto": true,
  "maxItems": 50,
  "searchTerms": []
}' |
apify call myagizm/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/T0myvgGttumFZgdSr/builds/0FgYJVCKQ4Vycbmn2/openapi.json
