Rate Limit question - How can I avoid continuously exceeding, or coming close to exceeding, my Rate Limit?

270 views
Skip to first unread message

steve

unread,
Sep 15, 2016, 9:16:35 AM9/15/16
to Etsy API
Hello, I am developing an application that makes calls to retrieve Etsy Listings data, normally with the Limit set to 100 per call. And example call:

https://openapi.etsy.com/v2/listings/active?api_key=" . $APIKey . "&limit=100&sort_on=score&sort_order=down&keywords=basketball%20shorts

Additionally, while parsing the returned data, the app will make another call to get that particular listing's thumbnail image:

$images = json_decode(file_get_contents("https://openapi.etsy.com/v2/listings/" . $product->listing_id . "/images?api_key=" . $APIKey));
$products[$i]["thumb"] = $images->results[0]->url_75x75;

I currently have a Rate Limit of 12 calls per second, but I am still getting the following messages from Etsy Developer Support:

This message is to notify you that you are near the limit of your Etsy API quota. You have reached 80% of your quota of: 12 requests per 1 second(s)

I have a few questions:

1. Every time I make an Active Listings call, with a Limit of 100, am I already exceeding my quota of 12 request per second? (maybe because of the $images call?)
2. I intend to provide this application to Etsy sellers free of charge, which will result in many people simultaneously making calls. I've read each user gets their own Rate Limit, but will I need to use OAuth authentication, or get a full production key to do so? And must each user register before getting access to my application? (I'd prefer no registration required)
3. Considering the purpose of my application is just for retrieving Listings data, not modifying listings/shops, should I get a read-only key? 

Also, I should note I am using caching and limiting to one call per 10 seconds.

Steve

steve

unread,
Sep 21, 2016, 2:55:50 PM9/21/16
to Etsy API
I'd like to update...

I did some testing and found it was the $images call that was putting me over the limit (for the most part). I reduced the $images calls to just the top ten returned listings (before I was grabbing 100 each call), that has reduced the number of Rate Limit warnings I've been getting from Etsy Developer Support. Although I still get them from time to time, it's now at a manageable level. But I'm still curious as to how I will handle many simultaneous users, I guess I must use OAuth authentication, or get a full production key?
Reply all
Reply to author
Forward
0 new messages