Skip to main content

Instagram Edits SDK

Documentation · Русская версия · Swagger

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.2

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.2
File Size Uploaded Provenance Actions
instagram_edits_sdk-0.2.2.tar.gz 816.0 kB With provenance Details for instagram_edits_sdk-0.2.2.tar.gz

Built distribution (wheel)

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

Total release size: 926.0 kB

Release files / instagram_edits_sdk-0.2.2.tar.gz

Download URL instagram_edits_sdk-0.2.2.tar.gz
Size 816.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5d8506d8bf96d25508aade18d538817b06001b7a0e0ead06bd8c9d60c779f29f
BLAKE2b-256 checksum
How to use checksums
9acf8b1fa3a227ab4d98799eef3a93f9bf7c44b8e3e6f85b0f32b06e7d039141
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.2-py3-none-any.whl

Download URL instagram_edits_sdk-0.2.2-py3-none-any.whl
Size 109.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
efddde3ff0e34092941613a16c3aa964d2980806f4dbfa45824ff392a6a46a72
BLAKE2b-256 checksum
How to use checksums
570372031f71bfd9deedf3ba8e58e160fbbf09af21d4fc666700f0f7ca27378e
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.2

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.2.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.2 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