instagram-edits-sdk 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. instagram_edits_sdk-0.2.1/.github/workflows/publish.yml +59 -0
  2. instagram_edits_sdk-0.2.1/.github/workflows/tests.yml +21 -0
  3. instagram_edits_sdk-0.2.1/CHANGELOG.md +29 -0
  4. instagram_edits_sdk-0.2.1/CONTRIBUTING.md +22 -0
  5. instagram_edits_sdk-0.2.1/LICENSE +26 -0
  6. instagram_edits_sdk-0.2.1/MANIFEST.in +7 -0
  7. instagram_edits_sdk-0.2.1/PKG-INFO +108 -0
  8. instagram_edits_sdk-0.2.1/PYPI_README.md +87 -0
  9. instagram_edits_sdk-0.2.1/README.en.md +80 -0
  10. instagram_edits_sdk-0.2.1/README.md +140 -0
  11. instagram_edits_sdk-0.2.1/REPOSITORY.md +30 -0
  12. instagram_edits_sdk-0.2.1/SECURITY.md +13 -0
  13. instagram_edits_sdk-0.2.1/docs/authentication.md +113 -0
  14. instagram_edits_sdk-0.2.1/docs/data-reference.md +174 -0
  15. instagram_edits_sdk-0.2.1/docs/evidence/live-verification.json +40 -0
  16. instagram_edits_sdk-0.2.1/docs/evidence/method-verification.json +146 -0
  17. instagram_edits_sdk-0.2.1/docs/evidence/package-validation.json +20 -0
  18. instagram_edits_sdk-0.2.1/docs/evidence/pypi-release-validation.json +16 -0
  19. instagram_edits_sdk-0.2.1/docs/http-api.md +107 -0
  20. instagram_edits_sdk-0.2.1/docs/integration.md +80 -0
  21. instagram_edits_sdk-0.2.1/docs/methods/BaselAccountLevelInsightsQuery.md +42 -0
  22. instagram_edits_sdk-0.2.1/docs/methods/BaselAccountLevelReelsQuery.md +44 -0
  23. instagram_edits_sdk-0.2.1/docs/methods/BaselAudienceInsightsQuery.md +42 -0
  24. instagram_edits_sdk-0.2.1/docs/methods/BaselKitClearDefaultMutation.md +30 -0
  25. instagram_edits_sdk-0.2.1/docs/methods/BaselKitCreateMutation.md +30 -0
  26. instagram_edits_sdk-0.2.1/docs/methods/BaselKitDeleteMutation.md +30 -0
  27. instagram_edits_sdk-0.2.1/docs/methods/BaselKitSetDefaultMutation.md +30 -0
  28. instagram_edits_sdk-0.2.1/docs/methods/BaselKitUpdateMutation.md +30 -0
  29. instagram_edits_sdk-0.2.1/docs/methods/BaselKitsQuery.md +38 -0
  30. instagram_edits_sdk-0.2.1/docs/methods/BaselPublicInsightsQuery.md +38 -0
  31. instagram_edits_sdk-0.2.1/docs/methods/BaselReelDetailsQuery.md +44 -0
  32. instagram_edits_sdk-0.2.1/docs/methods/ReelInsightsQuery.md +43 -0
  33. instagram_edits_sdk-0.2.1/docs/methods/XIGBaselAccountLevelReelsDataDeltaQuery.md +38 -0
  34. instagram_edits_sdk-0.2.1/docs/methods/XIGBaselInsightsCommentsQuery.md +40 -0
  35. instagram_edits_sdk-0.2.1/docs/methods/XIGBaselInsightsRetentionSummaryMutation.md +30 -0
  36. instagram_edits_sdk-0.2.1/docs/methods.md +120 -0
  37. instagram_edits_sdk-0.2.1/docs/openapi.json +827 -0
  38. instagram_edits_sdk-0.2.1/docs/releasing.md +70 -0
  39. instagram_edits_sdk-0.2.1/docs/retention.md +83 -0
  40. instagram_edits_sdk-0.2.1/docs/swagger/index.html +35 -0
  41. instagram_edits_sdk-0.2.1/docs/swagger/vendor/LICENSE +202 -0
  42. instagram_edits_sdk-0.2.1/docs/swagger/vendor/NOTICE +2 -0
  43. instagram_edits_sdk-0.2.1/docs/swagger/vendor/provenance.json +22 -0
  44. instagram_edits_sdk-0.2.1/docs/swagger/vendor/swagger-ui-bundle.js +2 -0
  45. instagram_edits_sdk-0.2.1/docs/swagger/vendor/swagger-ui-bundle.js.LICENSE.txt +131 -0
  46. instagram_edits_sdk-0.2.1/docs/swagger/vendor/swagger-ui.css +3 -0
  47. instagram_edits_sdk-0.2.1/docs/swagger/viewer.js +53 -0
  48. instagram_edits_sdk-0.2.1/docs/swagger.md +37 -0
  49. instagram_edits_sdk-0.2.1/docs/verification.md +104 -0
  50. instagram_edits_sdk-0.2.1/examples/account_statistics.py +24 -0
  51. instagram_edits_sdk-0.2.1/examples/batch_retention.py +36 -0
  52. instagram_edits_sdk-0.2.1/examples/extended_insights.py +27 -0
  53. instagram_edits_sdk-0.2.1/examples/list_reels.py +25 -0
  54. instagram_edits_sdk-0.2.1/examples/offline_demo.py +26 -0
  55. instagram_edits_sdk-0.2.1/examples/read_operation.py +35 -0
  56. instagram_edits_sdk-0.2.1/examples/reel_statistics.py +20 -0
  57. instagram_edits_sdk-0.2.1/examples/retention.py +22 -0
  58. instagram_edits_sdk-0.2.1/pyproject.toml +34 -0
  59. instagram_edits_sdk-0.2.1/setup.cfg +4 -0
  60. instagram_edits_sdk-0.2.1/src/edits_api/__init__.py +8 -0
  61. instagram_edits_sdk-0.2.1/src/edits_api/__main__.py +3 -0
  62. instagram_edits_sdk-0.2.1/src/edits_api/_wire.py +467 -0
  63. instagram_edits_sdk-0.2.1/src/edits_api/cli.py +56 -0
  64. instagram_edits_sdk-0.2.1/src/edits_api/client.py +317 -0
  65. instagram_edits_sdk-0.2.1/src/edits_api/operations.json +15117 -0
  66. instagram_edits_sdk-0.2.1/src/edits_api/registry.py +25 -0
  67. instagram_edits_sdk-0.2.1/src/instagram_edits_sdk.egg-info/PKG-INFO +108 -0
  68. instagram_edits_sdk-0.2.1/src/instagram_edits_sdk.egg-info/SOURCES.txt +75 -0
  69. instagram_edits_sdk-0.2.1/src/instagram_edits_sdk.egg-info/dependency_links.txt +1 -0
  70. instagram_edits_sdk-0.2.1/src/instagram_edits_sdk.egg-info/entry_points.txt +2 -0
  71. instagram_edits_sdk-0.2.1/src/instagram_edits_sdk.egg-info/top_level.txt +1 -0
  72. instagram_edits_sdk-0.2.1/tests/fixtures/reel_details.synthetic.json +19 -0
  73. instagram_edits_sdk-0.2.1/tests/test_client.py +240 -0
  74. instagram_edits_sdk-0.2.1/tests/test_wire.py +208 -0
  75. instagram_edits_sdk-0.2.1/tools/check_release.py +62 -0
  76. instagram_edits_sdk-0.2.1/tools/generate_docs.py +89 -0
  77. instagram_edits_sdk-0.2.1/tools/generate_openapi.py +92 -0
