yt-dlp Command Generator for Instagram
Build a yt-dlp command for Instagram posts and reels. Cookies are switched on by default because almost nothing works without them.
Instagram needs a session
Instagram serves very little to logged-out requests, so --cookies-from-browser is effectively mandatory rather than optional. Close the browser before running the command: Chrome and Edge lock their cookie database while open.
A carousel is exposed as a playlist, so set playlist handling to the whole playlist to get every item. Stories need a session that follows the account and disappear after 24 hours.
Instagram increasingly distrusts automated access, and a session that downloads too much too fast gets asked to log in again — the tell is a command that worked yesterday returning a login page today. Use a dedicated account rather than your main one, keep its cookies fresh by logging in normally now and then, and accept that an account used this way is occasionally flagged no matter how carefully the command is written. That is the cost of the platform, not a bug in yt-dlp.
Posts, reels and highlights resolve through the same extractor but show different things to different sessions. Reels from accounts you follow download fine; explore-page reels often refuse for a session that has never engaged with that content. Highlights — the story circles pinned to a profile — each come down as a playlist of their stories. IGTV is retired: old links sometimes still resolve, but nothing new uses it.
Instagram rate-limits harder than any other platform yt-dlp regularly faces. Parallel fragments make things worse, not better; one item at a time with pauses between runs is the pattern that survives. A multi-item run that fails halfway is normal — the archive file plus keep-going-on-errors turns the retry into a resumption instead of a restart, which matters because by the time the run finishes, the earliest items' CDN links have usually expired and a full re-run would re-fetch pages rather than media.
What cannot be recovered: posts from private accounts you do not follow, stories past their twenty-four hours, and anything deleted before you ran the command. CDN links inside a fetched page expire quickly, so a media URL that worked an hour ago may refuse now — re-fetch the post page rather than retrying the old link. That expiry is also the argument for downloading soon rather than eventually: Instagram makes no promise to keep media reachable, and it keeps it.