Comparison
yt-dlp vs cobalt
cobalt and yt-dlp are both good at downloading media, but they are different shapes. cobalt is a clean web UI you paste a link into; yt-dlp is a command-line tool you script. Most people who search “yt-dlp vs cobalt” are not choosing from scratch — their cobalt instance stopped working on YouTube, or they tried to use the public one in a project and hit a wall. Here is the honest version of what each tool is for and how to move between them.
The short version
- Reach for cobalt when you want a one-off download in the browser with nothing to install — paste a link, get a file. Its hosted UI is the easiest way to grab a single video for yourself.
- Reach for yt-dlp when you need a scriptable CLI, batch and scheduled runs, far wider site coverage, or fine control over format, quality, subtitles and output names.
- Neither public endpoint is a free API you can wire into an app, and self-hosting either one on a cloud server runs into the same YouTube blocking — more on both below.
Why you can't just point your app at api.cobalt.tools
This is the most common reason people end up here. cobalt has an API, but its own docs are explicit that the hosted instance is not a public backend for other projects. From cobalt's API documentation: hosted instances such as api.cobalt.tools“use bot protection and are not intended to be used in other projects without explicit permission,” and if you want to use the cobalt API you “should host your own instance or ask an instance owner for access.”
So the path cobalt points you to is running your own instance. That is a fine project for personal use, but it moves the whole job onto your own box — which is where the next problem shows up.
Self-hosting either tool hits the same wall on a server
Whether you self-host cobalt or run yt-dlp directly, once it is on a cloud server the hard part is not the downloader — it is the IP. YouTube and other platforms draw far more bot checks against datacenter IP ranges (AWS, GCP, Railway, Fly, Hetzner), so a setup that works on your laptop starts returning “Sign in to confirm you're not a bot” or HTTP 403 the moment it runs in the cloud. That is why so many “fix cobalt on YouTube” and “cobalt Railway template” threads exist — and it is the same failure yt-dlp users hit on a server.
The yt-dlp blocked on a server guide walks through the real options (cookies, residential IPs, running closer to a residential network), and they apply no matter which downloader is underneath.
The yt-dlp equivalents of what you use cobalt for
If you are switching because the cobalt UI stopped covering what you need, here are the direct yt-dlp commands for the things cobalt is usually used for. All of these run on current yt-dlp:
Download a video (best quality, like cobalt's default)
yt-dlp "https://www.youtube.com/watch?v=VIDEO_ID"Audio only as MP3 (cobalt's “audio” mode)
yt-dlp -x --audio-format mp3 "https://www.youtube.com/watch?v=VIDEO_ID"The MP3 conversion needs ffmpeg. The extract-audio guide covers quality and when to skip the conversion.
Cap the quality (cobalt's quality picker)
yt-dlp -S "res:1080,ext:mp4" "https://www.youtube.com/watch?v=VIDEO_ID"-S sorts formats by preference, so res:1080takes 1080p when it exists and the best below it when it doesn't. The format-selection guide goes deeper.
A whole playlist at once (cobalt does one link at a time)
yt-dlp -o "%(playlist_index)02d-%(title)s.%(ext)s" "PLAYLIST_URL"Batch and scheduled downloads are where a CLI pulls ahead of a one-link-at-a-time UI — see the playlists guide and automation guide.
Where cobalt is genuinely the better pick
This isn't a takedown — cobalt is a well-made project. If you want to grab one video for yourself without opening a terminal, its hosted UI is faster and friendlier than installing a CLI. It is open-source and self-hostable, so you can run a private instance for your own use. For occasional personal downloads, cobalt is a perfectly good answer.
yt-dlp pulls ahead when coverage and control matter: its extractor list runs to well over a thousand sites, and it exposes the format, subtitle, metadata and output options that a fixed UI can't. For a broader field, see the full yt-dlp alternatives comparison.
Servers & agents
Works on your laptop but not on the server?
Paste a link to see what a hosted API returns, running from servers and agent sandboxes where datacenter IPs get blocked — nothing to install or maintain on the box.
Running it on a server or in an agent?
If the reason you were hosting cobalt or yt-dlp was to download from inside an app, a cron job or an agent, the IP blocking above is the part that keeps breaking, not the downloader. That is the case Importly is built for: paste a URL, get the file, transcript and metadata back, running from servers and agent sandboxes where datacenter IPs get blocked — nothing to install or keep current on the box. The free tier is $3 of usage with no card.