TechEarl

How to Download an Instagram Reel or Video with yt-dlp

Download an Instagram Reel or video free from the command line with yt-dlp. Instagram needs you logged in, so cookies are mandatory: how to pass them, keep them fresh, and grab reels, feed videos, IGTV, or just the audio.

Ishan Karunaratne⏱️ 8 min readUpdated
Share thisCopied
Download an Instagram Reel or video from the command line with yt-dlp using browser cookies, covering reels, feed videos, IGTV, and audio-only.

The free, reliable way to download an Instagram Reel or video in 2026 is yt-dlp, the open-source command-line downloader, no shady website, no ads, no upload limits. The one thing that is different from YouTube: Instagram almost always requires you to be logged in, so you have to hand yt-dlp your browser cookies. Paste a URL below, choose whether you want the video or the audio, and copy the command:

Build your yt-dlp command

Paste a Instagram URL, choose what to grab, and copy the command. It updates as you change the options.

Resolution is a maximum, not a guarantee. yt-dlp grabs the best quality at or below your pick, capped by what was actually uploaded. Choose 8K on a 720p video and you get 720p, not an error and not an upscale.

Your command
bash
yt-dlp --merge-output-format mp4 "https://www.instagram.com/reel/Cabcd1234ef/"

For Instagram the cookies are not optional the way they sometimes are elsewhere. Even public reels frequently return an empty result or an auth error unless the request carries a logged-in session, so every command on this page passes --cookies-from-browser. The rest of this page is the detail: which browser to pull cookies from, why they keep expiring, and how to cover reels, feed videos, IGTV, and audio.

Download only what you have the right to. Saving your own posts, content you have permission to use, or material the creator has released for reuse is fine; redownloading and redistributing someone else's reels is not, and bulk scraping violates Instagram's Terms of Service. This guide is for the legitimate cases. Respect the people who made the thing. What you do with the file is on you.

Cookies are mandatory

The core command is short. The catch is the --cookies-from-browser flag, which is doing the heavy lifting:

bash
# A reel or post video (cookies required: you must be logged in)
yt-dlp --cookies-from-browser firefox "https://www.instagram.com/reel/REEL_ID/"

Use Firefox, not Chrome. Since around July 2024, Chrome encrypts its cookie store with app-bound encryption, and external tools (yt-dlp included) can no longer read Chrome cookies on a running profile. Firefox's cookie store is still readable, so --cookies-from-browser firefox is the one that works reliably in 2026. Make sure you are actually logged in to Instagram in that Firefox profile first; yt-dlp reads the session cookie that the logged-in browser holds.

If you do not use Firefox at all, you can export a cookies.txt file with a browser extension and pass --cookies cookies.txt instead. But the live --cookies-from-browser firefox path is simpler and stays current automatically as long as you stay logged in.

One gotcha: if yt-dlp reports it cannot copy or read the cookie database (a "could not copy ... cookie database" or locked-database error), close the browser and run the command again. yt-dlp reads the cookie store from disk, and an open browser can hold a lock on it.

Keep the cookies fresh (the failure you will hit)

Instagram sessions expire fast, and this is the single most common reason a command that worked yesterday suddenly fails. If you get an HTTP 401, an "login required" error, or just an empty result with no download, your Instagram session cookie has gone stale.

The fix is to refresh it:

  1. Open instagram.com in Firefox.
  2. Confirm you are still logged in (Instagram logs you out more aggressively than most sites). Log back in if needed.
  3. Re-run the same yt-dlp command. It now reads the current cookie from the freshly authenticated session.

There is no flag that makes the cookie last longer; the lifetime is Instagram's to decide. When in doubt, re-authenticate in the browser and run again. If it still fails after fresh cookies, the next suspect is a stale yt-dlp (see below), not the cookies.

Reels, feed videos, and IGTV

The same command works across Instagram's video URL shapes, only the path segment changes:

  • Reels live on /reel/ URLs.
  • Feed videos (a video in a regular post) live on /p/ URLs.
  • IGTV clips live on legacy /tv/ URLs. Instagram retired the IGTV brand in 2022 and folded that video into the main app, so new uploads no longer get /tv/ links, but old /tv/ URLs still resolve and the extractor still handles them.
bash
yt-dlp --cookies-from-browser firefox "https://www.instagram.com/reel/REEL_ID/"
yt-dlp --cookies-from-browser firefox "https://www.instagram.com/p/POST_ID/"
yt-dlp --cookies-from-browser firefox "https://www.instagram.com/tv/IGTV_ID/"

There is no special flag to switch between them; yt-dlp's Instagram extractor reads the URL and figures out the type. A /p/ post that happens to be a photo carousel will return its images or videos as the extractor finds them.

Save it with a clean filename

By default the file is named with Instagram's internal ID, which is not memorable. An output template (-o) gives you something readable:

bash
# Clean filename
yt-dlp --cookies-from-browser firefox -o "%(uploader)s - %(id)s.%(ext)s" "URL"

%(uploader)s, %(id)s, and %(ext)s are output-template fields; there are dozens more (%(upload_date)s, %(title)s) for building a folder structure that suits your library. Keep %(id)s in there somewhere so two reels from the same account never collide on the same filename.

Just the audio

If it is only the sound you want (a reel's track, a voiceover), extract it directly instead of downloading the video and stripping it yourself:

bash
# Just the audio
yt-dlp --cookies-from-browser firefox -x --audio-format m4a "URL"

-x extracts audio; --audio-format m4a keeps the AAC track Instagram already serves without a quality-losing re-encode. This needs ffmpeg installed, the same dependency yt-dlp uses everywhere for muxing and conversion. If you do not have it yet, brew install ffmpeg, sudo apt install ffmpeg, or winget install Gyan.FFmpeg depending on your platform.

Keep yt-dlp updated (more important here than most)

Instagram is one of yt-dlp's more fragile extractors. Instagram changes its private API and page structure often, and when it does, the extractor breaks until a new release ships, which usually happens within days. So when an Instagram download suddenly fails and your cookies are fresh, update yt-dlp before anything else:

bash
yt-dlp -U                 # standalone binary self-update
pipx upgrade yt-dlp       # if installed via pipx
brew upgrade yt-dlp       # if installed via Homebrew

Running a months-old yt-dlp against Instagram is the second most common cause of failure after stale cookies. Between the two (fresh cookies, current binary), almost every "it stopped working" report is covered.

FAQ

See also

Sources

Authoritative references this article was fact-checked against.

Tagsyt-dlpInstagramreel downloadinstagram video downloaderCLIcookiesfree instagram downloader

Found this useful? Pass it on.

Copied

Ishan Karunaratne

Tech Architect · Software Engineer · AI/DevOps

Tech architect and software engineer with 20+ years building software, Linux systems, and DevOps infrastructure, and lately working AI into the stack. Currently Chief Technology Officer at a healthcare tech startup, which is where most of these field notes come from.

Keep reading

Related posts

How to Download a TikTok Video with yt-dlp

Download a TikTok video free from the command line with yt-dlp: no app, no sketchy site. yt-dlp pulls the source MP4 TikTok serves, follows short links, extracts audio, and uses your cookies for gated clips.

How to Download a Facebook Video with yt-dlp

Download a Facebook video free from the command line with yt-dlp: public watch links and fb.watch shorts need no cookies, private and group videos use --cookies-from-browser firefox, and you pick the resolution yourself.