# YouTube Search to Transcripts: Top Videos for a Keyword

**Use case:** 

Search YouTube for a keyword and get the transcripts of the top or newest videos for it, with titles, channels and views, as JSON, CSV or Excel. Ideal for topic research, competitor research and feeding AI agents. $0.002 per video plus $0.004 per results page.

## Input

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://www.youtube.com/shorts/jNQXAC9IVRw"
  ],
  "searchQueries": [
    "n8n tutorial"
  ],
  "searchSort": "relevance",
  "maxVideosPerChannel": 5,
  "listOnly": false,
  "publishedAfter": "",
  "language": "",
  "includeAutoCaptions": true,
  "includeSegments": true,
  "subtitleFormat": "none",
  "aiSummary": false,
  "translateTo": "none",
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

## Output

```json
{
  "status": {
    "label": "Status",
    "format": "text"
  },
  "url": {
    "label": "Video",
    "format": "link"
  },
  "title": {
    "label": "Title",
    "format": "text"
  },
  "channel": {
    "label": "Channel",
    "format": "text"
  },
  "durationSec": {
    "label": "Duration (s)",
    "format": "number"
  },
  "language": {
    "label": "Language",
    "format": "text"
  },
  "captionType": {
    "label": "Captions",
    "format": "text"
  },
  "wordCount": {
    "label": "Words",
    "format": "number"
  },
  "text": {
    "label": "Transcript",
    "format": "text"
  },
  "translatedText": {
    "label": "Translation",
    "format": "text"
  },
  "errorCode": {
    "label": "Error code",
    "format": "text"
  },
  "error": {
    "label": "Error",
    "format": "text"
  }
}
```

## How it works

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

The YouTube Transcript Scraper | Captions API | $2 per 1K Actor is ready to run with the inputs already set for "YouTube Search to Transcripts: Top Videos for a Keyword". [Sign up or log in](https://console.apify.com/create-task-from-example/A8biYK4JlrkT2MhNn) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "YouTube Search to Transcripts: Top Videos for a Keyword" task

The YouTube Transcript Scraper | Captions API | $2 per 1K Actor will start running based on the input automatically. You can also change all the input fields, like youtube urls, search youtube for, and more, to match your specific use case.

### 3. Receive the "YouTube Search to Transcripts: Top Videos for a Keyword" 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 status, video, title, 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 "YouTube Search to Transcripts: Top Videos for a Keyword" task via API](https://apify.com/aemon/youtube-transcript-scraper.md).

## FAQ

### How many videos does a search return?

As many as Videos per channel, playlist or search, up to 1,000. YouTube returns about 20 videos per results page.

### Can I get the newest videos for a keyword?

Yes. Set Search order to Newest first, for example to monitor a topic on a schedule.

### How much does it cost?

$0.004 per results page (about 20 videos) plus $0.002 per transcript. Videos without captions are free.

### What happens if a video is private or has no captions?

It is returned as a row with "status": "error", an error code such as PRIVATE or NO_CAPTIONS and a readable message. Such videos are never charged.

### Can I run this on a schedule or from code?

Yes. Save the task and add a Schedule, or call it through the Apify API, the JavaScript or Python client, the Apify MCP server, Make, Zapier or n8n.

### Does it work from AWS or other cloud servers?

Yes. It runs on residential IPs with automatic retries, so you can call it from AWS, Google Cloud, Azure or Heroku, where youtube-transcript-api often fails with RequestBlocked or IpBlocked.

## About this Actor

This example demonstrates how to use [YouTube Transcript Scraper | Captions API | $2 per 1K](https://apify.com/aemon/youtube-transcript-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/aemon/youtube-transcript-scraper.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/aemon/youtube-transcript-scraper.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`).
