
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
This package lets you use Instagram's Internal Web API through simple functions and classes. Pinsta uses Instagram's Original Web API to scrape data which makes it a reliable choice over other third-party scrapers. This library mainly focuses on Simplicity & Reliability.
Two type of classes are supported - Guest & Host.
[#02] AutoHost is released! Authentication update to the Host Class.
[#01] Users can now log in through their Username and Password to generate SessionId! See this
To install this package using Python's PIP, run this command in a terminal window:
$ pip install pinsta
To update the existing package, run:
$ pip install pinsta --upgrade
This mode doesn't require login and can be used to fetch publicly available data from Instagram's Servers. Following methods are supported till now:
Here's an example where an instance of Guest Class is created to fetch Cristiano Ronaldo's profile information:
from pinsta import Guest
guest = Guest()
profile = guest.profile("cristiano")
if profile is None:
print("Something went wrong.")
else:
print(profile.biography)
print(profile.follower_count)
print(profile.following_count)
Host mode requires login through SessionID, which should be passed as an argument during initialization. It can be used to take actions that require login. Additionally, users can manage their own profile through this class.
These are the methods supported till now:
Here's an example where an instance of Host Class is created to follow Cristiano Ronaldo's account:
from pinsta import Host, NewSessionID
sessionid = NewSessionID("username", "password")
host = Host(sessionid)
status = host.follow("cristiano")
if status is None:
print("Something went wrong.")
else:
if status.following:
print("Following!")
elif status.follow_requested:
print("Requested to follow!")
Note:
When you create a new sessionid through NewSessionID(), it's recommended to save it somewhere, and use the same sessionid (instead of creating a new one each time you need) until it expires or becomes invalid.
This should be done to avoid unnecessary prolonged wait time while generating a new sessionid and also to prevent getting your account from getting flagged because of repetitive logins.
Every function should return None on failure. So, it's recommended to add an if statement before using the actual data to avoid TypeErrors. Here's an example:
from pinsta import Guest
guest = Guest()
available = guest.username_availability("cristiano")
if available is None: # 'None' indicates failure
print("Something went wrong.")
else:
print(available)
If you wish to help me in the development of Pinsta, consider donating:
This is a third-party package, and not approved by Instagram. It doesn't promote illegal activities or activities that violate Instagram's Community Guidelines such as spamming users, creating bot accounts, misusing data etc. You are solely responsible for all the actions you take using this package.
FAQs
🔥 Fastest & Simplest Python Package For Instagram Automation
We found that pinsta demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.