# YouTube Search Transcripts: transcripts for any search, one run (`steadydata/youtube-search-transcripts`) Actor

Search YouTube by keyword and get the transcript of every result in one run, up to 50 queries: one row per video with rank, title, channel, views and the full transcript text. Videos without captions cost nothing. Pay per transcript.

- **URL**: https://apify.com/steadydata/youtube-search-transcripts.md
- **Developed by:** [Steadydata Team](https://apify.com/steadydata) (community)
- **Categories:** Videos, AI, Automation
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.28 / 1,000 transcript fetcheds

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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

# README

## YouTube Search Transcripts: transcripts for any search, one run

Search YouTube and get the transcript of every result in one run, up to 50 queries: one row per video with rank, title, channel, views and the full transcript text. Videos without captions cost nothing. Pay per transcript.

### Why this scraper

- **Only delivered results are charged.** Inputs that fail come back as clear error
  records at no cost.
- One run, no glue: the search runs over the slim Innertube route (about 2 KB per result) and every result goes straight into the transcript route. Measured on "how to make sourdough bread": 5 results, 5 transcripts of 8,000 to 18,000 characters, in a single run.
- The transcript is in the language the video is spoken in. When a video carries community translations, the spoken language wins over the first translation in the list; pass `languages` to ask for a specific one. A result without captions is never a row and never charged; it is counted in `skippedNoCaptions`.

### Who this is for

Type your queries in `queries` (up to 50 per run), set `maxResultsPerQuery` (default 10, ceiling 100) and, if you want, `sortBy` (relevance, upload date, view count or rating). Every delivered row carries the query, the rank in the search results, the video's title, views and age, the transcript language, whether the captions were auto-generated and the full transcript text. Turn on `includeTimestampedSnippets` when the text has to be aligned to the video.

### Who this is not for

Only videos that have captions (manual or auto-generated) produce a row; music, very new uploads and some live streams have none and are counted in `skippedNoCaptions` instead. Search results are YouTube's, personalised for nobody but still varying a little between runs and regions, so the same query can return a slightly different set tomorrow. The transcript is text, not a translation: you get the captions in the video's spoken language unless you list preferred `languages`.

### Input example

```json
{
    "queries": [
        "how to make sourdough bread"
    ],
    "maxResultsPerQuery": 10,
    "sortBy": "relevance",
    "languages": [],
    "preferManualCaptions": true,
    "includeTimestampedSnippets": false
}
```

### Output example

- `query`
- `sortBy`
- `rank`
- `videoId`
- `url`
- `title`
- `viewCount`
- `publishedText`
- `durationSeconds`
- `language`
- `isAutoGenerated`
- `text`
- `snippets`
- `skippedNoCaptions`

Error codes: `INVALID_QUERY`, `INVALID_SORT`, `NO_RESULTS`, `NO_TRANSCRIPT`, `BLOCKED`.

One delivered row looks like this:

```json
{
  "query": "how to make sourdough bread",
  "sortBy": "relevance",
  "rank": 1,
  "videoId": "4gEoh3sk2AE",
  "url": "https://www.youtube.com/watch?v=4gEoh3sk2AE",
  "title": "Bake the Perfect Sourdough Bread: A Step-by-Step Guide",
  "viewCount": 3241316,
  "publishedText": "2 years ago",
  "durationSeconds": 712,
  "language": "en",
  "isAutoGenerated": false,
  "text": "- Today I am gonna show you how to make sourdough bread. Here's everything you need to know to get the beautiful rise, the perfect little ear, and the best text...",
  "skippedNoCaptions": 0,
  "status": "ok"
}
```

### Related actors from steadydata

- [youtube-search](https://apify.com/steadydata/youtube-search): the same search results without transcripts
- [youtube-channel-transcripts](https://apify.com/steadydata/youtube-channel-transcripts): the same idea for a whole channel
- [youtube-transcript-bulk](https://apify.com/steadydata/youtube-transcript-bulk): transcripts for a list of specific videos

### Pricing

Pay per event: one `transcript-fetched` event per delivered result. No charge for inputs
that fail, no separate platform-usage surcharge.

**Free Apify plan:** this actor delivers up to 25 rows per run for accounts on the Apify free
plan, and then stops with a message. That limit is set by us, not by Apify. It exists so the
actor keeps paying for itself for the people who do pay. Any paid Apify plan runs it at full
size, billed per delivered row, with failed rows never charged.

**Reviews:** if this actor saves you time, a short review on this page is the one thing that
helps most. Ratings are what other buyers look at first, and we have no other way to ask.

### FAQ

**Do I pay for results without captions?** No. Only a delivered transcript is charged; a query that fails or a video without captions costs nothing.

**How many results can I take per query?** Up to 100 (`maxResultsPerQuery`), in the order YouTube returns them for the chosen `sortBy`.

**Which language do I get?** The captions in the language the video is spoken in: a manual track when it exists, otherwise the auto-generated one. Pass `languages` (for example `["nl", "en"]`) to prefer specific tracks, and `preferManualCaptions: false` to take auto-generated captions first.

**Can I get timestamps?** Yes, set `includeTimestampedSnippets` to true and every row gets a `snippets` list with start time, duration and text per caption line.

**Can I search a channel or a playlist instead?** Use YouTube Channel Transcripts or YouTube Playlist Transcripts from the related actors below; this actor is for open search queries.

**Is personal data collected?**
The transcript is the caption track YouTube exposes for that video; it is not generated by this actor and the text follows the captioner, including its punctuation and line breaks.

**What happens when the source changes?**
Sources change from time to time; that is the nature of this work. The actor is
monitored daily and fixed fast, and while it is broken you are not charged, because
only delivered results cost anything.

# Changelog

This Actor's version history is a separate document: https://apify.com/steadydata/youtube-search-transcripts/changelog.md

# Actor input Schema

## `queries` (type: `array`):

One per row, up to 50, exactly as you would type it in YouTube search.

## `maxResultsPerQuery` (type: `integer`):

Cost ceiling per query, in search order.

## `sortBy` (type: `string`):

YouTube's own sort of the results.

## `languages` (type: `array`):

Language codes in order of preference, for example en, nl, de. Empty takes the video's default track.

## `preferManualCaptions` (type: `boolean`):

On, a human-made track wins over an auto-generated one when both exist.

## `includeTimestampedSnippets` (type: `boolean`):

On, each row also carries the transcript as timed snippets.

## Actor input object example

```json
{
  "queries": [
    "how to make sourdough bread"
  ],
  "maxResultsPerQuery": 10,
  "sortBy": "relevance",
  "languages": [],
  "preferManualCaptions": true,
  "includeTimestampedSnippets": false
}
```

# Actor output Schema

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

No description

# 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 = {
    "queries": [
        "how to make sourdough bread"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadydata/youtube-search-transcripts").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 = { "queries": ["how to make sourdough bread"] }

# Run the Actor and wait for it to finish
run = client.actor("steadydata/youtube-search-transcripts").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "queries": [
    "how to make sourdough bread"
  ]
}' |
apify call steadydata/youtube-search-transcripts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,steadydata/youtube-search-transcripts"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/l0tOhB8FUf98v0dWb/builds/5WvCQsWeYOfs7dZqU/openapi.json
