Skip to content

Product Advertising API - 429 Too Many Requests

0

Per PA API documentation, there is a 1 TPS limit on PA API calls such as SearchItems, GetItems, GetVariations, and an 8640 request limit per day. However I've typically been seeing 429 responses far earlier this, maybe even within the first 50 requests, even though all requests are spaced out by 5 or more seconds as a precaution. This is implemented through a separate queueing service I've built. Further - when we do receive a 429, we back off for 60 seconds (120 on a 2nd consecutive occurrence), however this seems to have no effect on anything really.

There is no way through the API, a dashboard, or Amazon support to identify the cause of these rejected requests (the support team directed me here) or to get any answers about the actual logic that is used to return a 429. Just vague prescriptions to read the docs, which I've done.

So - I'm reaching out to the community to see if anyone has identified reliable methods of avoiding the 429 response, as spacing requests out much further than 1 TPS has not helped. There are a few other related PA API questions on this site, a few about 429's, but none have definitive solutions.

1 Answer
0

The issue you're experiencing with the Product Advertising API (PA API) and receiving 429 Too Many Requests errors is a common challenge. While the documentation states a 1 TPS (transaction per second) limit and an 8640 request limit per day, the actual implementation of rate limiting can be more complex and may depend on various factors.

To address this issue, consider the following approaches:

  1. Implement exponential backoff: Instead of a fixed backoff time, use an exponential backoff strategy. Start with a short delay (e.g., 1 second) and double it for each consecutive 429 error. This approach is more adaptive to varying levels of throttling.

  2. Distribute requests: If you're making requests for multiple marketplaces or using multiple API keys, ensure you're distributing the requests evenly across them to avoid hitting limits on a single endpoint or key.

  3. Monitor and adjust: Keep track of your request patterns and success rates. If you notice certain times of day or types of requests are more likely to trigger 429 errors, adjust your strategy accordingly.

  4. Optimize request volume: Analyze your application's needs and try to reduce the number of API calls by batching requests where possible or caching results that don't need real-time updates.

  5. Check for hidden limits: While the documentation mentions specific limits, there might be additional, undocumented limits based on factors like the age of your account, your usage history, or the specific endpoints you're calling.

  6. Verify API credentials: Ensure your API credentials are correct and that your account is in good standing with Amazon.

  7. Consider time synchronization: Make sure your system clock is accurately synchronized, as timestamp discrepancies can sometimes lead to unexpected rate limiting.

Remember that the exact logic behind Amazon's rate limiting for the PA API isn't publicly disclosed, and it may change over time. Continuous monitoring and adaptation of your approach based on observed behavior is key to maintaining reliable access to the API.
Sources
Problem with Amazon API | AWS re:Post
Amazon PA API 5.0 - GetItems - book description | AWS re:Post

answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.