YouTube Transcript API avatar

YouTube Transcript API

Try for free

3 days trial then $19.00/month - No credit card required now

Go to Store
YouTube Transcript API

YouTube Transcript API

novi/youtube-transcript-api
Try for free

3 days trial then $19.00/month - No credit card required now

Need to grab the words from YouTube videos? YouTube Transcript API is here to help! It's easy to use and gets the job done, plus it gives you some extra info too. Go ahead and try it!

This Actor extracts the transcript from a YouTube video.

Usage

How to Run the Actor

  1. Go to the Apify platform (https://apify.com) and log in or sign up for an account.
  2. Create a new task and select the "YouTube Transcript API".
  3. Configure the input by providing the YouTube Video URL. You can also provide additional options, as described in the Input schema.
  4. Start the task, and the actor will begin extracting the transcript.

How to Interpret the Actor's Results

The actor will provide you with the extracted transcript and other metadata in JSON format. The structure of the output is described in the Output schema. You can use this data for analysis, content optimization, or any other purpose that suits your needs.

Input Schema

The input should be a JSON object with the following properties:

  • video_urls: An array of URLs. Currently, only the first URL is used, and it should be a YouTube video URL. For example: ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"] (Required)

  • language: (Optional) The desired language of the transcript. If not specified, the actor will attempt to detect the language automatically. Specify as a two-letter language code (e.g., "en", "es", "fr"). This is helpful for auto-generated captions, as they often don't have the language specified in the metadata.

Output Schema

The output is a JSON object with the following properties:

  • videoId: The name of the YouTube channel.
  • transcripts: List of transcript data of the video.

Transcript Item

1[
2    {
3        "text": "ever since computers were invented",
4        "start": 5.839,
5        "duration": 3.121
6    },
7    {
8        "text": "they've really just been glorified",
9        "start": 7.52,
10        "duration": 3.92
11    }
12]

Examples of Usage

Example 1: Extract Transcript from a YouTube Video

Input:

1{
2  "language": "en",
3  "proxyConfiguration": {
4    "useApifyProxy": true,
5    "apifyProxyGroups": [
6      "RESIDENTIAL"
7    ]
8  },
9  "video_urls": [
10    "https://www.youtube.com/watch?v=2IK3DFHRFfw",
11    "qYNweeDHiyU"
12  ]
13}
Developer
Maintained by Community

Actor Metrics

  • 5 monthly users

  • 0 No bookmarks yet

  • >99% runs succeeded

  • Created in Feb 2025

  • Modified 13 days ago