Video Downloader: YouTube, TikTok, Instagram, X avatar

Video Downloader: YouTube, TikTok, Instagram, X

Pricing

from $3.50 / 1,000 downloaded files

Go to Apify Store
Video Downloader: YouTube, TikTok, Instagram, X

Video Downloader: YouTube, TikTok, Instagram, X

Bulk video downloader for YouTube, TikTok, Instagram, X, Facebook, Pinterest and 1,100+ sites. Save MP4, MP3 or images, up to 4K, via API.

Pricing

from $3.50 / 1,000 downloaded files

Rating

0.0

(0)

Developer

Web Harvester

Web Harvester

Maintained by Community

Actor stats

0

Bookmarked

14

Total users

9

Monthly active users

13 days ago

Last modified

Categories

Features

Limited permissions

Share

Download videos, audio, images and GIFs from YouTube, X, Instagram, TikTok, Pinterest and 1,100+ other sites. Paste links, pick a quality or audio format, and get the files back with a download link for each one.

You pay only for files that were downloaded: failed links are free.

What it does

  • Takes a list of links to posts, videos, tracks, galleries or direct media files.
  • Downloads the media at the quality you choose, or extracts only the audio (mp3, ogg, wav, opus) or only the video.
  • Stores every file in the run's key-value store and adds one dataset row per file with its download link, size, duration, resolution, title and author.
  • Reports links that can't be downloaded as failed rows with a plain-language reason, so you know what to fix (proxy, cookies, private post).

How to use it

  1. Add one or more links under Media URLs. You can also upload a text file of links or point to one online.
  2. Pick the Download mode and Video quality (1080p is a good default).
  3. For YouTube, Instagram, TikTok and Facebook, set the Proxy to residential. These sites block datacenter IPs.
  4. Click Start. When the run finishes, open the Files view and click a Download link, or fetch the files through the API.

Cost

You pay two parts:

  • Per file: a fixed price for each file stored (shown on the Pricing tab). Failed links are free.
  • Platform usage: the compute, proxy traffic and storage the run uses. Proxy traffic is the largest part for big files, especially residential, so keep the quality at 1080p or lower unless you need more. With a proxy set, files are downloaded without it when the site allows (see Download files without the proxy when possible), which cuts proxy traffic a lot.

Set a maximum cost per run to cap spending. The Actor stops starting new links when the limit is reached.

FAQ

Why did a link fail with "blocked"? The site refused the request. Use residential proxies, and for Instagram, X, TikTok or Facebook add log-in cookies (see Tips below). Reddit links always need the Reddit credentials.

Can it download private or paid content? Only what your cookies give access to. Paid content is never downloaded.

Can it download playlists or galleries? Yes. Up to Max items per URL items are downloaded from one link.

Is it legal? Download only content you own or have permission to use, and follow each site's terms of service.

Supported sites

The Actor downloads from 1,100+ sites (full list below). These 21 have dedicated support:

SiteDownloads
YouTubevideos, shorts, music
Twitter / Xvideos, GIFs, images
Instagramposts, reels, stories
TikTokvideos, photo posts
Blueskyvideos, images
Redditvideos, images, galleries
Pinterestpins, videos
Tumblrvideos, audio, images
Snapchatspotlight, stories
Facebookvideos, reels
SoundCloudtracks
Vimeovideos
Bilibilivideos
Dailymotionvideos
Loomrecordings
Newgroundsvideos, audio
OK.ruvideos
Rutubevideos
Streamablevideos
Twitchclips
VKclips

It also handles many image sites and direct links to media files (any URL that points straight at a video, audio or image file).

Input

