# YouTube Subtitle Search Crawler 🔍 (`easyapi/youtube-subtitle-search-crawler`) Actor

A powerful YouTube subtitle search crawler that helps you discover videos by searching through their subtitles. Filter results by views, likes, duration, and more to find exactly what you're looking for.

- **URL**: https://apify.com/easyapi/youtube-subtitle-search-crawler.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Social media, Videos
- **Features:** Limited permissions
- **Stats:** 20 total users, 0 monthly users, 0.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Subtitle Search Crawler 🔍

### 🎯 Features

- Search through YouTube video subtitles to find specific content
- Support both manual and auto-generated subtitles
- Advanced filtering options for precise results
- Direct links to specific timestamps in videos
- Efficient data collection with built-in rate limiting
- Stealth mode to avoid detection

### 📋 Input Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| queryTerm | String | The text to search for in video subtitles |
| maxItems | Integer | Maximum number of results to collect |

#### 🎛️ Filter Options

- `videoTitle`: Filter by video title
- `subtitleType`: Choose between manual or auto-generated subtitles
- `viewsRange`: Filter by view count range
- `likesRange`: Filter by like count range
- `durationRange`: Filter by video duration (in seconds)
- `dateRange`: Filter by upload date
- `country`: Filter by country code
- `category`: Filter by video category
- `language`: Filter by subtitle language

### 📤 Output

The actor outputs detailed information about each matching video, including:

- Video URL
- Title and description
- View count and likes
- Duration
- Subtitle context with timestamps
- Direct links to specific moments in the video

### 💡 Use Cases

- Research specific topics across YouTube content
- Find mentions of products or brands in videos
- Analyze discussions about certain topics
- Content discovery and curation
- Educational resource finding
- Market research and trend analysis

### 🚀 Getting Started

1. Enter your search term in the `queryTerm` field
2. Configure desired filters (optional)
3. Set maximum items to collect
4. Run the actor and wait for results

#### Input Example

A full explanation of an input example in JSON.

