Skip to main content

instagram-offline Python package Vibe coded

Downloads all videos and reels of one or more Instagram accounts and builds a self-contained static site in site/, one folder per account.

How it works

Instagram rejects scripted API clients (Instaloader, gallery-dl, yt-dlp) while a real browser session works fine. The downloader therefore drives a logged-in Chromium-based browser over the DevTools protocol: it scrolls the profile grid, harvests the post data Instagram sends to the page, and downloads the files from Instagram's CDN. Collaboration posts owned by another account are included. Re-runs only fetch new posts.

Usage

uvx instagram-offline USERNAME
python -m http.server -d site

From a checkout, uv run insta USERNAME does the same.

Log in to Instagram in the browser window on the first run.

Any Chromium-based browser works: Chromium, Chrome, Brave, Edge, Vivaldi or Opera are found automatically on Linux, macOS and Windows; --browser EXECUTABLE selects one explicitly, and a Chromium-based browser in the conventional $BROWSER variable is preferred over the search. Without any, Playwright's own Chromium is downloaded on first use. Firefox and Safari are not supported, as they lack the DevTools protocol the tool relies on.

An optional site/USERNAME/profile.json with an about text and a list of topics (name plus caption keywords) adds an "About" box to the overview and topic filters to the account page. Keywords match at the start of a word; a trailing space makes a keyword match whole words only.

Versioning the content

site/ is ignored by this repository. To track changes of the archive, keep it as a separate, private Git repository that ignores the video files and versions only the metadata, index and HTML pages:

cd site
git init
printf '*.mp4\n*.part\n' > .gitignore
git add .
git commit -m "Add archive"

After each download run, commit the changes in site/.

Legal notice

This project is not affiliated with, endorsed by or connected to Instagram or Meta Platforms, Inc. in any way. This software is provided for research and educational purposes only. Downloading content from Instagram in an automated way, in particular with a logged-in account, may violate Instagram's Terms of Use and Meta's platform policies and may result in restrictions or termination of the account used. All downloaded content remains the intellectual property of its respective creators and rights holders. Whether making a copy for private use is permitted depends on the copyright law of your jurisdiction; distributing, publishing or otherwise making the downloaded content or the generated website available to the public without the rights holders' permission constitutes copyright infringement and may violate personality, image and data-protection rights.

You are solely responsible for ensuring that your use of this software complies with all applicable laws, regulations and contractual terms. The authors and contributors accept no liability for any claims, damages or other liability arising from the use of this software or the content obtained with it. Nothing in this document constitutes legal advice.

Licensed under the GNU General Public License v3.0 or later, see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

instagram_offline-0.2.0.tar.gz (93.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

instagram_offline-0.2.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file instagram_offline-0.2.0.tar.gz.

File metadata

  • Download URL: instagram_offline-0.2.0.tar.gz
  • Upload date:
  • Size: 93.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for instagram_offline-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4fbfc2ad5c9a45b4852e06d463bfe8e13a4d108caebf78b7f54462c33bf50be0
MD5 2f63a3d39424536ee24f12f3868bd64c
BLAKE2b-256 ea52daf260eaa8a3dc63547a7b9bd58c0c701827aba9d2e0a4bf4ba2a6eec45f

See more details on using hashes here.

Provenance

The following attestation bundles were made for instagram_offline-0.2.0.tar.gz:

Publisher: release.yml on bittner/instagram-offline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file instagram_offline-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for instagram_offline-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b6e06b39bbda2e7a9784d19f4c5c7b6a00ff50fb53a0165c6eb7b092e167535
MD5 2de823be97217a87ae776889ed467130
BLAKE2b-256 4726a3504646c368a94bd77f2c28c9e42b4d74f824cc662d0cd69ca9f56d751a

See more details on using hashes here.

Provenance

The following attestation bundles were made for instagram_offline-0.2.0-py3-none-any.whl:

Publisher: release.yml on bittner/instagram-offline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

This release

0.2.0 This release

2 files

0.1.0

2 files

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