Instaloader is the Python tool most people start with to read Instagram. It's maintained (version 4.16 shipped in October 2026), but it reads Instagram the way a browser does, so it runs into the limits Instagram sets for browsers: anonymous requests get rate limited fast, and the fix is to sign in with an account that Instagram can then flag.
This guide reads the same data with SocialTap: profiles, posts and reels, comments and hashtags, with no login and no session file.
Why Instaloader stops working
Instagram limits how often one IP address may read profiles logged out, and more strictly for cloud servers. Instaloader's own docs say cloud, VPN and proxy IPs "might be subject to significantly stricter limits for anonymous access". The errors people report most:
401 Unauthorized, "Please wait a few minutes before you try again" (#2501, #2511), in dozens of issues since 2025.429 Too Many Requestsonweb_profile_info(#2726, #2786).- "login and load-cookies are broken" with
feedback_required(#2792), opened after 4.16 shipped.
The usual Instaloader script reads a profile, then walks its posts:
import instaloader
L = instaloader.Instaloader()
profile = instaloader.Profile.from_username(L.context, "nasa")
for post in profile.get_posts():
print(post.date, post.likes, post.caption)When that hits a 401, the advice is to sign in with L.login() or load a session file, which ties the scraper to an Instagram account. instagrapi also needs an account, and its own README calls private-API automation "fragile in production".
The same data with one API key
SocialTap reads Instagram logged out, through its own proxies, and returns live data in one schema. Install the SDK:
pip install socialtapGet a key on the signup page and set it as SOCIALTAP_API_KEY. Every account starts with 100 free credits. This reads one profile:
from socialtap import SocialTap
client = SocialTap() # api_key defaults to os.environ["SOCIALTAP_API_KEY"]
res = client.instagram.profile.get(handle="https://www.instagram.com/natgeo/")
print(res.data)
print(res.credits.charged, res.meta.request_id)You get the follower, following and post counts Instagram shows, the bio, links, verification, category and profile picture. A private account still returns its profile, with is_private true, the way Instagram shows it to a visitor.
Walk an account's posts
Instaloader's profile.get_posts() becomes client.instagram.posts.iterate(). It returns posts, reels and carousels, newest first, 12 a page, and stops at the guard you set:
from socialtap import SocialTap, APIError, NotFoundError, PrivateOrUnavailableError
client = SocialTap() # api_key defaults to os.environ["SOCIALTAP_API_KEY"]
try:
# Stops at the end of the list, or at the first guard it reaches.
items = client.instagram.posts.iterate(handle="nasa", max_pages=10, max_credits=100)
for item in items:
print(item)
print(items.pages_fetched, items.credits_charged, items.stop_reason, items.end_reason)
except NotFoundError as err:
# The item does not exist or was deleted.
print(err.code, err.remediation)
except PrivateOrUnavailableError as err:
# The item exists but isn't public: it is private, age- or region-restricted, or needs a login.
print(err.code, err.remediation)
except APIError as err:
# Retryable errors reach you only after the SDK's own retries. Failed requests cost no credits.
print(err.code, err.status, err.retryable, err.remediation, err.request_id)Each post has its caption, hashtags, mentions, publish time, tagged accounts, media and its like, comment and view counts. Pinned posts come first, as on the profile. A like count the owner hides is null, never zero.
From Instaloader to SocialTap
| Instaloader | SocialTap | Endpoint |
|---|---|---|
Profile.from_username(L.context, name) | client.instagram.profile.get() | Instagram Profile API |
profile.get_posts() | client.instagram.posts.iterate() | Instagram Posts API |
Post.from_shortcode(L.context, code) | client.instagram.post.get() | Instagram Post API |
post.get_comments() | client.instagram.comments.iterate() | Instagram Comments API |
Hashtag.from_name(L.context, tag).get_posts() | client.instagram.hashtag_posts.iterate() | Instagram Hashtag Posts API |
There is no L.login() line in the SocialTap version, and nothing to keep in a session file.
What it costs
You pay per successful request, and a list request returns a page:
- Posts of an account: $0.06–$0.17 per 1,000 posts.
- Comments: $0.03–$0.08 per 1,000 comments.
- Profiles: $0.75–$1.97 per 1,000 profiles.
Failed requests and cache hits cost nothing. See plans and packs.
Frequently asked questions
Why does Instaloader say "Please wait a few minutes before you try again"?
Instagram is rate limiting your IP address. It allows few logged-out profile reads per IP, fewer from cloud servers, and answers 401 or 429 past that. Waiting works for a while, and signing in moves the limit to your account.
Do I need an Instagram account or a session file?
No. SocialTap reads what Instagram shows a logged-out visitor, with its own proxies and sessions. You send a username, a profile link or a post link with your SocialTap API key.
Can I download Instagram photos and videos?
Yes. Each post's media lists its photos and videos with their links, so you can download the files yourself. Instagram's media links expire after a while, so download them soon after you read the post.
Does it read private accounts or stories?
No for private posts: a private account returns its profile with is_private true, and its posts aren't public. Stories in a profile's highlights are public, and the Instagram Highlights API reads them.
Is there an official Instagram API for this?
Only for business and creator accounts. Meta's Instagram API reads other accounts through Business Discovery, which needs App Review and your own professional account, and personal accounts aren't returned. The Instagram API page compares the two.