Skip to main content

Instagram Edits SDK

Unofficial Python SDK for Instagram Edits: Reel statistics, audience analytics, retention curves, and documented internal GraphQL operations. Not affiliated with Meta.

Install

python -m pip install instagram-edits-sdk

Python 3.10 or newer. No runtime dependencies. The Python import is edits_api; the command-line entry point is edits-api.

If you installed the earlier local distribution instagram-edits-research, uninstall it before installing this package: both provide the same import module.

Quickstart

Supply IG_SESSIONID through your backend's environment or secret manager. Use the Instagram session of the Reel owner. Do not embed it in frontend code. The SDK uses an existing session; it does not log in or obtain browser cookies.

from edits_api import EditsClient

client = EditsClient.from_env()
reel = client.reel_insights("https://www.instagram.com/reel/YOUR_SHORTCODE/")

plays = reel.metrics.get("play_count")
likes = reel.metrics.get("like_count")

if reel.retention_available:
    points = [{"index": p.index, "percent": p.percent} for p in reel.retention]
else:
    points = None

# Optional: export to a new directory. JSON always; CSV/SVG with available retention.
reel.export("results/my-reel")

Missing, null, empty, or all-null retention does not discard other Reel metrics. client.retention() is strict and raises EditsError when no curve is available. Zero and null are preserved as different values.

Other read methods

page = client.reels_page(first=3)
if page.has_next_page:
    next_page = client.reels_page(first=3, after=page.next_cursor)

account = client.account_insights(period="LAST_30_DAYS", include_time_series=True)
views = account.get_data("xig_user_by_igid_v2", "basel_insights", "reels_views", "value")

audience = client.audience_insights(period="LAST_30_DAYS", client_timezone="UTC")
public_metrics = client.public_insights("YOUR_NUMERIC_MEDIA_ID")

Also available: account_reels, reels_delta, comment_insights, kits, extended_reel_insights, and an explicit execute interface. QueryResult.get_data resolves observed canonical field names; payload keeps the original response.

Documentation and evidence

Nine read operations were exercised on one consenting account on 2026-10-18, plus a second page of Reels. Seven returned data; comment analysis was null and Kits was empty. Other accounts, every parameter combination, and populated comment/Kits results are not verified. The source includes 15 detailed contracts and a broader static operation registry, not a claim that all entries work.

These are internal, versioned endpoints and can change. No automatic login, challenge bypass, session refresh, retries, or unbounded pagination. Mutations are untested and require explicit opt-in. Keep credentials private and use only accounts and data you are authorized to access.

Original SDK and documentation: MIT. The source distribution includes a local Swagger UI with its Apache-2.0 license and dependency notices. No APK, decompiled Meta source, real session credentials, or private response dumps are included.

Metadata

Release files for instagram-edits-sdk 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for instagram-edits-sdk 0.2.1
File Size Uploaded Provenance Actions
instagram_edits_sdk-0.2.1.tar.gz 616.6 kB With provenance Details for instagram_edits_sdk-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for instagram-edits-sdk 0.2.1
File Interpreter ABI Platform Actions
instagram_edits_sdk-0.2.1-py3-none-any.whl Python 3 none any Details for instagram_edits_sdk-0.2.1-py3-none-any.whl

Total release size: 721.8 kB

Release files / instagram_edits_sdk-0.2.1.tar.gz

Download URL instagram_edits_sdk-0.2.1.tar.gz
Size 616.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1eb6c38abfcecac09f521926afb7702574359a909e2c7cbd68dc73626fef3805
BLAKE2b-256 checksum
How to use checksums
8d8f4417f3234ccacfc15f51235aed9041df09cdb7cdd1bdc246235e7c32d9ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / instagram_edits_sdk-0.2.1-py3-none-any.whl

Download URL instagram_edits_sdk-0.2.1-py3-none-any.whl
Size 105.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17b4d8c2d16d972881a6702c1af63131e8cc40f6903e267751c70f0cb912edfa
BLAKE2b-256 checksum
How to use checksums
aabab49cfaa0cb550892047f895e403f0451b123cb45fca34d18b66c4918f370
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Security for instagram-edits-sdk 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for instagram_edits_sdk-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page