Skip to content
EN
Get API key

YouTube Video Download API

Bulk video downloads from YouTube to your cloud storage. Submit video IDs, choose MP4, audio or clips, and track delivery. FlashData handles bot checks, proxies and retries.

20 GB free trial · $0.10/GB PAYG · Volume pricing available

No credit card required.Trial details

API playground

API PLAYGROUND
API docs

YouTube Download API

Supports www.youtube.com links.

1Paste a link2Prepare3Play & save
VIDEO FILEVideo preview
Introducing the new iPhone Duo video thumbnail
Introducing the new iPhone DuoPrepare video to play it here.
FUfGcZ092b0.mp4

MP4

Select Prepare video to create a download.

See your first API request

YouTube errors handled

FlashData resolves YouTube 403s, bot checks and 429s internally with managed proxy routing and automatic recovery.

Near-unlimited download concurrency

Scale large video collections through FlashData's managed download infrastructure.

No cookies or proxies to maintain

FlashData manages YouTube access, sessions and proxy selection. Your team submits video IDs and receives delivered media.

FEATURES

Formats, clips and storage options.

Choose a format, quality and cloud storage destination for your media. Available quality depends on the source video.

YouTube download APIs: batch delivery to your own cloud storage

GET STARTED

From video ID to delivered file.

  1. 01

    Choose your file and destination

    Provide a video ID, choose video or audio and set your output preferences. Add a storage destination with permission to upload files.

  2. 02

    Submit and track the download

    Save the returned job ID to check progress. You can also set up a callback to notify your application when processing finishes.

  3. 03

    Use the delivered media

    When the job completes, open its results for the file location and metadata. Access the media using your cloud storage permissions.

Read the integration guideConnect your AI assistant with MCP
EXAMPLE REQUESTBackground download
Python 3.10+ · flashdata
python3 -m pip install -U flashdata
from flashdata import FlashData

with FlashData(api_key="your-flashdata-api-key") as client:
    job = client.youtube.download(
        "jNQXAC9IVRw",
        download_type="audio_video",
        output_format="mp4",
        video_quality="<=1080",
        storage={
            "storage_type": "s3",
            "storage_url": "your-media-bucket",
            "region": "us-east-1",
            "access_key": "your-storage-access-key",
            "secret_key": "your-storage-secret-key",
        },
    )
    print("Job ID:", job["id"])
    client.jobs.wait(job["id"], timeout=900)
    print(client.jobs.result(job["id"]))

Replace your-flashdata-api-key near the top of the example. Keep real keys out of source control. Replace the sample storage settings with your own. Use the returned job links to check progress and retrieve the results.

YouTube Video Download API — Python examples

BULK DOWNLOADS

Bulk video download, from list to cloud.

Prepare your video list here, then upload it in the console or run the Python example. One collection, shared output settings, files delivered to your storage.

View Python example

One 11-character video ID per line. UTF-8 text; duplicates are removed.

Unique videos: 3

video-ids.txtUTF-8

jNQXAC9IVRw
FUfGcZ092b0
dQw4w9WgXcQ
Start a bulk download
  1. 01

    Upload your video IDs

    One ID per line in a text file. Use the same output settings and storage destination for the collection.

  2. 02

    Track progress

    Downloads are submitted within your plan’s limits. You can pause new submissions while existing downloads continue.

  3. 03

    Retrieve your results

    Media files are delivered to your storage. Save the summary and individual results within 24 hours after the Bulk job completes.

Input files can be up to 2 GiB. Processing uses your plan’s capacity and available Credits.

Bulk download with Python

Save the ID file and this script in the same folder. Add your API key and storage settings, then run python3 bulk_download.py.

bulk_download.py
Python 3.10+ · flashdata
python3 -m pip install -U flashdata
import json
from pathlib import Path

from flashdata import FlashData

input_file = Path("video-ids.txt")
receipt = Path("bulk-job.json")

