Skip to main content

instagram-archiver

Python versions PyPI - Version GitHub tag (with filter) License GitHub commits since latest release (by SemVer including pre-releases) CodeQL QA Tests Coverage Status Dependabot Documentation Status mypy uv pytest Ruff Downloads Stargazers pre-commit Prettier

@Tatsh Buy Me A Coffee Libera.Chat Mastodon Follow Patreon

Save Instagram content you have access to.

Installation

pip install instagram-archiver

Usage

Usage: instagram-archiver [OPTIONS] [USERNAME]

  Archive a profile (USERNAME) or your saved posts (--saved).

  Pass exactly one of: a USERNAME positional argument, or --saved/-s.

Options:
  -o, --output-dir DIRECTORY      Output directory. Defaults to the username
                                  (profile mode) or `.` (saved mode).
  -b, --browser [brave|chrome|chromium|edge|opera|vivaldi|firefox|safari]
                                  Browser to read cookies from.
  -p, --profile TEXT              Browser profile.
  -d, --debug                     Enable debug output.
  -q, --quiet                     Disable progress display updates.
  -S, --sleep-time INTEGER        Number of seconds yt-dlp waits between
                                  requests.
  --no-log                        Ignore log (re-fetch everything).
  -C, --include-comments          Also download all comments (extends download
                                  time significantly).
  -R, --include-child-comments    Also recursively download child (reply)
                                  comments. Implies --include-comments.
  -s, --saved                     Archive your saved posts instead of a
                                  profile (mutually exclusive with USERNAME).
  -u, --unsave                    Unsave posts after successful archive (only
                                  with --saved).
  -h, --help                      Show this message and exit.

Typical use:

instagram-archiver -o ~/instagram-backups/username username
instagram-archiver --saved -o ~/instagram-backups/saved

When neither --debug nor --quiet is passed, a Rich-based live progress display (provided by the archiver-stats library) is shown on stderr. Pass --quiet to disable it for non-interactive use, or --debug to see verbose log output instead.

Downloads run concurrently using niquests.AsyncSession and producer/consumer queues: one worker for media posts, one for comments (when -C is passed), and one for yt-dlp video downloads. Each worker handles at most one in-flight HTTP request at a time, which keeps Instagram rate-limiting at bay while still overlapping image downloads with yt-dlp.

The dedup log lives at <output_dir>/.log.db and is honoured across runs in both profile and --saved modes. Pass --no-log to bypass it and re-fetch everything.

Notes

The default output path is the username under the current working directory.

Videos are saved using yt-dlp and its respective configuration.

In profile mode, both image and video items in the user's highlights and currently-active stories are archived. Image story items go through the same media pipeline as posts, while video items are handed to yt-dlp.

Metadata

Release files for instagram-archiver 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for instagram-archiver 0.4.1
File Size Uploaded Provenance Actions
instagram_archiver-0.4.1.tar.gz 44.9 kB With provenance Details for instagram_archiver-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for instagram-archiver 0.4.1
File Interpreter ABI Platform Actions
instagram_archiver-0.4.1-py3-none-any.whl Python 3 none any Details for instagram_archiver-0.4.1-py3-none-any.whl

Total release size: 78.0 kB

Release files / instagram_archiver-0.4.1.tar.gz

Download URL instagram_archiver-0.4.1.tar.gz
Size 44.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d7476ccb1b597a147cfae7000dc94fa6f6112f499981dd195b3c5aa1da6368a0
BLAKE2b-256 checksum
How to use checksums
33ab9a172e407045ea35eb2c5e2607a9acc976cb6585cc43fcf79e65a3f06533
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 10, 2026.

Transparency log

Release files / instagram_archiver-0.4.1-py3-none-any.whl

Download URL instagram_archiver-0.4.1-py3-none-any.whl
Size 33.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18435ef4253350b9a95ba6b4af6d43218077815eab090241083a32328ad0449f
BLAKE2b-256 checksum
How to use checksums
5e1d54d5ce38c43ac0e0307d383e3e3431485f2a821fedbcfee0824e5727cb37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 10, 2026.

Transparency log

Security for instagram-archiver 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for instagram_archiver-0.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page