Search in iTunes JSON API returning 403 on the server

Within six weeks or so, we were able to fulfill JSON API search requests in iTunes without any problems. Starting this week, we began to see 403 errors after a certain number of requests (about 1K - 2K). We assume that this is a problem of rate limits, perhaps a new policy that they have implemented. Is there another explanation that we don’t notice?

+6
source share
2 answers

How you want to get the price and ratings, my guess is that you are performing a search, not a search, using the iTunes Search API.

If this assumption is correct, you can "batch" search for queries by listing several ADAM identifiers in the query, separating them with a comma.

eg. To get results for both of these apps in the USA -

https://itunes.apple.com/us/app/9-innings-2013-pro-baseball/id530061728?mt=8

https://itunes.apple.com/us/app/homerun-battle-2-free/id491221570?mt=8

- you would do this: https://itunes.apple.com/us/lookup?id=491221570,530061728

I believe that the limit is 50 identifiers for each request.

If approximately 900 thousand applications currently live in the App Store , some quick maths show that before batch processing, if you evenly distribute your requests, you will make ~ 625 requests / minute. (900K / 24 hours / 60 minutes == 625)

However, if you order them in groups of 50, then you look at about 13 requests per minute (900K / 50 per request / 24 hours / 60 minutes == 12.5). This should be within the acceptable range.

... @Crashalot - if you make recommendations for use, then we need to talk.

+14
source

I don't believe there are any published speed limits, but I think it's pretty safe to assume that they exist. What is the timeline for 1-2 thousand requests that you use - minutes, hours, days?

Apple really recommends caching to prevent unnecessary requests. If you are not doing this already, then you should probably study it. Another option is to use a corporate affiliate feed , although you need to become an iTunes partner for access.

+1
source

Source: https://habr.com/ru/post/946654/


All Articles