with FlashData(api_key="your-flashdata-api-key") as client:
    if receipt.exists():
        created = json.loads(receipt.read_text(encoding="utf-8"))
    else:
        if not input_file.is_file() or not input_file.stat().st_size:
            raise ValueError("Save a nonempty video-ids.txt first")
        # Reserve the receipt before submitting. Reruns reuse this job.
        with receipt.open("x", encoding="utf-8") as saved:
            created = client.bulk.create({
                "source": "youtube_download",
                "options": {
                    "download_type": "audio_video",
                    "output_format": "mp4",
                    "video_quality": "<=1080",
                    "storage": {
                        "storage_type": "s3",
                        "storage_url": "your-media-bucket",
                        "object_prefix": "bulk-videos/run-01",
                        "region": "us-east-1",
                        "access_key": "your-storage-access-key",
                        "secret_key": "your-storage-secret-key",
                    },
                },
            })
            json.dump(created, saved)

    bulk_id = created["job"]["id"]
    print("Bulk job:", bulk_id, flush=True)
    if client.bulk.get(bulk_id)["status"] == "awaiting_upload":
        client.bulk.upload_file(created, input_file)
        client.bulk.start(bulk_id)

    # A polling timeout leaves the job running. Rerun to keep watching it.
    job = client.bulk.wait(bulk_id, timeout=3600)
    manifest = client.bulk.manifest(bulk_id)
    Path("manifest.json").write_text(json.dumps(manifest, indent=2), encoding="utf-8")

    # Each row includes the video ID, outcome and delivery result or error.
    with Path("results.jsonl.tmp").open("w", encoding="utf-8") as output:
        for row in client.bulk.rows(bulk_id):
            output.write(json.dumps(row, ensure_ascii=False) + "\n")
    Path("results.jsonl.tmp").replace("results.jsonl")
    print("Saved manifest.json and results.jsonl. Counts:", job["counts"])

The script saves bulk-job.json and reuses that job when you run it again. Use a new folder for a new collection. Save the results within 24 hours of completion.

USE CASES

Media for your next processing step.

Multimodal datasets

Build media collections in your storage with optional companion metadata. Keep video IDs and file locations together for indexing, research and evaluation.

Transcription & audio analysis

Send audio-only files to your transcription, speech analysis or indexing tools. Choose the audio format your downstream service accepts.

Editing & content repurposing

Retrieve source videos or selected time ranges for your editing pipeline. Let FlashData handle retrieval and delivery while you build the experience around the media.

LESS INFRASTRUCTURE TO OPERATE

Move your downloader maintenance to FlashData.

YouTube-specific bot detection and challenge handling work with preselected residential proxy routes. Your team does not need to source or operate the proxies.

ResponsibilitySelf-managed yt-dlp workflowWith FlashData
YouTube 403s and bot checksUpdate yt-dlp, replace flagged IPs and maintain retries.FlashData resolves YouTube 403s, bot checks and 429s internally with managed proxy routing and automatic recovery.
YouTube 429 throttlingReduce request frequency and manage traffic across workers and IPs.Managed request routing and recovery
Cookies, sessions and proxiesObtain and renew cookies, select healthy proxies and replace blocked IPs.FlashData manages YouTube access, sessions and proxy selection. Your team submits video IDs and receives delivered media.
Concurrent downloadsProvision workers, bandwidth and proxy capacity as the collection grows.Near-unlimited download concurrency
Cloud deliveryOperate uploads and maintain the relationship between sources and files.Deliver to supported storage with per-video results and file locations.

COSTS THAT SCALE WITH YOUR WORKLOAD

Competitive rates. Pay by delivered media.

Start with pay as you go and discuss custom unit rates based on your usage volume, or choose a subscription with lower published download rates. Final usage follows the media bytes delivered; optional companion metadata JSON is excluded from download-volume charges.

Pay as you go

$0.10per GB delivered

$100.00 per TB delivered

No monthly subscription. Top up Credits as needed.

Volume pricing for pay as you go

Share your expected usage volume to discuss custom pay-as-you-go unit rates with our team.

Discuss volume pricing

Business

$0.04per GB delivered

$40.00 per TB delivered

$1,999.00 / month · subscription

Includes approximately 50 TB per billing period if all included Credits go to downloads.

Example: 100 GB delivered

$10.00 of Credits at the pay-as-you-go rate. File size determines download usage; video count alone does not.

Subscriptions include usage Credits shared across FlashData APIs. Usage covered by those Credits is not charged again. Your storage provider’s charges are separate. 1 TB = 1,000 GB.

FAQ

Frequently asked questions.