@@ -0,0 +1,59 @@
1
+ name: Publish to PyPI
2
+ on:
3
+ push:
4
+ tags:
5
+ - 'v*'
6
+ permissions:
7
+ contents: read
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
13
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
14
+ with:
15
+ python-version: '3.14'
16
+ - name: Check version matches the release tag
17
+ env:
18
+ RELEASE_TAG: ${{ github.ref_name }}
19
+ run: |
20
+ python - <<'PY'
21
+ import os, tomllib
22
+ project = tomllib.load(open('pyproject.toml', 'rb'))['project']
23
+ assert project['name'] == 'instagram-edits-sdk'
24
+ assert os.environ['RELEASE_TAG'] == 'v' + project['version']
25
+ PY
26
+ - run: python -m pip install . build twine
27
+ - run: python -m unittest discover -s tests -v
28
+ - run: python examples/offline_demo.py
29
+ - run: python tools/generate_docs.py --check
30
+ - run: python tools/generate_openapi.py --check
31
+ - run: python tools/check_release.py
32
+ - run: python -m build
33
+ - run: python -m twine check --strict dist/*
34
+ - name: Test the actual wheel without runtime dependencies
35
+ run: |
36
+ python -m venv /tmp/edits-wheel-check
37
+ /tmp/edits-wheel-check/bin/python -m pip install --no-deps dist/*.whl
38
+ /tmp/edits-wheel-check/bin/python -m unittest discover -s tests -v
39
+ /tmp/edits-wheel-check/bin/python examples/offline_demo.py
40
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
41
+ with:
42
+ name: python-distributions
43
+ path: dist/*
44
+ if-no-files-found: error
45
+ publish:
46
+ needs: build
47
+ runs-on: ubuntu-latest
48
+ environment:
49
+ name: pypi
50
+ url: https://pypi.org/p/instagram-edits-sdk
51
+ permissions:
52
+ id-token: write
53
+ steps:
54
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
55
+ with:
56
+ name: python-distributions
57
+ path: dist/
58
+ - name: Publish the verified distributions
59
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
@@ -0,0 +1,21 @@
1
+ name: Python checks
2
+ on: [push, pull_request]
3
+ permissions:
4
+ contents: read
5
+ jobs:
6
+ tests:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ python: ["3.10", "3.12", "3.14"]
11
+ steps:
12
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
13
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
14
+ with:
15
+ python-version: ${{ matrix.python }}
16
+ - run: python -m pip install .
17
+ - run: python -m unittest discover -s tests -v
18
+ - run: python examples/offline_demo.py
19
+ - run: python tools/generate_docs.py --check
20
+ - run: python tools/generate_openapi.py --check
21
+ - run: python tools/check_release.py
@@ -0,0 +1,29 @@
1
+ # Changelog
2
+
3
+ ## 0.2.1 β€” 2026-10-18
4
+
5
+ - Rename the distribution to `instagram-edits-sdk` for PyPI; the `edits_api` import and `edits-api` CLI stay unchanged.
6
+ - Add an English PyPI description, project links and bundled license metadata.
7
+ - Add a tag-triggered build and publish workflow using PyPI Trusted Publishing.
8
+ - Runtime API and observed live-query evidence remain unchanged from 0.2.0.
9
+
10
+ ## 0.2.0 β€” 2026-10-18
11
+
12
+ - Preserve Reel statistics when retention is missing, null, empty, or all-null.
13
+ - Add `insights` CLI, canonical path resolution, and typed cursor pages.
14
+ - Exercise nine read operations plus a second Reel page against the live API.
15
+ - Distinguish populated responses from null comment analysis and empty Kits.
16
+ - Recover period and comment-sort enums; add all-method examples and local Swagger.
17
+ - Keep live evidence sanitized and private responses outside the repository.
18
+
19
+ ## 0.1.0 β€” 2026-10-18
20
+
21
+ - Package the original live-verified retention transport as an importable client.
22
+ - Parse standard and observed canonical field names; preserve null and zero.
23
+ - Add ownership checks, explicit JSON/CSV/SVG exports and a CLI.
24
+ - Document HTTP/authentication, seven analytics wrappers and 15 detailed contracts.
25
+ - Include a versioned 88-operation Edits index and 1663-entry shared registry.
26
+ - Add synthetic tests, offline demo, release checks and GitHub Actions.
27
+
28
+ Only the original BaselReelDetailsQuery exchange is server-verified. Other
29
+ operations remain static findings. No private responses or credentials are shipped.
@@ -0,0 +1,22 @@
1
+ # Contributing
2
+
3
+ Keep evidence levels explicit. A registry entry or a passing mock test must not
4
+ be labelled as a live-verified server contract. Record APK version, operation ID,
5
+ request variables, response schema, date and limits for a new finding.
6
+
7
+ Do not submit cookies, Authorization headers, passwords, HAR captures, real
8
+ personal response dumps, APK binaries, decompiled Meta source, or copied media.
9
+ Fixtures must be clearly synthetic. Keep request examples read-only by default.
10
+
11
+ Before submitting:
12
+
13
+ ```sh
14
+ python -m pip install -e .
15
+ python -m unittest discover -s tests -v
16
+ python examples/offline_demo.py
17
+ python tools/generate_docs.py --check
18
+ python tools/check_release.py
19
+ ```
20
+
21
+ CI must never call Instagram. Real verification needs an explicitly authorized
22
+ account, and should publish only a sanitized evidence record.
@@ -0,0 +1,26 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Instagram Edits API Research contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ This license applies to original code and documentation in this repository.
24
+ Instagram, Edits, Meta, and their trademarks are owned by their respective owners.
25
+ No Meta APKs, decompiled sources, media, credentials, or private response dumps
26
+ are distributed with this repository.
@@ -0,0 +1,7 @@
1
+ include README.md README.en.md PYPI_README.md LICENSE CONTRIBUTING.md SECURITY.md CHANGELOG.md REPOSITORY.md
2
+ recursive-include docs *.md *.json *.html *.css *.js *.txt LICENSE NOTICE
3
+ recursive-include examples *.py
4
+ recursive-include tests *.py *.json
5
+ recursive-include tools *.py
6
+ recursive-include .github *.yml
7
+ global-exclude __pycache__ *.py[cod]
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: instagram-edits-sdk
3
+ Version: 0.2.1
4
+ Summary: Unofficial, evidence-based Instagram Edits API research client
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/lupikovoleg/instagram-edits-sdk
7
+ Project-URL: Documentation, https://github.com/lupikovoleg/instagram-edits-sdk#readme
8
+ Project-URL: Repository, https://github.com/lupikovoleg/instagram-edits-sdk
9
+ Project-URL: Issues, https://github.com/lupikovoleg/instagram-edits-sdk/issues
10
+ Keywords: instagram,edits,reels,analytics,retention,sdk
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ License-File: docs/swagger/vendor/LICENSE
18
+ License-File: docs/swagger/vendor/NOTICE
19
+ License-File: docs/swagger/vendor/swagger-ui-bundle.js.LICENSE.txt
20
+ Dynamic: license-file
21
+
22
+ # Instagram Edits SDK
23
+
24
+ Unofficial Python SDK for Instagram Edits: Reel statistics, audience analytics,
25
+ retention curves, and documented internal GraphQL operations. Not affiliated with Meta.
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ python -m pip install instagram-edits-sdk
31
+ ```
32
+
33
+ Python 3.10 or newer. No runtime dependencies. The Python import is `edits_api`;
34
+ the command-line entry point is `edits-api`.
35
+
36
+ If you installed the earlier local distribution `instagram-edits-research`,
37
+ uninstall it before installing this package: both provide the same import module.
38
+
39
+ ## Quickstart
40
+
41
+ Supply `IG_SESSIONID` through your backend's environment or secret manager.
42
+ Use the Instagram session of the Reel owner. Do not embed it in frontend code.
43
+ The SDK uses an existing session; it does not log in or obtain browser cookies.
44
+
45
+ ```python
46
+ from edits_api import EditsClient
47
+
48
+ client = EditsClient.from_env()
49
+ reel = client.reel_insights("https://www.instagram.com/reel/YOUR_SHORTCODE/")
50
+
51
+ plays = reel.metrics.get("play_count")
52
+ likes = reel.metrics.get("like_count")
53
+
54
+ if reel.retention_available:
55
+ points = [{"index": p.index, "percent": p.percent} for p in reel.retention]
56
+ else:
57
+ points = None
58
+
59
+ # Optional: export to a new directory. JSON always; CSV/SVG with available retention.
60
+ reel.export("results/my-reel")
61
+ ```
62
+
63
+ Missing, null, empty, or all-null retention does not discard other Reel metrics.
64
+ `client.retention()` is strict and raises `EditsError` when no curve is available.
65
+ Zero and null are preserved as different values.
66
+
67
+ ## Other read methods
68
+
69
+ ```python
70
+ page = client.reels_page(first=3)
71
+ if page.has_next_page:
72
+ next_page = client.reels_page(first=3, after=page.next_cursor)
73
+
74
+ account = client.account_insights(period="LAST_30_DAYS", include_time_series=True)
75
+ views = account.get_data("xig_user_by_igid_v2", "basel_insights", "reels_views", "value")
76
+
77
+ audience = client.audience_insights(period="LAST_30_DAYS", client_timezone="UTC")
78
+ public_metrics = client.public_insights("YOUR_NUMERIC_MEDIA_ID")
79
+ ```
80
+
81
+ Also available: `account_reels`, `reels_delta`, `comment_insights`, `kits`,
82
+ `extended_reel_insights`, and an explicit `execute` interface. `QueryResult.get_data`
83
+ resolves observed canonical field names; `payload` keeps the original response.
84
+
85
+ ## Documentation and evidence
86
+
87
+ - [Authentication and passing session credentials](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/docs/authentication.md)
88
+ - [Data fields and examples for all documented read methods](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/docs/data-reference.md)
89
+ - [Retention example](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/examples/retention.py)
90
+ - [HTTP contract and response handling](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/docs/http-api.md)
91
+ - [Operation catalog](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/docs/methods.md)
92
+ - [OpenAPI and local Swagger viewer](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/docs/swagger.md)
93
+ - [Verification scope](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/docs/verification.md)
94
+
95
+ Nine read operations were exercised on one consenting account on 2026-10-18,
96
+ plus a second page of Reels. Seven returned data; comment analysis was null and
97
+ Kits was empty. Other accounts, every parameter combination, and populated
98
+ comment/Kits results are not verified. The source includes 15 detailed contracts
99
+ and a broader static operation registry, not a claim that all entries work.
100
+
101
+ These are internal, versioned endpoints and can change. No automatic login,
102
+ challenge bypass, session refresh, retries, or unbounded pagination. Mutations
103
+ are untested and require explicit opt-in. Keep credentials private and use only
104
+ accounts and data you are authorized to access.
105
+
106
+ Original SDK and documentation: MIT. The source distribution includes a local
107
+ Swagger UI with its Apache-2.0 license and dependency notices. No APK, decompiled
108
+ Meta source, real session credentials, or private response dumps are included.
@@ -0,0 +1,87 @@
1
+ # Instagram Edits SDK
2
+
3
+ Unofficial Python SDK for Instagram Edits: Reel statistics, audience analytics,
4
+ retention curves, and documented internal GraphQL operations. Not affiliated with Meta.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ python -m pip install instagram-edits-sdk
10
+ ```
11
+
12
+ Python 3.10 or newer. No runtime dependencies. The Python import is `edits_api`;
13
+ the command-line entry point is `edits-api`.
14
+
15
+ If you installed the earlier local distribution `instagram-edits-research`,
16
+ uninstall it before installing this package: both provide the same import module.
17
+
18
+ ## Quickstart
19
+
20
+ Supply `IG_SESSIONID` through your backend's environment or secret manager.
21
+ Use the Instagram session of the Reel owner. Do not embed it in frontend code.
22
+ The SDK uses an existing session; it does not log in or obtain browser cookies.
23
+
24
+ ```python
25
+ from edits_api import EditsClient
26
+
27
+ client = EditsClient.from_env()
28
+ reel = client.reel_insights("https://www.instagram.com/reel/YOUR_SHORTCODE/")
29
+
30
+ plays = reel.metrics.get("play_count")
31
+ likes = reel.metrics.get("like_count")
32
+
33
+ if reel.retention_available:
34
+ points = [{"index": p.index, "percent": p.percent} for p in reel.retention]
35
+ else:
36
+ points = None
37
+
38
+ # Optional: export to a new directory. JSON always; CSV/SVG with available retention.
39
+ reel.export("results/my-reel")
40
+ ```
41
+
42
+ Missing, null, empty, or all-null retention does not discard other Reel metrics.
43
+ `client.retention()` is strict and raises `EditsError` when no curve is available.
44
+ Zero and null are preserved as different values.
45
+
46
+ ## Other read methods
47
+
48
+ ```python
49
+ page = client.reels_page(first=3)
50
+ if page.has_next_page:
51
+ next_page = client.reels_page(first=3, after=page.next_cursor)
52
+
53
+ account = client.account_insights(period="LAST_30_DAYS", include_time_series=True)
54
+ views = account.get_data("xig_user_by_igid_v2", "basel_insights", "reels_views", "value")
55
+
56
+ audience = client.audience_insights(period="LAST_30_DAYS", client_timezone="UTC")
57
+ public_metrics = client.public_insights("YOUR_NUMERIC_MEDIA_ID")
58
+ ```
59
+
60
+ Also available: `account_reels`, `reels_delta`, `comment_insights`, `kits`,
61
+ `extended_reel_insights`, and an explicit `execute` interface. `QueryResult.get_data`
62
+ resolves observed canonical field names; `payload` keeps the original response.
63
+
64
+ ## Documentation and evidence
65
+
66
+ - [Authentication and passing session credentials](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/docs/authentication.md)
67
+ - [Data fields and examples for all documented read methods](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/docs/data-reference.md)
68
+ - [Retention example](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/examples/retention.py)
69
+ - [HTTP contract and response handling](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/docs/http-api.md)
70
+ - [Operation catalog](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/docs/methods.md)
71
+ - [OpenAPI and local Swagger viewer](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/docs/swagger.md)
72
+ - [Verification scope](https://github.com/lupikovoleg/instagram-edits-sdk/blob/main/docs/verification.md)
73
+
74
+ Nine read operations were exercised on one consenting account on 2026-10-18,
75
+ plus a second page of Reels. Seven returned data; comment analysis was null and
76
+ Kits was empty. Other accounts, every parameter combination, and populated
77
+ comment/Kits results are not verified. The source includes 15 detailed contracts
78
+ and a broader static operation registry, not a claim that all entries work.
79
+
80
+ These are internal, versioned endpoints and can change. No automatic login,
81
+ challenge bypass, session refresh, retries, or unbounded pagination. Mutations
82
+ are untested and require explicit opt-in. Keep credentials private and use only
83
+ accounts and data you are authorized to access.
84
+
85
+ Original SDK and documentation: MIT. The source distribution includes a local
86
+ Swagger UI with its Apache-2.0 license and dependency notices. No APK, decompiled
87
+ Meta source, real session credentials, or private response dumps are included.
@@ -0,0 +1,80 @@
1
+ # Instagram Edits SDK
2
+
3
+ Unofficial Python SDK and developer documentation for Instagram Edits analytics,
4
+ Reel insights, audience statistics, and retention curves. Python 3.10+, no runtime
5
+ dependencies. This is not an official Meta SDK or a hosted service.
6
+
7
+ ## Install and use
8
+
9
+ The PyPI release is prepared for installation with:
10
+
11
+ ```sh
12
+ python -m pip install instagram-edits-sdk
13
+ ```
14
+
15
+ Until the first upload completes, install from source:
16
+
17
+ ```sh
18
+ git clone https://github.com/lupikovoleg/instagram-edits-sdk.git
19
+ cd instagram-edits-sdk
20
+ python -m pip install .
21
+ ```
22
+
23
+ Distribution: `instagram-edits-sdk` 0.2.1. Import: `edits_api`. CLI: `edits-api`.
24
+ If migrating from the earlier local `instagram-edits-research` distribution,
25
+ uninstall it first: both distributions provide the same `edits_api` module.
26
+ Inject your own Instagram owner's session into `IG_SESSIONID` using a secret manager.
27
+ The library does not log in or read browser cookies.
28
+
29
+ ```python
30
+ from edits_api import EditsClient
31
+
32
+ client = EditsClient.from_env()
33
+ reel = client.reel_insights("https://www.instagram.com/reel/YOUR_SHORTCODE/")
34
+ plays = reel.metrics.get("play_count")
35
+ retention = [{"index": p.index, "percent": p.percent} for p in reel.retention] \
36
+ if reel.retention_available else None
37
+ snapshot = reel.to_dict()
38
+
39
+ page = client.reels_page(first=3)
40
+ if page.has_next_page:
41
+ second_page = client.reels_page(first=3, after=page.next_cursor)
42
+
43
+ account = client.account_insights(include_time_series=True)
44
+ account_metrics = account.get_data("xig_user_by_igid_v2", "basel_insights")
45
+ ```
46
+
47
+ Missing/null/empty/all-null retention does not discard other Reel statistics.
48
+ `retention()` remains strict. Exports include JSON; CSV and SVG require available
49
+ retention. Null values are not replaced by zeros. Response aliases are resolved by
50
+ `QueryResult.get_data()`; the original payload remains available.
51
+
52
+ ## Available methods and evidence
53
+
54
+ On 2026-10-18, the SDK made nine successful read-operation requests on one consenting
55
+ account and an additional pagination request. Seven operations returned data.
56
+ `comment_insights()` returned a null analysis block; `kits()` returned an empty list.
57
+ These two results do not verify populated feature responses. Account availability,
58
+ other enum combinations, batch limits, and future server compatibility are not guaranteed.
59
+
60
+ Methods: `reel_insights`, `retention`, `public_insights`, `reels_page`, `account_reels`,
61
+ `account_insights`, `audience_insights`, `reels_delta`, `comment_insights`, `kits`,
62
+ `extended_reel_insights`, and the explicit `execute` interface.
63
+
64
+ The source includes 15 detailed operation contracts, an 88-entry Basel/Eddy index,
65
+ and the full 1663-operation APK registry. Mutations are untested and require explicit
66
+ opt-in. No automatic retries, token refresh, challenge bypass, or unbounded pagination.
67
+
68
+ [Russian quickstart](README.md) Β· [Data reference and all-method examples](docs/data-reference.md)
69
+ Β· [Authentication](docs/authentication.md) Β· [HTTP](docs/http-api.md)
70
+ Β· [Swagger / OpenAPI](docs/swagger.md) Β· [Verification scope](docs/verification.md)
71
+
72
+ ```sh
73
+ python -m unittest discover -s tests -v
74
+ python examples/offline_demo.py
75
+ python tools/check_release.py
76
+ ```
77
+
78
+ Tests use synthetic data without network access. Sanitized live evidence is separate.
79
+ No APK, decompiled Meta sources, credentials, or personal response dumps are shipped.
80
+ Original project code/docs: MIT. Bundled Swagger UI: Apache-2.0.
@@ -0,0 +1,140 @@
1
+ # Instagram Edits SDK
2
+
3
+ ΠΠ΅ΠΎΡ„ΠΈΡ†ΠΈΠ°Π»ΡŒΠ½Ρ‹ΠΉ Python SDK ΠΈ докумСнтация Π²Π½ΡƒΡ‚Ρ€Π΅Π½Π½ΠΈΡ… ΠΌΠ΅Ρ‚ΠΎΠ΄ΠΎΠ² Instagram Edits:
4
+ статистика Reels, ΡƒΠ΄Π΅Ρ€ΠΆΠ°Π½ΠΈΠ΅, Π°Π½Π°Π»ΠΈΡ‚ΠΈΠΊΠ° Π°ΠΊΠΊΠ°ΡƒΠ½Ρ‚Π° ΠΈ Π°ΡƒΠ΄ΠΈΡ‚ΠΎΡ€ΠΈΠΈ. Для ΠΈΠ½Ρ‚Π΅Π³Ρ€Π°Ρ†ΠΈΠΈ Π² свой
5
+ backend ΠΈΠ»ΠΈ аналитичСский сСрвис. Python 3.10+, Π±Π΅Π· зависимостСй Π²ΠΎ врСмя Ρ€Π°Π±ΠΎΡ‚Ρ‹.
6
+
7
+ **ΠŸΡ€ΠΎΠ²Π΅Ρ€Π΅Π½ΠΎ 18 октября 2026:** Π΄Π΅Π²ΡΡ‚ΡŒ ΠΌΠ΅Ρ‚ΠΎΠ΄ΠΎΠ² чтСния Ρ‡Π΅Ρ€Π΅Π· Ρ€Π΅Π°Π»ΡŒΠ½Ρ‹Π΅ запросы SDK
8
+ Π½Π° ΠΎΠ΄Π½ΠΎΠΌ Π°ΠΊΠΊΠ°ΡƒΠ½Ρ‚Π΅, плюс ΡΠ»Π΅Π΄ΡƒΡŽΡ‰Π°Ρ страница Reels. БСмь ΠΌΠ΅Ρ‚ΠΎΠ΄ΠΎΠ² Π²Π΅Ρ€Π½ΡƒΠ»ΠΈ Π΄Π°Π½Π½Ρ‹Π΅;
9
+ Π°Π½Π°Π»ΠΈΠ· ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠ΅Π² Π²Π΅Ρ€Π½ΡƒΠ» `null`, Kits β€” пустой список. Π­Ρ‚ΠΎ Π½Π΅ ΠΎΡ„ΠΈΡ†ΠΈΠ°Π»ΡŒΠ½Ρ‹ΠΉ SDK
10
+ Meta ΠΈ Π½Π΅ гарантия доступности Π΄Π°Π½Π½Ρ‹Ρ… Ρƒ любого Π°ΠΊΠΊΠ°ΡƒΠ½Ρ‚Π°.
11
+
12
+ [English](README.en.md) Β· [КакиС Π΄Π°Π½Π½Ρ‹Π΅ доступны](docs/data-reference.md)
13
+ Β· [ΠœΠ΅Ρ‚ΠΎΠ΄Ρ‹](docs/methods.md) Β· [Авторизация](docs/authentication.md)
14
+ Β· [Π˜Π½Ρ‚Π΅Π³Ρ€Π°Ρ†ΠΈΡ](docs/integration.md) Β· [HTTP](docs/http-api.md)
15
+ Β· [Swagger / OpenAPI](docs/swagger.md) Β· [ΠŸΡ€ΠΎΠ²Π΅Ρ€ΠΊΠΈ](docs/verification.md) Β· [Выпуск Π² PyPI](docs/releasing.md)
16
+
17
+ ## Установка
18
+
19
+ Для Ρ€Π΅Π»ΠΈΠ·Π° Π² PyPI ΠΏΠΎΠ΄Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½Π° ΠΊΠΎΠΌΠ°Π½Π΄Π°:
20
+
21
+ ```sh
22
+ python -m pip install instagram-edits-sdk
23
+ ```
24
+
25
+ Π”ΠΎ Π·Π°Π²Π΅Ρ€ΡˆΠ΅Π½ΠΈΡ ΠΏΠ΅Ρ€Π²ΠΎΠΉ ΠΏΡƒΠ±Π»ΠΈΠΊΠ°Ρ†ΠΈΠΈ ΠΌΠΎΠΆΠ½ΠΎ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ ΠΈΠ· исходников:
26
+
27
+ ```sh
28
+ git clone https://github.com/lupikovoleg/instagram-edits-sdk.git
29
+ cd instagram-edits-sdk
30
+ python -m pip install .
31
+ ```
32
+
33
+ Имя дистрибутива β€” `instagram-edits-sdk`, ΠΈΠΌΠΏΠΎΡ€Ρ‚ β€” `edits_api`, ΠΊΠΎΠΌΠ°Π½Π΄Π° β€”
34
+ `edits-api`. ВСрсия 0.2.1. ΠŸΡ€ΠΈ ΠΏΠ΅Ρ€Π΅Ρ…ΠΎΠ΄Π΅ с локального `instagram-edits-research`
35
+ ΡƒΠ΄Π°Π»ΠΈΡ‚Π΅ старый дистрибутив: ΠΎΠ±Π° ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΡŽΡ‚ ΠΎΠ΄ΠΈΠ½ Python-ΠΌΠΎΠ΄ΡƒΠ»ΡŒ `edits_api`.
36
+
37
+ ```sh
38
+ python -m pip uninstall instagram-edits-research
39
+ ```
40
+
41
+ ## Бтатистика Reel, Π΄Π°ΠΆΠ΅ Π±Π΅Π· удСрТания
42
+
43
+ ΠŸΠ΅Ρ€Π΅Π΄Π°ΠΉΡ‚Π΅ процСссу `IG_SESSIONID` ΠΈΠ· своСго ΠΌΠ΅Π½Π΅Π΄ΠΆΠ΅Ρ€Π° сСкрСтов. НуТна сСссия
44
+ Instagram Π²Π»Π°Π΄Π΅Π»ΡŒΡ†Π° Ρ€ΠΎΠ»ΠΈΠΊΠ°. ΠŸΠ°Ρ€ΠΎΠ»ΡŒ ΠΈ Ρ‚ΠΎΠΊΠ΅Π½ ΠΏΡƒΠ±Π»ΠΈΡ‡Π½ΠΎΠ³ΠΎ Graph API Π΅Ρ‘ Π½Π΅ Π·Π°ΠΌΠ΅Π½ΡΡŽΡ‚.
45
+ SDK Π½Π΅ ΠΈΠ·Π²Π»Π΅ΠΊΠ°Π΅Ρ‚ cookie ΠΈΠ· Π±Ρ€Π°ΡƒΠ·Π΅Ρ€Π° ΠΈ Π½Π΅ выполняСт Π²Ρ…ΠΎΠ΄.
46
+
47
+ ```python
48
+ from edits_api import EditsClient
49
+
50
+ client = EditsClient.from_env()
51
+ reel = client.reel_insights("https://www.instagram.com/reel/YOUR_SHORTCODE/")
52
+
53
+ print(reel.metrics.get("play_count"))
54
+ print(reel.metrics.get("like_count"))
55
+ print(reel.metrics.get("skip_rate")) # ΠžΠ±ΡŠΠ΅ΠΊΡ‚ с value/delta ΠΈΠ»ΠΈ None.
56
+
57
+ if reel.retention_available:
58
+ points = [{"index": p.index, "percent": p.percent} for p in reel.retention]
59
+ else:
60
+ points = None # НСт Π΄Π°Π½Π½Ρ‹Ρ…, Π° Π½Π΅ Π½ΡƒΠ»Π΅Π²ΠΎΠ΅ ΡƒΠ΄Π΅Ρ€ΠΆΠ°Π½ΠΈΠ΅.
61
+
62
+ snapshot = reel.to_dict() # МоТно ΡΠΎΡ…Ρ€Π°Π½ΠΈΡ‚ΡŒ Π² своСй Π‘Π”.
63
+ reel.export("results/my-reel") # Новый ΠΊΠ°Ρ‚Π°Π»ΠΎΠ³: JSON; CSV/SVG Ρ‚ΠΎΠ»ΡŒΠΊΠΎ с ΡƒΠ΄Π΅Ρ€ΠΆΠ°Π½ΠΈΠ΅ΠΌ.
64
+ ```
65
+
66
+ ΠžΡ‚ΡΡƒΡ‚ΡΡ‚Π²ΡƒΡŽΡ‰Π΅Π΅, `null`, пустоС ΠΈΠ»ΠΈ ΠΏΠΎΠ»Π½ΠΎΡΡ‚ΡŒΡŽ `null`-ΡƒΠ΄Π΅Ρ€ΠΆΠ°Π½ΠΈΠ΅ Π½Π΅ ΠΌΠ΅ΡˆΠ°Π΅Ρ‚ ΠΏΠΎΠ»ΡƒΡ‡ΠΈΡ‚ΡŒ
67
+ ΠΎΡΡ‚Π°Π»ΡŒΠ½Ρ‹Π΅ ΠΌΠ΅Ρ‚Ρ€ΠΈΠΊΠΈ. НСкоррСктная структура ΠΎΡ‚Π²Π΅Ρ‚Π°, ΠΎΡ‚ΠΊΠ°Π· сСрвСра ΠΈΠ»ΠΈ Π΄Ρ€ΡƒΠ³ΠΎΠΉ Π²Π»Π°Π΄Π΅Π»Π΅Ρ†
68
+ Π²Ρ‹Π·Ρ‹Π²Π°ΡŽΡ‚ `EditsError`. `client.retention()` β€” строгий Π²Π°Ρ€ΠΈΠ°Π½Ρ‚: Π±Π΅Π· Π³Ρ€Π°Ρ„ΠΈΠΊΠ° Π²Ρ‹Π΄Π°Ρ‘Ρ‚ ΠΎΡˆΠΈΠ±ΠΊΡƒ.
69
+ [ΠŸΡ€ΠΈΠΌΠ΅Ρ€ статистики](examples/reel_statistics.py), [ΠΏΠΎΠ΄Ρ€ΠΎΠ±Π½ΠΎ ΠΎΠ± ΡƒΠ΄Π΅Ρ€ΠΆΠ°Π½ΠΈΠΈ](docs/retention.md).
70
+
71
+ ## ΠœΠ΅Ρ‚ΠΎΠ΄Ρ‹ SDK
72
+
73
+ | ΠœΠ΅Ρ‚ΠΎΠ΄ | Π”Π°Π½Π½Ρ‹Π΅ | Π Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚ ΠΆΠΈΠ²ΠΎΠΉ ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠΈ |
74
+ |---|---|---|
75
+ | `reel_insights()` / `retention()` | ΠœΠ΅Ρ‚Ρ€ΠΈΠΊΠΈ Reel, кривая удСрТания | Π”Π°Π½Π½Ρ‹Π΅, 62 Ρ‚ΠΎΡ‡ΠΊΠΈ |
76
+ | `public_insights()` | Π‘Ρ‡Ρ‘Ρ‚Ρ‡ΠΈΠΊΠΈ ΠΈ коэффициСнты Reel | Π”Π°Π½Π½Ρ‹Π΅; ΠΏΡ€ΠΎΠ²Π΅Ρ€Π΅Π½ свой Reel |
77
+ | `reels_page()` / `account_reels()` | Бписок Reels, ΠΌΠ΅Ρ‚Ρ€ΠΈΠΊΠΈ, cursor | Π”Π²Π΅ страницы ΠΏΠΎ 3 Ρ€ΠΎΠ»ΠΈΠΊΠ° |
78
+ | `account_insights()` | АгрСгаты ΠΈ Π²Ρ€Π΅ΠΌΠ΅Π½Π½Ρ‹Π΅ ряды | Π”Π°Π½Π½Ρ‹Π΅ Π·Π° `LAST_30_DAYS` |
79
+ | `audience_insights()` | ДСмография, рост, Π°ΠΊΡ‚ΠΈΠ²Π½ΠΎΡΡ‚ΡŒ подписчиков | Π”Π°Π½Π½Ρ‹Π΅ Π·Π° `LAST_30_DAYS` |
80
+ | `reels_delta()` | ОбновлСниС ΠΌΠ΅Ρ‚Ρ€ΠΈΠΊ списка ID | Π”Π°Π½Π½Ρ‹Π΅ для ΠΎΠ΄Π½ΠΎΠ³ΠΎ ID |
81
+ | `comment_insights()` | Π‘Π»ΠΎΠΊ AI-Π°Π½Π°Π»ΠΈΠ·Π° ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠ΅Π² | Запрос принят, Π±Π»ΠΎΠΊ `null` |
82
+ | `kits()` | Наборы элСмСнтов Edits | Запрос принят, список пуст |
83
+ | `extended_reel_insights()` | ΠΠ»ΡŒΡ‚Π΅Ρ€Π½Π°Ρ‚ΠΈΠ²Π½Π°Ρ Π²Π΅Ρ‚ΠΊΠ° Instagram insights | ΠšΡ€ΠΈΠ²Π°Ρ удСрТания ΠΈ дСмография |
84
+
85
+ ```python
86
+ page = client.reels_page(first=3)
87
+ for item in page.items:
88
+ print(item["id"], item.get("permalink"))
89
+ if page.has_next_page:
90
+ next_page = client.reels_page(first=3, after=page.next_cursor)
91
+
92
+ account = client.account_insights(include_time_series=True)
93
+ metrics = account.get_data("xig_user_by_igid_v2", "basel_insights")
94
+ ```
95
+
96
+ `QueryResult.payload` Ρ…Ρ€Π°Π½ΠΈΡ‚ исходный ΠΎΡ‚Π²Π΅Ρ‚. `get_data()` Ρ€Π°Π·Ρ€Π΅ΡˆΠ°Π΅Ρ‚ фактичСскиС
97
+ canonical-ΠΈΠΌΠ΅Π½Π° (`1$xig_user_by_igid_v2(id:$user_id)` ΠΈ ΠΏΠΎΠ΄ΠΎΠ±Π½Ρ‹Π΅) ΠΏΠΎ логичСским
98
+ ΠΈΠΌΠ΅Π½Π°ΠΌ. Он Π½Π΅ Π½ΠΎΡ€ΠΌΠ°Π»ΠΈΠ·ΡƒΠ΅Ρ‚ Π΅Π΄ΠΈΠ½ΠΈΡ†Ρ‹ ΠΌΠ΅Ρ‚Ρ€ΠΈΠΊ. [Π Π°Π±ΠΎΡ‚Π° со всСми Π΄Π΅Π²ΡΡ‚ΡŒΡŽ ΠΌΠ΅Ρ‚ΠΎΠ΄Π°ΠΌΠΈ](docs/data-reference.md).
99
+
100
+ ## Консоль ΠΈ ΠΏΡ€ΠΈΠΌΠ΅Ρ€Ρ‹
101
+
102
+ ```sh
103
+ edits-api insights "https://www.instagram.com/reel/YOUR_SHORTCODE/" --output results/reel
104
+ edits-api retention "https://www.instagram.com/reel/YOUR_SHORTCODE/" --output results/curve
105
+ edits-api catalog
106
+ python examples/list_reels.py --first 3 --output results/page.json
107
+ python examples/account_statistics.py --period LAST_30_DAYS --output results/account.json
108
+ python examples/account_statistics.py --audience --output results/audience.json
109
+ ```
110
+
111
+ ΠšΠ°Ρ‚Π°Π»ΠΎΠ³ΠΈ/Ρ„Π°ΠΉΠ»Ρ‹ Π²Ρ‹Π²ΠΎΠ΄Π° Π΄ΠΎΠ»ΠΆΠ½Ρ‹ Π±Ρ‹Ρ‚ΡŒ Π½ΠΎΠ²Ρ‹ΠΌΠΈ. БСссия бСрётся ΠΈΠ· окруТСния, `--session
112
+ settings.json` Π»ΠΈΠ±ΠΎ `--session -` (JSON ΠΈΠ· stdin). Π‘Π΅ΠΊΡ€Π΅Ρ‚Ρ‹ Π½Π΅ ΠΏΠ΅Ρ€Π΅Π΄Π°ΡŽΡ‚ΡΡ Π°Ρ€Π³ΡƒΠΌΠ΅Π½Ρ‚Π°ΠΌΠΈ.
113
+
114
+ ## ДокумСнтация, ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠ°, Π³Ρ€Π°Π½ΠΈΡ†Ρ‹
115
+
116
+ Π’ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΈ 15 ΠΏΠΎΠ΄Ρ€ΠΎΠ±Π½ΠΎ Ρ€Π°Π·ΠΎΠ±Ρ€Π°Π½Π½Ρ‹Ρ… ΠΊΠΎΠ½Ρ‚Ρ€Π°ΠΊΡ‚ΠΎΠ², индСкс 88 ΠΎΠΏΠ΅Ρ€Π°Ρ†ΠΈΠΉ с ΠΈΠΌΠ΅Π½Π°ΠΌΠΈ
117
+ Basel/Eddy ΠΈ ΠΎΠ±Ρ‰ΠΈΠΉ рССстр 1663 ΠΎΠΏΠ΅Ρ€Π°Ρ†ΠΈΠΉ APK 448.0.0.53.84. НаличиС записи Π² APK
118
+ само ΠΏΠΎ сСбС Π½Π΅ Π΄ΠΎΠΊΠ°Π·Ρ‹Π²Π°Π΅Ρ‚ Ρ€Π°Π±ΠΎΡ‚ΠΎΡΠΏΠΎΡΠΎΠ±Π½ΠΎΡΡ‚ΡŒ. Π£ ΠΊΠ°ΠΆΠ΄ΠΎΠΉ записи свой ΡƒΡ€ΠΎΠ²Π΅Π½ΡŒ Π΄ΠΎΠΊΠ°Π·Π°Ρ‚Π΅Π»ΡŒΡΡ‚Π².
119
+
120
+ Swagger содСрТит Ρ€Π΅Π°Π»ΡŒΠ½Ρ‹ΠΉ `POST /graphql_www` ΠΈ Π΄Π΅Π²ΡΡ‚ΡŒ ΠΏΡ€ΠΈΠΌΠ΅Ρ€ΠΎΠ² Ρ„ΠΎΡ€ΠΌΡ‹ запроса,
121
+ Π° Π½Π΅ Π²Ρ‹Π΄ΡƒΠΌΠ°Π½Π½Ρ‹Π΅ REST-endpoints. ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€ Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚ локально Π±Π΅Π· CDN; ΠΎΡ‚ΠΏΡ€Π°Π²ΠΊΠ° запросов
122
+ Π² UI ΠΎΡ‚ΠΊΠ»ΡŽΡ‡Π΅Π½Π°. [Как ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ](docs/swagger.md).
123
+
124
+ ```sh
125
+ python -m unittest discover -s tests -v
126
+ python examples/offline_demo.py
127
+ python tools/generate_docs.py --check
128
+ python tools/check_release.py
129
+ ```
130
+
131
+ ВСсты синтСтичСскиС ΠΈ Π½Π΅ ΠΎΠ±Ρ€Π°Ρ‰Π°ΡŽΡ‚ΡΡ ΠΊ Instagram. [ΠžΠ±Π΅Π·Π»ΠΈΡ‡Π΅Π½Π½Ρ‹Π΅ ΡΠ²ΠΈΠ΄Π΅Ρ‚Π΅Π»ΡŒΡΡ‚Π²Π° ΠΆΠΈΠ²Ρ‹Ρ…
132
+ запросов](docs/evidence/method-verification.json) ΠΎΡ‚Π΄Π΅Π»ΡŒΠ½ΠΎ Ρ„ΠΈΠΊΡΠΈΡ€ΡƒΡŽΡ‚ Ρ€Π΅Π°Π»ΡŒΠ½ΡƒΡŽ ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΡƒ.
133
+
134
+ АвтоматичСских retries, Π²Ρ…ΠΎΠ΄Π°, обновлСния сСссии ΠΈ ΠΎΠ±Ρ…ΠΎΠ΄Π° challenge Π½Π΅Ρ‚. ΠŸΡ€Π΅Π΄Π΅Π»Ρ‹
135
+ запросов ΠΈ ΠΏΠ°ΠΊΠ΅Ρ‚ΠΎΠ² Π½Π΅ установлСны. Mutations Ρ‚Ρ€Π΅Π±ΡƒΡŽΡ‚ `allow_mutation=True`, Π½Π΅
136
+ входят Π² ΠΏΡ€ΠΎΠ²Π΅Ρ€Π΅Π½Π½ΡƒΡŽ Ρ‡Π°ΡΡ‚ΡŒ SDK ΠΈ Π² исслСдовании Π½Π° сСрвСрС Π½Π΅ Π·Π°ΠΏΡƒΡΠΊΠ°Π»ΠΈΡΡŒ.
137
+
138
+ Π’ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΈ Π½Π΅Ρ‚ APK, исходников Meta, cookies, Π»ΠΈΡ‡Π½ΠΎΠΉ Π°Π½Π°Π»ΠΈΡ‚ΠΈΠΊΠΈ ΠΈ ΠΌΠ΅Π΄ΠΈΠ°.
139
+ MIT относится ΠΊ ΠΎΡ€ΠΈΠ³ΠΈΠ½Π°Π»ΡŒΠ½ΠΎΠΌΡƒ ΠΊΠΎΠ΄Ρƒ ΠΈ Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΠΈ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°; Swagger UI ΠΈΠΌΠ΅Π΅Ρ‚ свою
140
+ [Π»ΠΈΡ†Π΅Π½Π·ΠΈΡŽ Apache-2.0](docs/swagger/vendor/LICENSE).
@@ -0,0 +1,30 @@
1
+ # GitHub repository metadata
2
+
3
+ **Repository name:** `instagram-edits-sdk`
4
+
5
+ **Description:**
6
+
7
+ > Unofficial Python SDK for Instagram Edits: Reel insights, retention curves, audience analytics, and reverse-engineered API documentation.
8
+
9
+ **Topics:**
10
+
11
+ `instagram` `instagram-edits` `python` `sdk` `reels` `analytics` `retention` `reverse-engineering` `openapi`
12
+
13
+ **Suggested About website:** leave blank until documentation is hosted.
14
+
15
+ **Initial release title:** `v0.2.1 β€” Reel analytics SDK and verified read methods`
16
+
17
+ **Release summary:**
18
+
19
+ > Installable Python SDK with Reel statistics that remain available when retention is missing, cursor-based pagination, account and audience analytics, examples, and local Swagger documentation. Nine read operations were exercised on one consenting account; comment analysis returned null and Kits returned an empty list. No mutations were tested. Not affiliated with Meta.
20
+
21
+ The repository, package distribution, and Python import have different names:
22
+
23
+ | Purpose | Name |
24
+ |---|---|
25
+ | GitHub repository | `instagram-edits-sdk` |
26
+ | Python distribution | `instagram-edits-sdk` |
27
+ | Python import | `edits_api` |
28
+ | CLI | `edits-api` |
29
+
30
+ The GitHub repository contains the SDK source, examples and documentation. Installation instructions are in README.md. The first PyPI release is being prepared. No hosted API is provided.
@@ -0,0 +1,13 @@
1
+ # Credentials and private data
2
+
3
+ Report credential exposure privately to the repository maintainer; do not paste
4
+ tokens into an issue. This repository does not operate an authentication service.
5
+
6
+ Session credentials belong in your secret manager or a local ignored file.
7
+ Exports can contain personal analytics and signed media URLs. Do not commit them.
8
+ If a credential was exposed, end the relevant Instagram session using Instagram's
9
+ account controls and replace the credential in your service.
10
+
11
+ The client verifies TLS, does not follow redirects with credentials, bounds
12
+ response sizes and timeouts, and does not log request headers. It does not bypass
13
+ Instagram account challenges or implement arbitrary-target HTTP requests.