# YouTube Transcript Keyword Search — Find Topics Inside Videos (`maged120/youtube-transcript-search`) Actor

Search within YouTube video transcripts for specific keywords or phrases. Find exactly which videos mention your topic and at what timestamp.

- **URL**: https://apify.com/maged120/youtube-transcript-search.md
- **Developed by:** [Maged](https://apify.com/maged120) (community)
- **Categories:** AI, Automation
- **Stats:** 10 total users, 1 monthly users, 64.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

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?

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

### What does YouTube Transcript Keyword Search do?

**YouTube Transcript Keyword Search** lets you search inside YouTube video transcripts for any keyword or phrase. Give it a list of video URLs and a search term — it finds exactly which videos mention the keyword and at which timestamps, returning matched segments with surrounding context.

This is ideal for **podcast research, competitive intelligence, academic analysis, or building topic-specific video indexes** — on the [Apify platform](https://apify.com).

### Why use YouTube Transcript Keyword Search?

- **Find topics inside videos** — locate the exact moment a keyword is mentioned
- **Batch search across many videos** — check hundreds of URLs in one run
- **Context snippets** — see the text before and after each match for full context
- **Timestamp precision** — jump directly to the relevant moment in any video
- **Research at scale** — index video content for search engines, databases, or analytics tools

### How to use YouTube Transcript Keyword Search

1. Open the Actor and click **Try for free**
2. Add YouTube video URLs to the `videoUrls` field
3. Enter your search keyword or phrase in the `keyword` field
4. Click **Start** — results appear in seconds
5. Download matched segments as JSON or CSV

### Input

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/watch?v=9bZkp7q19f0"
  ],
  "keyword": "machine learning",
  "language": "en"
}
```

| Field | Type | Description | Default |
|---|---|---|---|
| `videoUrls` | array | YouTube video URLs to search | required |
| `keyword` | string | Keyword or phrase to search for | required |
| `language` | string | Transcript language code | `en` |

### Output

Each match record contains the video, the matched text, timestamp, and surrounding context.

```json
{
  "videoId": "9bZkp7q19f0",
  "videoUrl": "https://www.youtube.com/watch?v=9bZkp7q19f0",
  "keyword": "machine learning",
  "match": "machine learning models can now",
  "start": 143.2,
  "duration": 3.1,
  "context": "...this is how machine learning models can now predict outcomes with..."
}
```

### Output fields

| Field | Type | Description |
|---|---|---|
| `videoId` | string | YouTube video ID |
| `videoUrl` | string | Full YouTube URL |
| `keyword` | string | The searched keyword |
| `match` | string | The matching transcript segment |
| `start` | number | Timestamp of the match (seconds) |
| `duration` | number | Duration of matched segment |
| `context` | string | Surrounding transcript context |

### Cost

Pay-per-result pricing:

| Volume | Estimated cost |
|---|---|
| 100 videos searched | ~$0.10–$0.50 |
| 1,000 videos | ~$1.00–$5.00 |

### Tips

- Use this Actor after **YouTube Search Scraper** to first find relevant video URLs, then search inside them
- Case-insensitive matching is used by default — no need to worry about capitalization
- For broad topic coverage, search multiple keyword variants in separate runs
- Export results to a spreadsheet to build a reference database of timestamped video quotes

### FAQ

**What if a video has no transcript?**
Videos without captions are skipped and noted in the output with an error field.

**Is the keyword search case-sensitive?**
No — matching is case-insensitive.

**Can I search for multi-word phrases?**
Yes — enter the full phrase in the `keyword` field.

**Is this Actor maintained?**
Yes. Report bugs or feature requests in the Issues tab.

**Need help or have questions?**
Open an issue in the Issues tab or reach out on Discord: **maged03211**

# Actor input Schema

## `query` (type: `string`):

The query to search

## `language` (type: `string`):

Language Example: 'english', 'chinese', 'spanish'.

## `accent` (type: `string`):

Optional accent (e.g. 'us', 'uk', 'cn') look at the information for the actor for supported accents. leave empty for all accents.

## `proxy_configuration` (type: `object`):

Proxy settings for anti-bot protection

## Actor input object example

```json
{
  "query": "diagonal",
  "language": "english",
  "accent": "",
  "proxy_configuration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("maged120/youtube-transcript-search").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("maged120/youtube-transcript-search").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 '{}' |
apify call maged120/youtube-transcript-search --silent --output-dataset

```

## MCP server setup

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

```

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/FX0YakLxJkSbFrGQS/builds/3nM3ob716dA0ptRrR/openapi.json