TitleKeyDefaultDescription
Media URLsstartUrlsnoneLinks to posts, videos, tracks or direct media files. Dedicated support for YouTube, X/Twitter, Instagram, TikTok, Facebook, Reddit, Bluesky, Pinterest, Tumblr, Snapchat, SoundCloud, Vimeo, Bilibili, Dailymotion, Loom, Newgrounds, OK.ru, Rutube, Streamable, Twitch clips and VK clips. 1,100+ sites in total (full list in the README), plus many image sites and any direct link to a media file.
Download modedownloadMode"auto"What to save: the full video, only the sound, or the video without sound. Values: auto, audio, mute.
Video qualityvideoQuality"1080"Target resolution, based on the shorter side of the video. If it isn't available, the closest one is used. 1080p is recommended: higher qualities make files several times larger, which costs much more proxy traffic (especially residential), time and storage. Values: max, 4320, 2160, 1440, 1080, 720, 480, 360, 240, 144.
Audio formataudioFormat"mp3"File type for audio downloads. "best" keeps the original audio without re-encoding. Values: best, mp3, ogg, wav, opus.
Audio bitrate (kbps)audioBitrate"128"Audio quality in kbps. Only used when audio has to be re-encoded. Values: 320, 256, 128, 96, 64, 8.
Filename stylefilenameStyle"basic"How output files are named. Example for a YouTube video with title "Me at the zoo" by "jawed": classic = youtube_jNQXAC9IVRw_1920x1080_h264.mp4; basic = Me at the zoo - jawed (1080p, h264).mp4; pretty = Me at the zoo - jawed (1080p, h264, youtube).mp4; nerdy = Me at the zoo - jawed (1080p, h264, youtube, jNQXAC9IVRw).mp4. Values: classic, basic, pretty, nerdy.
Preferred video codecyoutubeVideoCodec"h264"h264 works everywhere. av1 and vp9 give better quality for the file size. Applies to YouTube and most other video sites. Values: h264, av1, vp9.
Video containeryoutubeVideoContainer"auto"File type for videos. "auto" gives mp4 for h264 and webm for vp9 and av1. Applies to YouTube and most other video sites. Values: auto, mp4, webm, mkv.
Preferred dubbed audio languageyoutubeDubLangnoneTwo-letter language code (for example en, es, de). Picks the dubbed audio track in that language when one exists. Leave empty for the original audio.
Prefer higher-quality YouTube audioyoutubeBetterAudiofalsePicks the highest-bitrate audio track whatever its format. The file may end up as mkv or webm.
YouTube PO-token server URLyoutubePoTokenServerUrlnoneAddress of a small helper server that generates YouTube proof-of-origin tokens. Use it when YouTube answers "Sign in to confirm you're not a bot"
Subtitle languagesubtitleLangnoneTwo-letter language code (for example en). Embeds subtitles in that language when the site offers them. Leave empty for none.
Convert GIF videos to .gifconvertGiftrueX and Bluesky "GIFs" are really short videos. Turn this on to save them as real .gif files.
Allow H.265 (TikTok)allowH265falseAllow H.265 (HEVC) videos from TikTok. They are smaller but some players can't open them.
TikTok original soundtiktokFullAudiofalseIn audio mode, save the original sound used in the TikTok instead of the video's soundtrack.
Disable metadatadisableMetadatafalseDon't write title, artist and cover art into the files.
Max items per URLmaxItemsPerUrl50Maximum number of items to download from one URL that holds several, such as a carousel, gallery or playlist.
Max media duration (seconds)maxDurationSeconds10800Longer videos are skipped and reported as failed. Default 10800 = 3 hours.
Max file size (MB)maxFileSizeMb2048Larger files are skipped and reported as failed. For files over about 1 GB, raise the run's memory (disk space is 2× memory).
ProxyproxyConfiguration{"useApifyProxy": true}Required: the Actor does not run without a proxy. Apify Proxy (datacenter) is enough for many sites. Residential proxies are recommended for YouTube, Instagram, TikTok and Facebook.
Download files without the proxy when possibledirectDownloadtrueThe proxy is still used to open the page and find the media. The file itself is downloaded directly, which is faster and uses much less proxy traffic. If a site refuses the direct download, the proxy is used instead. Turn this off to send everything through the proxy.
CookiescookiesnoneOptional. Log-in cookies for each service, keyed by service name: instagram, instagram_bearer, twitter, reddit, youtube, vimeo_bearer, facebook, tiktok. Normal keys take a browser cookie string, "name=value; name2=value2". instagram_bearer takes token=<token>. vimeo_bearer takes access_token=<token>. See the README for how to export cookies. Each service's cookies are only sent to that service.

