429 Too Many Requests on web_profile_info
Describe the bug
Profile.from_username() returns a 429 Too Many Requests on the very first request to api/v1/users/web_profile_info/, with no prior requests made in the session. This is reproducible:
- On a completely fresh, valid session cookie (not previously rate-limited)
- Across three distinct networks: mobile data, home wifi, and a VPN
- When making the request fully anonymously (no session/login at all), against a public account (
@instagram) - On the latest released version (4.15.3)
This suggests either a broad throttle on the web_profile_info endpoint independent of account/IP/session, or a change in Instagram's expected request shape/headers that current Instaloader isn't matching.
To Reproduce Run the following minimal script with no session attached:
import instaloader
L = instaloader.Instaloader(
download_pictures=False,
download_videos=False,
download_comments=False,
download_geotags=False,
save_metadata=False,
compress_json=False,
max_connection_attempts=1,
request_timeout=30,
)
profile = instaloader.Profile.from_username(L.context, "instagram")
print(profile.followers)- Observe 429 on the first and only request made in the session.
- Repeated on a separate run with a valid
sessionidcookie attached (own account, freshly obtained), same result. - Repeated across mobile data, home wifi, and VPN; same result on all three.
Expected behavior A single, first request in a fresh session (with or without authentication) should not be rate-limited expected either a successful response or, if Instagram is now blocking anonymous/first-touch requests to this endpoint outright, a clearer error than a generic 429.
Error messages and tracebacks
JSON Query to api/v1/users/web_profile_info/: 429 Too Many Requests when accessing https://www.instagram.com/api/v1/users/web_profile_info/?username=instagram [retrying; skip with ^C]
Number of requests within last 10/11/20/22/30/60 minutes grouped by type:
* other: 1 1 1 1 1 1
Instagram responded with HTTP error "429 - Too Many Requests". Please
do not run multiple instances of Instaloader in parallel or within
short sequence. Also, do not use any Instagram App while Instaloader
is running.Note: this was the first and only request made not a result of request volume.
Instaloader version 4.15.3
Additional context
- Running inside Termux on Android 14 (aarch64), Python 3.14.6.
- Isolated the cause methodically: ruled out IP/network (three different networks tested), ruled out session/account (reproduced fully anonymously), ruled out outdated client (confirmed on latest version).
- Tried to inspect the underlying HTTP response for rate-limit headers (e.g.
Retry-After) via theConnectionException, butresponse/headerswere not reachable from the exception object (came backnull) so no header-level detail available from the client side, in case that's itself informative about how the exception is structured.
Source: instaloader/instaloader