Problem with getting Instagram hashtag json without api into google sheets

前端 未结 1 619
滥情空心
滥情空心 2021-01-16 09:11

I\'m trying to get a hashtag JSON back from Instagram to google sheets. I get the JSON if I put the URL in a browser but not using google sheets script (it used to work in t

相关标签:
1条回答
  • 2021-01-16 09:56

    There are two things that you are using.

    1. browser
    2. is google sheets script.

    The reason why you are getting error is Instagram bot which actually tracks your IP when you make a request to it. When you are logged into your browser and request this https://www.instagram.com/explore/tags/"+tag+"/?__a=1 then you will always get data without being blocked.

    But now, after the deprecation of old Instagram developer tool the rate limit of endpoints have reduced to 200 per hour. You get blocked because you cross the limit and Instagram bot takes time to reset your limit again.

    It may take 2-3 days or more depending on frequency of getting blocked. Yhe solution is if you properly apply session and cookies to request headers then it will surely help you.

    0 讨论(0)
提交回复
热议问题