Skip to main content

🔥 Fastest & Simplest Python Package For Instagram Automation

Project description

Ensta - Free Instagram API

PyPI PyPI - Python Version Downloads Twitter Share

Ensta uses Instagram's Internal Web API for data scraping which makes it a reliable choice over other third-party libraries. Also unlike other libraries, ensta always remains up-to-date.

Two type of classes are supported - Guest & Host.

Installation

Run this command:

$ pip install ensta --upgrade

Supported Actions

You can do a lot with ensta, here's a list:

  • Username/Password & SessionID Login
  • Upload Posts - With Caption, Comments Enabled, etc.
  • Check Username Availability
  • Fetch Profile Data
  • Convert Username to UID, and vice versa.
  • Follow/Unfollow Users
  • Generate Followers/Followings List
  • Change Account Type - Public/Private
  • Generate Posts List
  • Fetch Post Data
  • Like/Unlike Post
  • Edit Biography & Display Name
  • Fetch your Email, Gender, Date of birth, etc.

Any missing feature? Raise an issue.

🧔🏻‍♂️ Host Mode

Requires login through Username/Password or SessionId. Can fetch data that requires login. Can update your profile info.

from ensta import Host

host = Host(username, password)

print(host.profile("leomessi"))
print(host.follow("leomessi"))
print(host.change_bio("hello"))

🧔🏻‍♂️ Guest Mode

Doesn't require login but is limited to certain actions.

from ensta import Guest

guest = Guest()

print(guest.profile("leomessi"))
print(guest.get_uid("leomessi"))
print(guest.username_availability("nevergiveup"))

👨🏻‍💻 Code Samples

Followers / Followings List

from ensta import Host

host = Host(username, password)

followers = host.followers("cristiano")
followings = host.followings("cristiano")

for user in followers: print(user.username)
for user in followings: print(user.username)

Follow / Unfollow People

from ensta import Host

host = Host(username, password)

print(host.follow("cristiano"))
print(host.unfollow("cristiano"))

Fetch Profile Data (Host)

from ensta import Host

host = Host(username, password)
profile = host.profile("cristiano")

print(profile.full_name)
print(profile.biography)

Fetch Profile Data (Guest)

from ensta import Guest

guest = Guest()
profile = guest.profile("leomessi")

print(profile.biography)
print(profile.full_name)

Update Profile

from ensta import Host

host = Host(username, password)

print(host.change_display_name("Lionel Messi"))
print(host.change_bio("Athlete"))

Upload Post

from ensta import Host

host = Host(username, password)

status = host.upload_post(
    photo_path="Picture.jpg",
    caption="Enjoying the sunset! 🌇",
)

print(status)

Generate Posts List

from ensta import Host

host = Host(username, password)
posts = host.posts("leomessi")

for post in posts:
    print(post.caption_text)  # Post Data
    print(post.like_count)  # Post Data
    
    print(post.like())  # Like()
    print(post.unlike())  # Unlike()

    likers = post.likers()  # Likers List
    for user in likers: print(user.username)

Get Your Private Info

from ensta import Host

host = Host(username, password)
me = host.private_info()

print(me.biography)
print(me.gender)
print(me.birthday)
print(me.email)

❤️ Support Me

If you think this library is useful, please consider donating:

Disclaimer

This is a third-party package, and is not associated with Instagram. It doesn't promote activities that violate Instagram's Community Guidelines such as spamming users, misusing data etc. You are solely responsible for all the actions you take using this package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ensta-4.8.tar.gz (19.3 kB view hashes)

Uploaded Source

Built Distribution

ensta-4.8-py3-none-any.whl (22.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page