instagrapi
Fast and effective Instagram Private API wrapper for Python. Login, posting, stories, reels, direct messages, comments, followers.
What is instagrapi?
instagrapi is an MIT-licensed Python library that wraps Instagram's private mobile API. It powers automation, analytics, and content tools for developers who need programmatic access to Instagram.
Need async/await? See aiograpi — the async sister library, same author, same API surface.
Full API surface
Users, media, stories, reels, IGTV, direct messages, comments, hashtags, locations.
Two-factor auth
TOTP + SMS 2FA flows. Session persistence. Challenge resolution.
Typed responses
Pydantic models for every endpoint. IDE-friendly.
Tutorials
Hands-on guides for real instagrapi work — login, sessions, proxies, scraping, posting.
All guides →Skip the infra?
Managed Instagram API — same endpoints, sessions and proxies handled.
Try HikerAPI → Full comparison