Skip to content
//YouTube Video Downloader example\\

Download audio as MP3 with subtitles, 1 video

Audio-only file plus the subtitle track.

Updated November 30, 2026

What this example returns

This example returns up to 1 video.

The dataset’s “Downloads” view shows 8 columns: Title, Input, File, Quality, Format, Seconds, File name, and Note. See every output field.

What each setting does

The input this example runs YouTube Video Downloader with. “Try this input” opens it in the console, where you can run it as-is or change any field first.

Video links videos

https://www.youtube.com/watch?v=kJQP7kiw5Fk

Public YouTube watch, share, shorts, or embed links.

Maximum videos maxVideos

10

How many links to download in this run.

Preferred quality preferredQuality

720p

Highest quality to download, at or below this size. A short video may only offer a lower size.

Preferred format preferredFormat

mp3

Container for the saved file. MP4 and MKV keep the original streams. Other formats are converted.

Default: mp4 → this example uses mp3

Save the file storeInKVStore

Yes

Save the file in this run's storage and add a download link to the dataset. Turn this off to return stream links only.

Name the file with filenameTemplateParts

title

Extra parts after the video id, separated by underscores. The name is shortened to 252 characters.

Subtitles transcriptionAndSubtitle

Download captions when the video has them

Attach YouTube's own captions when the video has them. Speech-to-text is not included.

Default: None → this example uses Download captions when the video has them

.json
{
  "videos": [
    {
      "url": "https://www.youtube.com/watch?v=kJQP7kiw5Fk"
    }
  ],
  "maxVideos": 10,
  "preferredFormat": "mp3",
  "transcriptionAndSubtitle": "ALWAYS_SUBTITLES",
  "preferredQuality": "720p",
  "storeInKVStore": true,
  "filenameTemplateParts": [
    "title"
  ]
}

What it costs

You pay for the events the actor reports, such as each result or page it produces. Platform usage is included in the event prices: compute, proxies, browser and storage cost nothing extra.

  • Video download of 1 MBfrom $0.0018Each megabyte of media downloaded, rounded up.

Full pricing

When to use this example

From the YouTube Video Downloader readme:

Can I use the API?

Yes. Start a run and read the dataset through the Scrape.ly API, CLI, or from AI agents through the Scrape.ly MCP server, then fetch each downloadedFileUrl.

Known limit

The default is 10 links per run; raise maxVideos to download more.

Other ways to run YouTube Video Downloader

All examples of YouTube Video Downloader

About YouTube Video Downloader

Download public YouTube videos as MP4, MP3, and other formats. Paste a video link, choose the quality, and the file is saved with the run.

Price:
From $1.80 / 1,000 video downloads of 1 mb
Developer:
Echofield
Categories:
Videos, Social media

YouTube Video Downloader pageOutput fieldsPricing

Related actors

//From the blog\\

Latest articles

All articles

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.