| .github/workflows | ||
| reqs | ||
| src | ||
| tests | ||
| .gitignore | ||
| changelog.md | ||
| config.nims | ||
| instagram.nimble | ||
| license | ||
| readme.md | ||
Instagram internal web api implementation
Warning
The maintenance of this project is currently suspended. And since it's a internal API implementation, things break easier.
About
This library is a implementation of internal Instagram web API.
With this library, you can get data and even interact with Instagram!
Features
ig.sharedData: Logged account data
The following internal endpoints are implemented:
GET
ig.user("username")(/api/v1/users/web_profile_info): Gets all info used to render the user pageig.post("postId")(/api/v1/media/{postId}/comments): All data used to render the postig.followers("userId")(/api/v1/friendships/{userId}/followers): User followersig.following("userId")(/api/v1/friendships/{userId}/following): User followingig.feed("userId")(/api/v1/feed/user/{userId}): Feed data, posts
POST
ig.follow("userId")(/api/v1/friendships/create/{userId}): Follows the userig.unfollow("userId")(/api/v1/friendships/destroy/{userId}): Unfollows the userig.like("userId")(/api/v1/web/likes/{postId}/like): Likes the postig.unlike("userId")(/api/v1/web/likes/{postId}/unlike): Remove the like of post
* Ig is a Instagram object
Usage
Warning
This implementation may violate the Instagram's terms of use, to prevent bans, call the API with random delays to looks like a human.
The full documentation is hosted at Github Pages
Let's start with the usage guide
Getting data
To use the lib, you'll need a Instagram object instance, it stores your
authentication cookies, the CSRF cookie and extra IDs
To create one:
import std/asyncdispatch
let ig = waitFor newInstagram() # No cookies, there's rate limit and limited just to GET functions
# or
let loggedIg = waitFor newInstagram "YOUR COOKIES" # With login
To get cookies, consider using iecook because it gets the HttpOnly cookies, the needed ones. automatically.
[...]
TODO
-
followandunfollowneeds to return the response object -
POST
- Create posts
- Create status posts
- Comment in a post
-
GET
- Get post comments
- Get your following state of a user
Resources
Related
- https://github.com/pavlovdog/Instagram-private-API/blob/master/api.py
- https://github.com/dilame/instagram-private-api
- https://github.com/ping/instagram_private_api
License
This library is licensed over MIT license!