Skip to main content
Glama

$ igdl https://www.instagram.com/p/DgIxT9JG6no/
✓ https://www.instagram.com/p/DgIxT9JG6no/  @instagram  8 file(s)
  downloads/instagram_DgIxT9JG6no_1.jpg
  downloads/instagram_DgIxT9JG6no_2.mp4
  downloads/instagram_DgIxT9JG6no_3.jpg
  …

Features

  • Everything in the post: single photos, reels, videos and mixed carousels, in carousel order.

  • Best quality: full-size original photos, and the best video merged with its audio.

  • Four ways to use it: a CLI, a Node library, an MCP server, and a Claude Code plugin with a ready-made skill.

  • Metadata: author, caption, date, likes, comments, and direct media links.

  • Low maintenance: Instagram access goes through yt-dlp. When Instagram changes something, run yt-dlp -U.

  • Your login, if you want it: read cookies from your own browser for private posts you can see.

Related MCP server: instagram-mcp

Quick start

pipx install yt-dlp                       # or: pip install -U yt-dlp
git clone https://github.com/bobobowis/igdl && cd igdl
npm install && npm link                   # puts `igdl` on your PATH

igdl https://www.instagram.com/reel/DgLBIFYxY4O/

CLI

igdl <url...> [-d <dir>]       download posts/reels/carousels   (default dir: ./downloads)
igdl info <url...>             print metadata + direct media links as JSON
igdl mcp                       run the MCP server on stdio

-d, --dir <dir>                download directory
-c, --cookies <browser>        use your Instagram login from firefox | chrome | edge | brave | …

Files are named <username>_<shortcode>[_<n>].<ext>.

Library

import { createClient } from 'igdl';

const ig = createClient();                         // or createClient({ cookiesFromBrowser: 'firefox' })

const post = await ig.resolve('https://www.instagram.com/p/DgIxT9JG6no/');
post.meta;   // { username, shortcode, caption, takenAt, likes, comments }
post.items;  // [{ index, type: 'image' | 'video', ext, width, height, url, headers, thumbnail }]

const { files } = await ig.download(url, { dir: './downloads' });

Direct urls point at Instagram's CDN and expire after a few hours. Send the given headers with them.

MCP server

igdl provides two tools to any MCP client:

Tool

What it does

instagram_info(url)

Returns metadata and direct photo/video links

instagram_download(url, dir?)

Saves every item and returns the file paths (default ~/Downloads/instagram)

Claude Code:

claude mcp add igdl -- node /path/to/igdl/src/launch.js

Claude Desktop, Cursor and others:

{
  "mcpServers": {
    "igdl": { "command": "node", "args": ["/path/to/igdl/src/launch.js"] }
  }
}

launch.js installs the npm dependencies on first run and warns you if yt-dlp is missing.

Claude Code plugin

Installs the MCP server plus an instagram-download skill, so Claude knows when and how to use it:

/plugin marketplace add bobobowis/igdl
/plugin install igdl@igdl

Then paste a link and ask "save this".

How it works

flowchart LR
  URL[Instagram URL] --> Y["yt-dlp -J<br/>(one request to Instagram)"]
  Y --> M[post metadata]
  M -->|videos| V["yt-dlp --load-info-json<br/>best video + audio"]
  M -->|photos| P["fetch full-size image<br/>(yt-dlp skips photos)"]
  V --> F[(files)]
  P --> F

yt-dlp handles Instagram access and its changes. igdl adds photo support, carousel ordering, consistent file names, and the library, MCP and skill layers on top.

Configuration

Variable

Default

Purpose

IGDL_COOKIES_FROM_BROWSER

none

Browser to read your Instagram login from

IGDL_DIR

~/Downloads/instagram

Default download dir for the MCP server

YTDLP_BIN

yt-dlp

Path to the yt-dlp binary

Troubleshooting

Message

Fix

yt-dlp is not installed

pipx install yt-dlp

post not found, private, or Instagram wants a login

The post is private or deleted, or logged-out access is being throttled. Try -c firefox.

rate limited by Instagram

Wait a few minutes. Logged-out access is limited per IP.

It worked yesterday

yt-dlp -U

Disclaimer

For personal use. Download only content you have the right to save, respect creators, and follow Instagram's Terms of Use. Not affiliated with Instagram or Meta.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      Provides Instagram analytics, media downloads, and search capabilities through an MCP interface for use with Claude and other MCP clients.
      43
      45
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server for downloading Instagram content (videos, reels, audio, carousels) using yt-dlp, with tools for downloading media and fetching metadata. Supports stdio and HTTP transports.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables MCP clients to retrieve read-only public Instagram data through 27 tools covering profiles, posts, reels, stories, highlights, comments, likers, followers, hashtags, places, audio and keyword search. No login is required, and every response reports remaining API credits.
      27
      1
      MIT