Answer the question
In order to leave comments, you need to log in
How to download 12 million Instagram photos?
Hello.
The task is to download photos from 12 million profiles, about 50 photos from each.
The API is probably not worth considering, + I heard that it is problematic to get access to it.
Questions are simple:
-How to do?
-What instrument?
- Has anyone had any experience?
-What are the restrictions on the API, and on http requests?
I would appreciate any advice and experience.
Answer the question
In order to leave comments, you need to log in
API for Instagram is problematic to get. their native API (which was before they were bought by Facebook) is declared deprecated and in fact almost does not work, and the new one, through Facebook, requires a lot of confirmations, and it is unlikely that Facebook will be allowed to massively pull data through the API.
However, in the case of Instagram, this is generally not necessary. the site is written in React (and, unlike Facebook's meaty code, it is written very cleanly and modernly), so in fact the process of collecting data in their case is extremely simple:
When querying the GraphQL API, one thing needs to be taken into account. Now Instagram requires a "signature" of requests, it's done like this:
The variable vars
passed to JSON.stringify()
is the content of the field variables
from the GraphQL query.
Instagram itself does not ban for constant requests, but if you start getting impudent, it turns on throttling, starting to give HTTP 429 for some time (up to 5-10 minutes), after which everything moves on. Thus, parallelization + proxies solve the problem quite effectively.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question