0

I am using Instaloader via command line on Windows 11, with the following command:

.\instaloader --login=MYUSERNAME :saved --dirname-pattern="Saved_Posts\{profile}" --filename-pattern="{profile}-{shortcode}" --no-resume --no-metadata-json --slide 1 --no-captions --no-video-thumbnails --no-iphone

This attempts to download approximately 12,000 saved posts from a profile. Instaloader behaves as expected for several thousand posts, occasionally giving the following error:

Too many queries in the last time. Need to wait 15 seconds, until 13:19.

The process then resumes successfully for several hundred more posts. Eventually, however, I start encountering 429 errors:

JSON Query to graphql/query: 429 Too Many Requests [retrying; skip with ^C]
Number of requests within last 10/11/20/22/30/60 minutes grouped by type:
   d6f4427fbe92d846298cf93df0b937d3:    0    0    0    0    0    0
   f883d95537fbcd400f466f63d42bd8a1:    0    0    0    1    1   11
 * 2b0673e0dc4580674a88d426fe00ea90:   59   64  121  134  191  709
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.
The request will be retried in 7 seconds, at 14:01.

This error then repeats over and over again, I believe until the default maximum connection attempts limit is reached and it moves onto the next post — which also receives the same error. Importantly, this error does not go away after several hours of these 'slower' requests being made; it seems to persist as long as Instaloader stays open. I have seen these 429 errors with very few requests in the last 60 minutes (i.e. <100), which makes me think I am hitting quite a long shadowban.

I have tried setting the maximum connection attempts to 0 (i.e. retry indefinitely), but this time limit appears to be capped at 666 seconds, or 11 minutes. The error does not seem to clear even leaving Instaloader to send requests every 11 minutes in this way; it is as though each individual request 'resets' the ban or something.

I am looking for a way of resolving this issue, which could include:

  • Adding a command to force 429 errors to be retried after subsequently longer periods of time (instead of the number of seconds being capped at 666 seconds)

  • Adding a command that 'preserves' wait times after each 429 error. e.g. if downloading Post 456 fails and retries after 5, then 10, then 15 seconds before successfully downloading, and then downloading Post 457 immediately fails... start the wait for a retry on Post 457 at at LEAST 15 seconds, rather than going back to 5!

  • Avoiding the 429 errors in the first place, if there appears to be an issue with my command line prompt

  • Breaking down the request into 'batches' and running one of those prompts every few days. e.g. is there a way to download Saved Posts 1-500, then 500-1000, and so on? (The Saved Posts are not necessarily in chronological order of the post date, which is what I've tried so far)

I have looked at several other posts on 429 errors but the general theme seems to be either:

  • Wait some time for the issue to clear — have tried this for up to 48 hours, but running the command again starts from post #1 and never makes it to the latter half of posts

  • Disable iPhone API requests — already done, which helps but does not solve the issue

  • The 429 errors simply should not be encountered during normal behaviour – well, they are!

Jack Nagy
  • 3
  • 1
  • 5

0 Answers0