Youtube Video Subtitles Scraper

Youtube Video Subtitles Scraper

by scrapio

Extract clean subtitle text and timestamps from any YouTube video. Perfect for SEO, translation, accessibility, and content analysis at scale.

16 runs
2 users
Try This Actor

Opens on Apify.com

About Youtube Video Subtitles Scraper

Need the exact transcript from a YouTube video, not just what you can copy from the description? This actor gets it done. It pulls the full subtitle track—every word, with its corresponding timestamp—directly from any public YouTube video URL you give it. You'll get the plain text, the structured data with timing info, and you can see what languages and formats (like SRT or VTT) are available. I use this when I'm researching a topic and want to quickly search through what was actually said in a long lecture or interview, or when I need to localize content and the original subtitles are a great starting point. It's straightforward: point it at a video, and it fetches the captions. This is super handy for SEO folks looking to repurpose video content into blog posts, for teams improving video accessibility, or for anyone who needs to analyze trends or sentiments across a whole playlist or channel without watching hours of footage. It runs on Apify, so you can automate it to handle large batches of videos without manual work.

What does this actor do?

Youtube Video Subtitles Scraper is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.

Key Features

  • Cloud-based execution - no local setup required
  • Scalable infrastructure for large-scale operations
  • API access for integration with your applications
  • Built-in proxy rotation and anti-blocking measures
  • Scheduled runs and webhooks for automation

How to Use

  1. Click "Try This Actor" to open it on Apify
  2. Create a free Apify account if you don't have one
  3. Configure the input parameters as needed
  4. Run the actor and download your results

Documentation

YouTube Video Subtitles Scraper

Extracts subtitles and metadata from public YouTube videos. Outputs structured data (JSON, CSV, Excel) suitable for analysis, AI training, or integration into other workflows.

Overview

This actor scrapes captions from YouTube videos. For each video, it retrieves:
* Subtitle text with start timestamps and duration.
* Video metadata: title, description, author, tags, length, and URL.
* Caption language and type (auto-generated or manual).

It runs on the Apify platform, requiring no local setup. You can run it via the web interface or integrate it programmatically using the Apify API or client libraries (e.g., apify-client for Python).

Key Features

  • Extracts Both Caption Types: Supports both manual (user-provided) and auto-generated (ASR) subtitles.
  • Structured Output: Returns clean data with timestamps, text, and video info.
  • Multiple Export Formats: Results can be downloaded as JSON, CSV, XLSX, or HTML.
  • Bulk Processing: Can handle multiple video URLs in a single run.
  • Developer Integration: Easy to automate using the Apify API, CLI, or SDKs (Python, Node.js).
  • Language Handling: Captions are extracted in their available languages.

How to Use

Via Apify Console (Web Interface)

  1. Go to the actor's page on the Apify Store: YouTube Video Subtitles Scraper.
  2. Click "Try for free" or "Start".
  3. In the Input tab, configure your run:
    • Paste one or more YouTube video URLs into the videoURLs field.
    • (Optional) Adjust other parameters like language or includeAutoGenerated.
  4. Click "Start".
  5. Once finished, download your dataset from the "Dataset" tab in your preferred format.

Via API/CLI (Programmatic)

Use the Apify API or a client to run the actor. Here's a basic example using the Python client (pip install apify-client):

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "videoURLs": ["https://www.youtube.com/watch?v=EXAMPLE"],
    "language": "en",
    "includeAutoGenerated": True,
}

run = client.actor("actor_id").call(run_input=run_input)

# Fetch results
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

Input / Output

Input Configuration

The actor accepts a JSON object with these key parameters:

  • videoURLs (Array, Required): List of YouTube video URLs.
  • language (String, Optional): Preferred language code (e.g., 'en', 'es'). Defaults to the video's primary language.
  • includeAutoGenerated (Boolean, Optional): If true, includes auto-generated (ASR) captions when manual ones are unavailable. Default is true.

Example input:

{
  "videoURLs": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/watch?v=EXAMPLE2"
  ],
  "language": "en"
}

Output Data

The dataset contains an item for each video. Each item includes the video's metadata and an array of its subtitles.

Example output structure (JSON):

{
  "videoUrl": "https://www.youtube.com/watch?v=EXAMPLE",
  "videoTitle": "Example Video Title",
  "videoDescription": "Full video description...",
  "author": "Channel Name",
  "length": "10:30",
  "tags": ["tag1", "tag2"],
  "subtitles": [
    {
      "text": "This is the first subtitle line.",
      "start": "0:00:01.500",
      "duration": "3.0s",
      "language": "en"
    },
    {
      "text": "This is the second one.",
      "start": "0:00:05.000",
      "duration": "2.5s",
      "language": "en"
    }
  ]
}

Common Use Cases

Market Research

Gather competitive intelligence and market data

Lead Generation

Extract contact information for sales outreach

Price Monitoring

Track competitor pricing and product changes

Content Aggregation

Collect and organize content from multiple sources

Ready to Get Started?

Try Youtube Video Subtitles Scraper now on Apify. Free tier available with no credit card required.

Start Free Trial

Actor Information

Developer
scrapio
Pricing
Paid
Total Runs
16
Active Users
2
Apify Platform

Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.

Learn more about Apify

Need Professional Help?

Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.

Find a Specialist

Trusted by millions | Money-back guarantee | 24/7 Support