Contact support
How do I start my free trial?
Create an account and verify your email. Eligible accounts receive trial Credits automatically. View your balance in account overview. No credit card is required.
How is the trial allowance shared?
One shared trial balance covers Google Search, YouTube Data and downloads. This estimate uses current Pay as you go rates for this product. Downloads use the actual media size delivered. You need enough available Credits for the initial reservation; your storage provider’s charges are separate. Check your balance in the console.
What does the starting price require?

The starting usage rate is $40.00 per TB of delivered media on the Business plan. This rate requires a subscription costing $1,999.00 / month; the plan includes 40,000 Credits per billing period. Usage consumes Credits, and additional top-ups are charged separately. Credits are temporarily reserved when you submit a download. The final charge is based on the size of the delivered media. Optional metadata files are excluded from that charge.

Current prices and plan limits
What is FlashData's YouTube Download API?

FlashData's YouTube Download API delivers video, audio or clips to your configured cloud storage. Downloads run as async jobs, batches or file-based Bulk jobs. The API result describes uploaded files; media access uses your storage permissions. Usage is billed by delivered media bytes.

Read the reference
Who handles YouTube 403s, bot checks and 429s?

FlashData resolves YouTube 403s, bot checks and 429s internally with managed proxy routing and automatic recovery.

Do I need to provide cookies or proxies?

FlashData manages YouTube access, sessions and proxy selection. Your team submits video IDs and receives delivered media.

How many downloads can I run concurrently?

FlashData handles YouTube 403s, bot checks, session renewal and 429s internally. Run downloads at near-unlimited concurrency and receive media directly in your bucket.

Can I choose JSON, plain text or Markdown?

Yes. Download file details use JSON by default and also support plain text or Markdown. Media files keep your selected format, such as MP4 or MP3.

Read the reference
Can I download millions of videos?

Yes. Bulk supports collections of millions of YouTube video IDs. Upload a text file up to 2 GiB with one ID per line, choose your output and storage settings, and track the collection’s progress. Processing follows your plan’s limits and available Credits.

How is Bulk different from a regular batch?

A regular batch sends a list of requests together, up to your plan’s batch limit. Bulk starts from an uploaded file of video IDs and lets you track the collection, pause new work and retrieve results together. Use Bulk for larger collections.

Do I need my own cloud storage?

Yes. API downloads require a supported cloud storage destination with write access. Files remain under your storage permissions. The homepage demo lets you download a sample directly in your browser so you can try it before configuring storage.

Can I download a file in a realtime request?

No. Downloads run as async or batch tasks. Submit the request, then use the returned links to track the job and retrieve its result. You can also configure a completion callback.

Can I download YouTube videos as MP4 or audio as MP3?

Yes. Set params.output_format to mp4 for video. For MP3 audio, set params.download_type to audio and params.output_format to mp3. Use params.video_quality to select video resolution. Files are delivered to your configured cloud storage.

Read the reference
Can I download only part of a YouTube video with the API?

Yes. Set params.start_at and params.end_at in HH:MM:SS format, for example 00:01:00 to 00:02:30. Choose the output format and storage destination as usual. FlashData delivers the selected clip to your storage.

Read the reference
Can I receive a webhook when a YouTube download finishes?

Yes. Set callback_url on the download query, outside params, to a public HTTPS endpoint on port 443. For a batch, set it on each query. Follow the webhook guide to verify notifications and retrieve the completed job's result.

Read the reference
How long are files kept?

Your delivered media follows your own storage retention policy. FlashData’s task result is available for 24 hours after completion, so retrieve the result and save the file metadata you need.

Can I send downloads directly to Cloudflare R2?

Yes. Choose s3_compatible storage, supply your R2 bucket, access key and secret, use your R2 S3 endpoint, and set region to auto. The API uploads media to your bucket. Create signed URLs or use your storage SDK to access private objects.

Read the reference
How is using FlashData different from running yt-dlp myself?

FlashData manages downloads, retries, job tracking and delivery to your cloud storage. Running yt-dlp yourself gives you control over the tools and infrastructure, including FFmpeg, uploads and queues.

Read the reference

Try your first YouTube download.

Verify your email to receive trial Credits if eligible. No credit card required.

Guides

yt-dlp Guides and Troubleshooting