InstaLoader
Download pictures or videos (with metadata) from Instagram.
URL
https://instaloader.github.io v4.14.2 (2025‑07‑18), last checked Oct. 31st 2025
Usage may lead to the loss of the Instagram account being used. Please see Limitations and Ethical Considerations before using this tool.
Description
Instaloader lets you save Instagram content for documentation and analysis. It can download posts, videos, Stories, Highlights, Reels, and profile pictures. It also exports captions, timestamps, and geotags so you keep context with the media. Investigators typically use it to archive a profile, collect evidence before takedowns, or fetch posts for later review. Logged-in mode provides access to your feed, saved posts, and followed accounts, where permitted. You can run it from the command line or script it in Python. It supports resuming interrupted downloads and only grabs new items to keep an archive up to date.
Media Downloading:
Downloads photos and videos from public and private Instagram profiles, hashtags, Stories, feeds, saved media, long-form videos (formerly IGTV), and Reels (
--reelsflag).It captures metadata, including captions, comments, geotags (such as Google Maps links), timestamps, and more.
Allows downloading from private profiles if you follow the account or provide valid credentials.
Offers optional parameters to limit downloads (e.g., specific sidecar slides, date ranges, post filters).
Automation and Customization:
Automatically detects profile name changes and renames the target directory accordingly.
It supports resuming downloads from previously interrupted sessions, both at the command-line level (JSON resume files) and via the Python API.
Offers fine-grained control over what to download through various filters (e.g., specific date ranges, post types) and customization of directory and filename patterns.
Can be configured for automated tasks (e.g., cron jobs) using
--quietmode and persistent session files.
Key Features
Targeted Content Retrieval:
Profiles: Download posts, profile pictures, tagged posts, reels, long-form videos (formerly IGTV, stories, and highlights.
Hashtags and Locations: Fetch posts associated with specific hashtags or geographical locations (requires login for location-based queries).
User Feed and Saved Posts: For logged-in accounts, retrieve posts from a user’s feed or saved collections.
Individual Posts: Download specific posts using their unique shortcode (e.g.,
instaloader -- -SHORTCODE).Followee List: Download all profiles followed by a user using
@usernamesyntax (requires login).
Metadata Extraction:
Captures detailed metadata for each post, such as captions, comments (requires login), geotags, likes count, and hashtags.
Customizable text or JSON output for metadata, including caption and comment details.
Efficient File Management:
Customizable directory and file naming conventions using patterns such as
{profile},{date_utc}, and{shortcode}.Options to organize content chronologically or by category for better archival workflows.
Incremental Updates:
--fast-updatestops downloading as soon as Instaloader sees a post that’s already present locally.--latest-stampsuses timestamps instead of local files to handle updates (so you can move or delete files without confusing Instaloader).
Python Module:
Provides a Python API to script custom OSINT workflows, such as analyzing likes, tracking deleted posts, or filtering content by date.
Automation:
Designed for cron jobs with options like
--quietmode and session persistence enable scheduled and automated downloads.
Advanced Filters:
Python-like expressions allow precise filtering by date, hashtags, mentions, engagement metrics, and more.
Error Handling:
Manages rate limits (HTTP 429), login errors, and download interruptions.
Provides distinct exit codes (0 to 5) to indicate different failure or partial-success states
How to install Instaloader
Recommended one‑liner: reliably works on Linux, macOS, WSL, and Windows (PowerShell)
python3 -m pip install --upgrade instaloaderFor isolated environments: Pipx is a tool to install and run end-user Python applications in isolated virtual environments. It's an automation layer over pip and venv specifically for Python CLI applications. That means each app gets its own virtual environment (venv) to avoid conflicts with other installed scripts while still enabling console scripts globally.
pipx install instaloaderFor users of Anaconda via conda-forge: Anaconda is an open-source distribution of the Python and R languages for data science that simplifies package management and deployment by using the conda environment manager to resolve dependencies and avoid conflicts. Conda is the cross-platform package and environment manager included in Anaconda; it supports multiple channels for sourcing packages. “Conda-forge” is a community-driven packaging effort and GitHub organization that maintains recipes for building conda packages. Built distributions are published to anaconda.org/conda-forge and can be installed into any conda-based environment, providing an open-source alternative to the default Anaconda channel.
Just use your terminal or PowerShell, and make sure that the environment you want to install (just substitute "<env-name>" with "myenvironment", the name is up to you), this package is activated:
conda create -n <env-name>
conda activate <env-name>conda install -c conda-forge instaloadergit clone https://github.com/instaloader/instaloader.git
cd instaloader
python setup.py installWhen to use this option
Need the latest dev version: grab unreleased fixes or features that aren’t on PyPI yet.
Plan to tweak the code: cloning the repo puts the full source on your machine so you can patch or extend Instaloader, then reinstall instantly.
Audit / offline install: You can inspect every line before it touches your system, or vendor a specific commit for reproducibility.
What the three commands do
git clone …downloads the Instaloader source code into a new folder.cd instaloadermoves into that folder.python -m pip install .(orpython setup.py install) builds and installs the package from the source you just checked out. &#xNAN;Tip: run this inside a virtual-env so it won’t clash with other Python tools.
Example Use Cases: CLI
Download & continuously update one public profile
# First run (creates folder instagram/)
instaloader instagram
# Daily cron job – only grab *new* posts & stories
instaloader --login YOUR_USER --stories --fast-update instagramArchive only the last 100 posts with the hashtag "#ukraine"
instaloader --count 100 "#ukraine"Fetch Stories only (no posts) from multiple private accounts you follow
instaloader --login YOUR_USER --stories --no-posts --quiet user_a user_b user_cThe --stories flag is documented in the CLI reference.
Download all available posts between two dates (server‑side filter)
# Posts from 1 Jan 2024 – 31 Dec 2024
instaloader --login YOUR_USER \
--post-filter="date_utc >= datetime(2024,1,1) and date_utc < datetime(2025,1,1)" \
instagramThe filter expression syntax is Python‑like and evaluated per post.
Resume an interrupted job
instaloader --resume-prefix myrun instagramInstaloader writes a JSON checkpoint so the next invocation restarts exactly where it left off. You can define the --resume-prefix and --no-resume flags for resuming interrupted download loops. When resuming is enabled, Instaloader writes a compressed JSON “checkpoint” file into the target directory, containing all information needed to pick up where it left off. (https://instaloader.github.io/cli-options.html)
Example Use Cases: Python
CLI-to-Python “cheat sheet” (v 4.14.1, 12 Jul 2025)
Below you’ll find every current command-line flag grouped by purpose, with the canonical Python call or argument that achieves the same effect.
Where the Instaloader constructor accepts a parameter mapped 1-to-1 to the flag, it is shown like Instaloader(download_pictures=False).
When the flag controls behaviour per download call, the mapping is shown next to the relevant high-level method (e.g. download_profiles(..., fast_update=True)).
Tip: create one configured loader and reuse it:
from instaloader import Instaloader L = Instaloader(dirname_pattern="{target}", quiet=True, download_geotags=True)
Minimal runnable Python template for “CLI parity”
(= smallest amount of Python code you need to get a working command-line interface whose commands exactly mirror (i.e., have feature parity with) your underlying API or library.)
"""
Replicates: instaloader --login USER --quiet --stories --no-pictures --geotags profile1 profile2
"""
import instaloader, itertools
L = instaloader.Instaloader(
quiet=True,
download_pictures=False,
download_geotags=True)
L.login("USER", "PASSWORD") # or L.load_session_from_file("USER")
targets = ["profile1", "profile2"]
profiles = {instaloader.Profile.from_username(L.context, t) for t in targets}
L.download_profiles(profiles,
stories=True,
posts=True) # posts=True because we only disabled picturesCost
Instaloader is a free, open-source project.
Level of difficulty
While basic usage (e.g., downloading all posts from a profile) is straightforward, some command-line or scripting familiarity helps when applying advanced filters, scheduling automation, or handling custom workflows.
Requirements
System Requirements
Instaloader is platform-independent and can run on most operating systems (Linux, macOS, Windows, etc.).
Python Environment
Python 3.9 or higher (tested up to 3.13, 3.8 support was dropped in v4.14)
Primary dependencies (installed automatically with pip):
requestsRequests lets you send HTTP/1.1 requests effortlessly, with automatic query-string encoding, JSON support, and morelxmlis a feature-rich and easy-to-use library for processing XML and HTML in the Python language, with good performance, and memory efficiency,BeautifulSoup4Python package for parsing HTML/XML (including malformed markup) into a navigable parse tree for data extraction. Provides idiomatic tools for iterating, searching, and modifying the parse tree (optional; only needed for certain features)
Access Requirements
Anonymous Access: Instaloader can scrape public profiles, hashtags, and posts without login.
Logged-In Access: To scrape private profiles or retrieve user-specific data (e.g., user feed, saved posts), you must log in with valid Instagram credentials. Instaloader stores a session file to avoid repeated logins.
Limitations
Heavy scripted use can trigger temporary locks or permanent bans.
Technical Barriers:
Command-line usage can pose a challenge for non-technical users.
Using the Python module requires basic programming knowledge.
Rate Limits and Restrictions:
Instagram actively attempts to detect and restrict automated scraping. Even moderate usage of Instaloader can lead to security warnings or temporary locks on your account.
Instagram imposes strict rate limits that can trigger 429 Too Many Requests errors if requests exceed certain thresholds.
Using proxies or VPNs may result in stricter rate limits for anonymous scraping.
Instagram does not publicly disclose the exact thresholds for the web endpoints, so the limits can change without notice. Based on user experiences, the thresholds have become much stricter in recent years. For example, one user noted that previously, you could make on the order of ~200 requests per minute without issues. Current anecdotal ceiling is closer to 1–2 requests / 30s for unauthenticated scrapes; thresholds vary by endpoint and change frequently. Community reports now place anonymous limits around 1–2 requests every 30 seconds, sometimes lower. In other words, Instagram dramatically lowered the allowed request rate for scraping. Another Instaloader user observed getting a 429 after analyzing just 2–3 posts in a row, even from different machines, indicating a very low threshold in effect. The exact limit may vary over time or by content type – for instance, story downloads seem to trigger limits faster than regular posts (Instagram appears to “heavily rate-limit stories” requests).
Checkpoint/401 (login verification prompts) errors are common; importing browser cookies (using
-b chromeor similar) is a recommended workaround.
Data Integrity:
Instaloader lacks built-in hashing to verify the authenticity of downloaded content.
Ethical and Legal Constraints:
Scraping private profiles or sensitive data without authorization can violate ethical norms and Instagram’s Terms of Service.
Disclaimer: Instaloader is unaffiliated with Instagram and comes with no warranty. Always review local regulations and platform rules before usage.
Ethical Considerations
Profiles with common names or aliases can be misidentified if relying on metadata alone.
Posts may contain sensitive data (location, contact info, etc.).
Ensure you have the right to view or store the content you are downloading, and respect privacy and permissions.
Guides and articles
Official documentation and setup guide
Tool provider
The software is developed primarily by Alexander Graf (GitHub: aandergr) and is currently sponsored by @rocketapi-io, Estonia.
Advertising Trackers
Martin Sona
Last updated
Was this helpful?