Only startUrls is required.

Output

Each processed URL adds one dataset row per stored file (or one failure row). The Files view shows a preview, title, download link, readable size and, for failed links, why they failed. The files are in the key-value store under storeKey. If none of the links could be downloaded, the run ends with status Failed; otherwise it succeeds and the status message gives the totals.

Success row:

{
"url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"resolvedUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"service": "youtube",
"serviceName": "YouTube",
"engine": "extractor",
"attempts": [
{
"engine": "extractor",
"result": "ok"
}
],
"status": "ok",
"downloaded": true,
"mediaType": "video",
"index": 1,
"fileName": "Me at the zoo - jawed (240p, h264).mp4",
"fileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/<storeKey>",
"storeKey": "media-Me-at-the-zoo---jawed-(240p-h264)-d9068d49.mp4",
"contentType": "video/mp4",
"sizeBytes": 745938,
"fileSize": "728.5 KB",
"downloadSeconds": 9.4,
"durationSeconds": 19.064,
"width": 320,
"height": 240,
"title": "Me at the zoo",
"author": "jawed",
"thumbnailUrl": "https://i.ytimg.com/vi/<id>/hqdefault.jpg",
"sourceUrl": null,
"direct": true
}

Failure row:

{
"url": "https://example.com/",
"resolvedUrl": "https://example.com/",
"service": "example",
"serviceName": "example.com",
"attempts": [
{
"engine": "extractor",
"result": "link.unsupported"
},
{
"engine": "gallery",
"result": "link.unsupported"
},
{
"engine": "page-scan",
"result": "fetch.empty"
}
],
"status": "failed",
"downloaded": false,
"errorMessage": "Couldn't find any downloadable media at this link. Details: no media found on the page.",
"error": {
"code": "fetch.empty",
"message": "Couldn't find any downloadable media at this link. Details: no media found on the page."
}
}

Tips

  • Proxy: a proxy is required; a run with no proxy stops right away. Use a residential proxy for YouTube, Instagram, TikTok and Facebook. These sites block datacenter IPs. The proxy is only used to find the media; files are downloaded without it when the site allows, and the direct field of each result row tells you which way a file came. Each link, and each retry of a link, uses its own proxy session.
  • Cookies: pass cookies per service as a string of the form "name=value; name2=value2", for example {"instagram": "sessionid=abc; csrftoken=def"}. Export them from a logged-in browser session (the browser dev tools show them under Application > Cookies, or use a cookie export extension and join the pairs). instagram_bearer takes token=<token> and vimeo_bearer takes access_token=<token>. A service's cookies are only sent to that service.
    • vimeo_bearer takes a Vimeo API token as access_token=<token>. It is optional; Vimeo works without it.
    • reddit takes Reddit OAuth app credentials as client_id=<id>; client_secret=<secret>; refresh_token=<token>. The Actor refreshes the access token itself. Reddit links need these credentials to download.
  • youtubePoTokenServerUrl: the address of a helper server that generates YouTube proof-of-origin tokens. YouTube sometimes demands one ("Sign in to confirm you're not a bot"); the server supplies it. Leave empty unless you see that error.
  • Memory and disk: the run's disk is 2x its memory. The largest single file is limited by maxFileSizeMb; raise the Actor memory if you need bigger files. Downloads of unknown size reserve about 0.5 GB of disk each while running (videos that need merging can reserve up to twice that), so a few can run in parallel.

Credits and license

  • Media extraction logic ported from cobalt (https://github.com/imputnet/cobalt), AGPL-3.0.
  • Uses yt-dlp (Unlicense), gallery-dl (GPL-2.0, run as a separate program) and FFmpeg.
  • This Actor is licensed under AGPL-3.0; see LICENSE.