# Search YouTube and get the transcripts

**Use case:** 

Run a YouTube search and get the transcript of every top result in one go: title, channel, date and full text. Good for topic research, content gap analysis and training data. This example searches for vegetable gardening tutorials.

## Input

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=t4wsYSDeZC4"
  ],
  "searchQueries": [
    "how to start a vegetable garden"
  ],
  "maxVideosPerSource": 5,
  "channelContent": "videos",
  "languages": [
    "en"
  ],
  "fallbackToOriginalLanguage": true,
  "preferManualCaptions": true,
  "allLanguages": false,
  "maxLanguages": 30,
  "includeSegments": true,
  "subtitleFormat": "none",
  "includeDescription": true,
  "includeChapters": true,
  "includeMostReplayed": false,
  "chunkWords": 0,
  "onlyNew": false,
  "maxVideos": 0,
  "dryRun": false
}
```

## Output

```json
{
  "url": {
    "label": "Video",
    "format": "string"
  },
  "title": {
    "label": "Title",
    "format": "string"
  },
  "channelName": {
    "label": "Channel name",
    "format": "string"
  },
  "publishDate": {
    "label": "Publish date",
    "format": "string"
  },
  "language": {
    "label": "Language",
    "format": "string"
  },
  "captionType": {
    "label": "Caption type",
    "format": "string"
  },
  "wordCount": {
    "label": "Word count",
    "format": "integer"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "text": {
    "label": "Transcript",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The YouTube Transcript, Subtitles & Captions Scraper Actor is ready to run with the inputs already set for "Search YouTube and get the transcripts". [Sign up or log in](https://console.apify.com/create-task-from-example/kFYr86z51Cm9RC8GR) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Search YouTube and get the transcripts" task

The YouTube Transcript, Subtitles & Captions Scraper Actor will start running based on the input automatically. You can also change all the input fields, like videos, shorts, channels or playlists, search queries (optional), and more, to match your specific use case.

### 3. Receive the "Search YouTube and get the transcripts" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as video, title, channel name, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Search YouTube and get the transcripts" task via API](https://apify.com/verbatim-labs/youtube-transcript.md).

## FAQ

### Am I charged for videos without captions?

Videos with no captions, private or deleted videos come back from the YouTube search transcript task as free rows with a status and errorCode. Only rows with status ok are billed.

### What does each row contain?

Each row has the video title, channel, publish date, language, caption type, word count and the full transcript text, plus optional timestamped segments, chapters and SRT/VTT.

### How many results per search?

The YouTube search transcript task returns the top maxVideosPerSource videos for each query (this example uses 5). Add several queries to research a whole topic in one run.

### Can I use the transcripts with an AI agent or n8n?

The YouTube search transcript task works over the Apify API, MCP, Make, n8n and Zapier. Every row has stable status and errorCode fields, so a workflow can branch without parsing error text.

## About this Actor

This example demonstrates how to use [YouTube Transcript, Subtitles & Captions Scraper](https://apify.com/verbatim-labs/youtube-transcript.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/verbatim-labs/youtube-transcript.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/verbatim-labs/youtube-transcript.md

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`).
