Both tools are free command-line downloaders, and both can pull your Instagram posts to disk. They differ in how you log in, how they pace requests, and how much metadata you get. Neither one restores anything back into Instagram.

Short answer

If Instagram is all you need, Instaloader is the more focused fit. If you already use gallery-dl for other sites, it covers Instagram with a broad feature list too. On account risk, the sources we found document behavior mostly for Instaloader and give no gallery-dl-specific ban evidence, so any risk comparison between the two is an inference.

Don't want to babysit a script, a session file or cookies? SocialGuardian only needs your public @handle - no password, no login. Start a 30-day free trial

Side-by-side comparison

Instaloader gallery-dl
Install pip3 install instaloader; MIT-licensed python -m pip install -U gallery-dl, plus standalone executables, Snap, Chocolatey, Scoop, Homebrew, MacPorts, Docker, Nix; GPL-2.0
Basic command instaloader profile [profile ...] gallery-dl [OPTIONS]... URLS...
Login method --login USERNAME saves a session cookie, not your password Cookies (cookies.txt, or from a browser)
Anonymous use Public profiles work without login Not stated: the supported-sites table lists the Instagram authentication method as "Cookies" and says nothing about anonymous runs
Request pacing Own rate controller sleep-request "6.0-12.0" seconds by default
Incremental updates --fast-update, --latest-stamps archive option (off by default); skip defaults to true
Extra metadata JSON per post plus caption text files metadata is false by default (opt-in)

Setup and first run

Instaloader

  1. With Python installed, run pip3 install instaloader.
  2. Run instaloader profile [profile ...].

Both steps come from the Instaloader homepage.

gallery-dl

  1. Install with python -m pip install -U gallery-dl. It requires Python 3.8+ and Requests (standalone executables also exist).
  2. Call it with the URLs you want: gallery-dl [OPTIONS]... URLS....
  3. Configuration is a JSON file, searched in places like ~/.config/gallery-dl/config.json or %APPDATA%\gallery-dl\config.json, per the project README.

Login and account risk

Does Instaloader need a login? Not for public profiles. Hashtags, locations, :stories, :feed, :saved, and --stories/--highlights/--comments/--geotags require login, and you need to follow a private account to access most of its information.

To log in, pass --login YOUR-USERNAME. Your session cookie, not your password, is saved to a local file (default ~/.config/instaloader/session-YOUR-USERNAME). Alternatively, --load-cookies BROWSER imports a session from a browser such as Chrome, Firefox or Safari. Passing --password on the command line is discouraged.

Instaloader's docs say users reported login problems in several issues. They recommend always keeping the session file, because with a session file present --login skips the failure-prone login procedure.

Does gallery-dl need a login? Its supported-sites table lists Instagram with the authentication method Cookies. The README shows two ways: set extractor.instagram.cookies to a cookies.txt path, or run gallery-dl --cookies-from-browser firefox "URL". The sources we found do not say whether gallery-dl can fetch Instagram anonymously.

Can either get your account banned? The projects publish no ban-rate figures, so we won't invent one. What is documented:

No source we found gives gallery-dl-specific evidence about bans. Our practical rule is therefore an inference, not a documented finding: any logged-in or cookie-based run ties the tool's behavior to your real account, and that includes gallery-dl's cookie login.

Rate limits and 429 errors

Instaloader keeps its own rate controller. It assumes it is the only consumer of requests, so restarting it often within a short time is prone to cause a 429. When a request gets a 429, it retries once the temporary ban is assumed expired. --max-connection-attempts defaults to 3, and --abort-on=302,400,429 makes it stop on those responses instead. "Too many queries in the last time" is a notice, not an error.

To avoid 429s with Instaloader:

  1. Run one instance at a time, and avoid restarting it repeatedly.
  2. Keep the session file so logins aren't repeated.
  3. Consider --abort-on if you'd rather stop than retry.

gallery-dl takes a simpler approach. Its default Instagram config sleeps 6.0-12.0 seconds between requests, with a general sleep-429 of 60 seconds and 4 retries.

Even with pacing, one WFDownloader blog warns that queuing a large list of Instagram accounts could earn a block.

Stories, highlights and other content

Keeping the archive updated

Instaloader: --fast-update stops at the first already-downloaded picture. --latest-stamps stores the time each profile was last downloaded and fetches only newer media, so you can move or delete downloaded media and still keep the archive updated.

To schedule it as a cronjob, create a session with instaloader --login=your_username, then run instaloader --login=your_username --quiet target. Exit code 4 is a fatal download error, 3 a login error and 1 a non-fatal error.

gallery-dl: the archive option is null by default, so you set an archive file to skip already-downloaded files; skip defaults to true.

Instaloader also needs maintenance: its release history shows fix cycles tied to Instagram changes. v4.15.1 migrated to new GraphQL endpoints, and v4.16 fixed Profile.get_posts() both logged in and not logged in.

Can you restore from either backup?

Not into Instagram. Instaloader saves a JSON metadata file per post (xz-compressed by default) plus captions, and gallery-dl saves files into a local ./gallery-dl/ base directory by default. Their documentation describes downloading, not re-uploading or rebuilding an account. That is our reading of their feature lists, not a statement from either project. What you hold afterwards is a folder of files you must store, back up and organize yourself.

When a managed backup is the safer choice

Pick a managed tool when:

  • You don't want to hand over a session cookie for your real account, which Instaloader needs for stories and private content and gallery-dl lists as its Instagram authentication method.
  • You want it to run daily without a cron job, session file or a breakage after an Instagram change.
  • You need something closer to restore than a folder of files.

SocialGuardian asks for just your @handle - no password, no login. It archives posts, photos, videos, reels, stories, captions and metadata, plus follower and following lists and engagement, with backups running automatically every day and an archive you can export anytime with no lock-in. The three steps are share your handle, let it archive, then download or restore in one click.

Keep the command line for experiments and let a managed backup protect the account that matters. Start your 30-day free trial - no password

FAQ