The error#
RateLimitError is raised when error_type is rate_limit_error. The message is whatever Instagram put in message. The class is a subclass of PrivateError.
HTTP 429 is a different class. The log line is:
Status 429: Too many requestsand the exception is ClientThrottledError. Its docstring says it is raised due to a HTTP 429 response.
SentryBlock is the neighbour: error_type == "sentry_block". It is not a rate limit.
What triggers it#
A 400 whose error_type is rate_limit_error, or any status 429 in private_request. The GraphQL mixin raises RateLimitError for the same error type.
How to confirm#
Print the class. RateLimitError means the JSON error type. ClientThrottledError means HTTP 429. PleaseWaitFewMinutes means the message text contained Please wait a few minutes, which is checked earlier.
Fixes#
The library does not add a sleep on these raises. Your caller has to wait. ClientThrottledError is the HTTP status. Back off before the next private request. Running the same session from many workers spends the limit faster. RateLimitError is the account or app limit Instagram named. A new proxy does not reset an account limit.
SocialScrape#
Instagram profile is GET /v1/instagram/profile. A private account comes back with is_private true. Posts are GET /v1/instagram/profile/posts, and one post is GET /v1/instagram/post.
Failed requests cost 0 credits. New accounts get 100 credits on signup, no card. Codes are on errors.