```json
	{
        "queryTerm": "openai",
        "videoTitle": "Altman",
        "subtitleType": 'manual',   // manual, auto
        "viewsRange": [465, 31989075],
        "likesRange": [160, 386770965],
        "durationRange": [6, 22574],
        "dateRange": ["2023-12-20", "2024-12-20"],
        "country": "217",
        "category": "3",
        "language": "en",
        "maxItems": 100
    }
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```json
[
	{
		"videoUrl": "https://youtube.com/watch?v=wE4LOagjsS0",
		"subtitleContext": [
			{
				"id": 0,
				"start": 125,
				"dur": 6,
				"token": "OPENAI",
				"token_len": 6,
				"ctx_before": "               WE WILL DISCUSS THAT THROUGHOUT THE PROGRAM WITH AN EXCELLENT             EXTERNAL VOICE COMING UP  FIRST, SAM ALTMAN'S RETURN TO             ",
				"ctx_after": " AS CEO  I WANT TO BRING IN              THE BASICS  SAM ALTMAN IS BACK AS CEO              THERE ARE SOME TEMPORARY BOARD CHANGES ",
				"break": 1,
				"startUrl": "https://youtube.com/watch?v=wE4LOagjsS0&start=125"
			},
			{
				"id": 1,
				"start": 278,
				"dur": 6,
				"token": "OPENAI",
				"token_len": 6,
				"ctx_before": "  AN INDEPENDENT INVESTIGATION INTO SAM ALTMAN WHY HE WAS             FIRED  EXPLAIN THE REST OF WHAT WAS             ANNOUNCED LATE LAST NIGHT BY ",
				"ctx_after": "              SHIRIN: WE WILL SEE A NEGOTIATION             BETWEEN TWO SIDES  THE OLD WORD MAHOOD WITH VERY             SKEPTICAL OF SAM ALTMAN AND ",
				"break": 1,
				"startUrl": "https://youtube.com/watch?v=wE4LOagjsS0&start=278"
			},
			{
				"id": 2,
				"start": 1417.9,
				"dur": 4,
				"token": "CHATGPT",
				"token_len": 7,
				"ctx_before": " WORKING              ON A GENERATIVE AI POWERED SEARCH WHERE YOU CAN ASK              WESTERN -- A QUESTION SIMILAR TO HOW YOU WOULD ASK A ",
				"ctx_after": "              ON THE WALMART OR WEBSITE TO BRING UP RECOMMENDATIONS               ASKING WHAT THE COURT YOU NEED FOR A HOUSEWARMING PARTY                ",
				"break": 1,
				"startUrl": "https://youtube.com/watch?v=wE4LOagjsS0&start=1417"
			},
			{
				"id": 3,
				"start": 1595.9,
				"dur": 5.1,
				"token": "OPENAI",
				"token_len": 6,
				"ctx_before": "  ARE SEEING               THAT IS HOW WE HAVE PLANNED RAI TO MAKE IT REALLY POWERFUL  ED:              IS THERE A TECHNOLOGY RELATIONSHIP WITH ",
				"ctx_after": " AND              THEIR GP TECHNOLOGY?              SRINI: WE ARE TRYING TO GET OUT HOW WE              GET THE LANGUAGE UNDERSTANDING CORRECT               AT ",
				"break": 1,
				"startUrl": "https://youtube.com/watch?v=wE4LOagjsS0&start=1595"
			},
			{
				"id": 4,
				"start": 1757.3,
				"dur": 8,
				"token": "OPENAI",
				"token_len": 6,
				"ctx_before": " WE CONTINUE TO BE COMMITTED TO ",
				"ctx_after": ", SAM, GREG,              AND THE TEAM IRRESPECTIVE OF WHERE THEY ARE  BRENT:              I HAVE NOT SEEN THIS IN 20 YEARS  SEVERAL:              ",
				"break": 1,
				"startUrl": "https://youtube.com/watch?v=wE4LOagjsS0&start=1757"
			},
			{
				"id": 5,
				"start": 1966.4,
				"dur": 8.1,
				"token": "OPENAI",
				"token_len": 6,
				"ctx_before": "  I HAVE BEEN REPORTING ON THIS STORY SINCE FRIDAY LUNCHTIME               CONSIDERING WHAT IS HAPPENING  THE TAKEAWAY HAS BEEN THE VALUE              OF ",
				"ctx_after": " APPEARS TO BE THE INTELLECTUAL CAPITAL OF ITS              PEOPLE               WHEN MICROSOFT REACTED TO THE NEWS, THE IDEA WAS IN THERE               ",
				"break": 1,
				"startUrl": "https://youtube.com/watch?v=wE4LOagjsS0&start=1966"
			},
			{
				"id": 6,
				"start": 2156.3,
				"dur": 3,
				"token": "OPENAI",
				"token_len": 6,
				"ctx_before": " THIS WAS              REALLY --VINOD: I THINK THIS WAS REALLY ERRANT,              SHOCKING, SURPRISING IN EVERYWHERE, ALMOST UNEXPECTED              UNDER ANY CIRCUMSTANCE  ",
				"ctx_after": " SPOKE TO THAT BY              OFFERING TO JOIN SAM IN WHATEVER HE DID  ED:              I WOULD LOVE TO GET INTO THE EA  ",
				"break": 1,
				"startUrl": "https://youtube.com/watch?v=wE4LOagjsS0&start=2156"
			},
			{
				"id": 7,
				"start": 2339.3,
				"dur": 9,
				"token": "OPENAI",
				"token_len": 6,
				"ctx_before": "  AND NEAR              FREE TUTORS               MY WIFE'S NONPROFIT IS PROVIDING FREE TUTORS TO              EVERYBODY IN CONJUNCTION WITH ",
				"ctx_after": "  ON THEIR WEBSITE               AND IN THE ",
				"break": 1,
				"startUrl": "https://youtube.com/watch?v=wE4LOagjsS0&start=2339"
			},
			{
				"id": 8,
				"start": 2348.3,
				"dur": 7,
				"token": "OPENAI CHATGPT",
				"token_len": 14,
				"ctx_before": "  ON THEIR WEBSITE               AND IN THE ",
				"ctx_after": " STORE  THOSE KINDS OF BENEFITS,              INCLUDING 50  OF THE PEOPLE ON THE PLANET FROM THE KIND OF              ",
				"break": 1,
				"startUrl": "https://youtube.com/watch?v=wE4LOagjsS0&start=2348"
			},
			{
				"id": 9,
				"start": 2455.3,
				"dur": 1,
				"token": "OPENAI",
				"token_len": 6,
				"ctx_before": " LUX CAPITAL ON THE SHOW, SOMEBODY YOU PROBABLY KNOW               HE SAID THE FIRST EXAM ALTMAN SHOULD DO WHEN HE RETURNS TO              ",
				"ctx_after": " IS TAKE ",
				"break": 0,
				"startUrl": "https://youtube.com/watch?v=wE4LOagjsS0&start=2455"
			},
			{
				"id": 10,
				"start": 2455.3,
				"dur": 1,
				"token": "OPENAI",
				"token_len": 6,
				"ctx_before": "",
				"ctx_after": " PUBLIC, DO AN IPO               WHAT'S YOUR RESPONSE TO THAT? VINOD:              I WON'T COMMENT ON WHAT THEY SHOULD DO ",
				"break": 1,
				"startUrl": "https://youtube.com/watch?v=wE4LOagjsS0&start=2455"
			},
			{
				"id": 11,
				"start": 2507.3,
				"dur": 2,
				"token": "OPENAI",
				"token_len": 6,
				"ctx_before": "  I HOPE OVER THE NEXT YEAR WE CAN FIX THAT  ED:              FINALLY, A LOT OF PEOPLE ARE THINKING ABOUT THE 770 ",
				"ctx_after": "              EMPLOYEES  ONE POINT WAS MADE BY ME TO              SOURCES IN THE VALLEY  THIS PENDING TENDER PRESENTED              POTENTIALLY LIFE-CHANGING AMOUNTS ",
				"break": 1,
				"startUrl": "https://youtube.com/watch?v=wE4LOagjsS0&start=2507"
			}
		]
	},
    ...
]
```

### Related Actors

- 🎥 [YouTube Video Data Scraper](https://apify.com/easyapi/youtube-video-data-scraper) - A powerful metadata extractor for comprehensive YouTube video analysis
- 📺 [YouTube Comments Scraper](https://apify.com/easyapi/youtube-comments-scraper) - Extract YouTube comments with pagination support and comprehensive data
- 🔍 [YouTube Search Scraper](https://apify.com/easyapi/youtube-search-scraper) - Fetch search results from YouTube without logging in
- 📝 [YouTube Description Extractor](https://apify.com/easyapi/youtube-description-extractor) - Extract complete descriptions from YouTube videos automatically
- 🎯 [YouTube Tags Extractor](https://apify.com/easyapi/youtube-tags-extractor) - Extract and analyze tags from any YouTube video URL
- 📊 [YouTube Video Statistics Scraper](https://apify.com/easyapi/youtube-video-statistics-scraper) - Extract comprehensive YouTube video statistics and metadata
- 🎥 [YouTube Channel ID Extractor](https://apify.com/easyapi/youtube-channel-id-extractor) - Convert YouTube channel URLs to channel IDs effortlessly
- 📺 [YouTube Trending Videos/Shorts Scraper](https://apify.com/easyapi/youtube-trending-videos-shorts-scraper) - Extract trending videos and shorts from YouTube
- 🎮 [YouTube Gaming Trends Scraper](https://apify.com/easyapi/youtube-gaming-trends-scraper) - Scrape trending gaming videos from YouTube Gaming section
- 🎬 [YouTube Movies Trending Scraper](https://apify.com/easyapi/youtube-movies-trending-scraper) - Scrape trending movie trailers from YouTube
- 📱 [YouTube Channel Shorts Scraper](https://apify.com/easyapi/youtube-channel-shorts-scraper) - Get video details from any YouTube channel's Shorts
- 🎯 [YouTube Hashtag Generator](https://apify.com/easyapi/youtube-hashtag-generator) - Generate relevant, trending hashtags for YouTube content
- 🎯 [YouTube Hashtag Extractor](https://apify.com/easyapi/youtube-hashtag-extractor) - Extract hashtags from YouTube videos automatically
- 🎥 [YouTube Hashtag Video & Shorts Scraper](https://apify.com/easyapi/youtube-hashtag-video-shorts-scraper) - Scrape YouTube videos and Shorts by hashtag
- 🎥 [YouTube Live Stream Scraper](https://apify.com/easyapi/youtube-live-stream-scraper) - Scrape YouTube live streams and upcoming events
- 🌍 [YouTube Region Restriction Checker](https://apify.com/easyapi/youtube-region-restriction-checker) - Check YouTube video regional restrictions across 170+ countries

# Actor input Schema

## `queryTerm` (type: `string`):

Text to search in video subtitles

## `maxItems` (type: `integer`):

Maximum number of results to collect

## `videoTitle` (type: `string`):

Filter by video title

## `subtitleType` (type: `string`):

Type of subtitles to search

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

Filter by subtitle language

## `country` (type: `string`):

Filter by video country

## `category` (type: `string`):

Filter by video category

## `viewsRange` (type: `array`):

Min and max view count

## `likesRange` (type: `array`):

Min and max like count

## `durationRange` (type: `array`):

Min and max duration in seconds

## `dateRange` (type: `array`):

Upload date range \[start_date, end_date]

## Actor input object example

```json
{
  "queryTerm": "openai chatgpt",
  "maxItems": 100,
  "subtitleType": "manual",
  "language": "en",
  "country": "217",
  "category": "3",
  "viewsRange": [
    0,
    100000000
  ],
  "likesRange": [
    0,
    1000000
  ],
  "durationRange": [
    0,
    36000
  ],
  "dateRange": [
    "2020-01-01",
    "2024-12-31"
  ]
}
```

# 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("easyapi/youtube-subtitle-search-crawler").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("easyapi/youtube-subtitle-search-crawler").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 easyapi/youtube-subtitle-search-crawler --silent --output-dataset

```

## MCP server setup

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

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/Ymi7hY4sEMQP270dy/builds/JeuyN3xMedJqkesa6/openapi.json
