Rate limiting in targeting_criteria/network_operators endpoint


#1

Hi,

I notice my requests to this endpoint seem to hit the rate limit very early. In my latest test, after waiting about an hour, I hit it with twurl, and it succeeded about 15-16 times before starting to return: “Rate limit exceeded”

The query:

twurl -H ads-api.twitter.com “/0/targeting_criteria/network_operators?q=rogers&count=1”

The documentation page claims a rate limit of 2000 in 15 minutes, and I’m absolutely sure we weren’t within an order of magnitude of that. And we aren’t seeing this error for other targeting_criteria endpoints (e.g. location, platform_versions). Any advice?

Thanks!
Will


#2

@Will_Parker could you try using -t with your twurl requests? That returns a lot of valuable information that will enable you to track how many requests you have remaining within a current rate limit window and when it resets.

twurl -t -H ads-api.twitter.com "/0/targeting_criteria/network_operators?q=rogers&count=1" | jq .

-> "x-rate-limit-limit: 400\r\n"
-> "x-rate-limit-remaining: 397\r\n"
-> "x-rate-limit-reset: 1434108446\r\n"