instagrapi

πŸ”₯ The fastest and powerful Python library for Instagram Private API 2026 with HikerAPI SaaS

View on GitHub

Getting Started

Installation

Install instagrapi with pip:

python -m pip install instagrapi

Supported runtime:

Introduction

instagrapi is an unofficial Instagram API wrapper for Python. It combines public web and private mobile flows, supports session persistence and challenge handling, and exposes a broad set of primitives for users, media, stories, direct messages, notes, uploads, and insights.

A good first production habit is to avoid password login on every run. Prefer:

from instagrapi import Client

cl = Client()
cl.login(USERNAME, PASSWORD)
cl.dump_settings("session.json")

Then on the next run:

from instagrapi import Client

cl = Client()
cl.load_settings("session.json")
cl.login(USERNAME, PASSWORD)

What’s Next?