Navigate:
Instaloader
~$INSTA0.4%

Instaloader: Instagram Content Downloader Tool

Python CLI for downloading Instagram posts, stories, profiles, and metadata.

LIVE RANKINGS • 10:11 PM • STEADY
OVERALL
#127
3
DEVELOPER TOOLS
#16
5
30 DAY RANKING TREND
ovr#127
·Devel#16
STARS
11.6K
FORKS
1.4K
7D STARS
+48
7D FORKS
+4
See Repo:
Share:

Learn more about Instaloader

Instaloader is a Python-based command-line utility that downloads Instagram content including photos, videos, stories, and associated metadata. The tool operates by interfacing with Instagram's web API to retrieve content and stores it locally with organized directory structures. It maintains session cookies for authentication, supports incremental updates, and automatically handles profile name changes. Common use cases include content archiving, OSINT investigations, social media research, and personal backup of Instagram accounts.

Instaloader

1

Metadata Preservation

Downloads complete post metadata including comments, geotags, captions, and timestamps alongside media files. Maintains data integrity for archival and analysis purposes.

2

Incremental Updates

Supports fast-update mode and timestamp tracking to resume interrupted downloads and sync only new content. Automatically detects profile name changes and updates directory structures.

3

Authentication Support

Handles both public and private Instagram profiles through session cookie management. Stores authentication tokens for non-interactive batch operations.


import instaloader

# Create an Instaloader instance
L = instaloader.Instaloader()

# Download profile posts
profile_name = "username"
try:
    profile = instaloader.Profile.from_username(L.context, profile_name)
    
    # Download all posts from the profile
    for post in profile.get_posts():
        L.download_post(post, target=profile_name)
        print(f"Downloaded post: {post.shortcode}")
        
        # Access metadata
        print(f"Caption: {post.caption}")
        print(f"Likes: {post.likes}")
        print(f"Date: {post.date}")
        
except instaloader.exceptions.ProfileNotExistsException:
    print(f"Profile {profile_name} does not exist")
except Exception as e:
    print(f"Error: {e}")


vv4.15

This release fixes critical download issues with Instagram security challenges and improves anonymous profile fetching capabilities.

  • Abort download, saving the resume iterator file, if a query is responded with feedbackrequired, checkpointrequired or challengerequired
  • Fix anonymous fetch of profile posts
  • Update Instagram iOS version headers based on one of the latest app version
  • Add Post.videoplaycount property
  • Update default user agent to Chrome/142
vv4.14.2

This release fixes issues with handling pinned posts when downloading Instagram reels.

  • Fix handling of pinned posts when downloading reels
vv4.15a1

This pre-release updates iPhone query headers and the default user agent, along with minor documentation improvements.

  • Update headers used for iPhone queries
  • Update default user agent
  • Minor improvements to the documentation


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers