# Search YouTube and download the transcripts

**Use case:** 

Search YouTube for any phrase and get the transcripts of the top results in one run. Each row has the video title, channel, views, publish date and the complete transcript text, ready for research, summaries or an AI pipeline. Change the search term and the number of videos to suit. Example search: how to use the OpenAI API.

## Input

```json
{
  "inputs": [
    "search:how to use the openai api"
  ],
  "maxResultsPerSource": 20,
  "channelTabs": [
    "videos",
    "shorts",
    "streams"
  ],
  "publishedWithinDays": 0,
  "durationMinSeconds": 0,
  "durationMaxSeconds": 0,
  "includeLikes": false,
  "includeTranscript": true,
  "transcriptLanguages": [
    "en"
  ],
  "strictTranscriptLanguage": false,
  "includeTranscriptSegments": false,
  "includeComments": false,
  "maxCommentsPerVideo": 20,
  "maxRepliesPerComment": 0,
  "maxAgeHours": 24,
  "resetFingerprintBaseline": false,
  "concurrency": 8,
  "language": "en",
  "region": "US",
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "site": "youtube"
}
```

## Output

```json
{
  "title": {
    "label": "Title"
  },
  "video_type": {
    "label": "Video type"
  },
  "views": {
    "label": "Views (exact)"
  },
  "likes": {
    "label": "Likes"
  },
  "published_at": {
    "label": "Published (RFC-3339)"
  },
  "duration_s": {
    "label": "Duration (s)"
  },
  "transcript_status": {
    "label": "Transcript status"
  },
  "category": {
    "label": "Category"
  },
  "video_id": {
    "label": "Video ID"
  },
  "channel": {
    "label": "Channel"
  },
  "subscriber_count": {
    "label": "Subscribers (approx.)"
  },
  "keywords": {
    "label": "Keywords"
  },
  "thumbnail": {
    "label": "Thumbnail",
    "format": "image"
  },
  "description": {
    "label": "Description"
  },
  "transcript": {
    "label": "Transcript"
  },
  "transcript_language": {
    "label": "Transcript language"
  },
  "transcript_language_matched": {
    "label": "Transcript language matched",
    "format": "boolean"
  },
  "transcript_is_generated": {
    "label": "Auto-generated"
  },
  "transcript_cue_count": {
    "label": "Transcript cues"
  },
  "transcript_segments": {
    "label": "Transcript segments"
  },
  "channel_id": {
    "label": "Channel ID"
  },
  "channel_description": {
    "label": "Channel description"
  },
  "is_live": {
    "label": "Live"
  },
  "is_private": {
    "label": "Private"
  },
  "is_crawlable": {
    "label": "Crawlable"
  },
  "_source_url": {
    "label": "Source URL",
    "format": "link"
  },
  "_cached": {
    "label": "From cache"
  },
  "_cached_at": {
    "label": "Cached at"
  },
  "_input": {
    "label": "Input"
  },
  "_site": {
    "label": "Site"
  },
  "_error_kind": {
    "label": "Error kind"
  },
  "_error": {
    "label": "Error"
  }
}
```

## How it works

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

The YouTube Transcript API: Any Video, Channel or Playlist Actor is ready to run with the inputs already set for "Search YouTube and download the transcripts". [Sign up or log in](https://console.apify.com/create-task-from-example/1p40Fih3NjlECanjK) and you'll land in Apify Console with a copy of this exact task.

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

The YouTube Transcript API: Any Video, Channel or Playlist Actor will start running based on the input automatically. You can also change all the input fields, like channels, playlists, videos or search terms, max videos per channel, playlist or search, and more, to match your specific use case.

### 3. Receive the "Search YouTube and download 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 title, video type, views (exact), 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 download the transcripts" task via API](https://apify.com/aquixlabs/youtube-channel-scraper.md).

## About this Actor

This example demonstrates how to use [YouTube Transcript API: Any Video, Channel or Playlist](https://apify.com/aquixlabs/youtube-channel-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/aquixlabs/youtube-channel-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/aquixlabs/youtube-channel-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`).
