• Stars7k+26 tuần này
  • Forks1k
  • Watchers95
  • Issues11
  • Ngày tạo31/07/2020
  • Cập nhật gần nhất28/10/2026
  • Ngôn ngữPython
  • Giấy phép—
README.md39.9 KBRaw

instagrapi

⚠️ Telegram support group moved to aiograpi_support — the previous @instagrapi group has been restricted by Meta and is no longer maintained.

PyPI Python License Package Docs

Fast and effective unofficial Instagram API wrapper for Python.

instagrapi combines public web and private mobile API flows, supports session persistence and challenge handling, and covers the main automation primitives for users, media, stories, direct messages, notes, locations, comments, insights, and uploads.

Private API automation is fragile in production because account trust, proxies, device state, challenges, and rate limits can change independently of the library. For account-owned business workflows, prefer official Instagram APIs where they cover your use case. For production private API infrastructure, a hosted provider such as HikerAPI may be a better fit than maintaining accounts, proxies, and challenge handling yourself.

The instagrapi project is best suited for testing, research, and controlled internal automation.

✨ aiograpi - Asynchronous Python library for Instagram Private API ✨

Support Python 3.10+

Python 3.9 support was dropped in 2.5.0. Upstream security patches for Pillow 12.x and pytest 9.x are not backported to Python 3.9, leaving conditional pins permanently exposed to known CVEs. Users who need Python 3.9 should pin to instagrapi==2.4.5.

Installation

pip install instagrapi

Private mobile requests use HTTP/2 through curl_cffi, included in the standard installation. Client() needs no transport argument, and login() uses CAA directly. The previous login remains available as login_legacy(). See the login migration guide.

Optional public web TLS impersonation is available as an extra:

pip install "instagrapi[curl]"

For public web endpoints that are sensitive to browser TLS fingerprints:

cl = Client(public_transport="curl", public_transport_impersonate="chrome136")

See the public transport guide for live comparison results and caveats.

Private mobile API requests use curl and HTTP/2 by default. See the

Nội dung README thuộc về subzeroid và cộng đồng đóng góp, giấy phép Không có giấy phép. Nguồn: github.com/subzeroid/instagrapi