user3333280
user3333280

Reputation:

Why pinterest X-Ratelimit-Remaining: 0 for endpoints I have not even used?

I've developed a Pinterest app using C#. I'm using no plugin. I use .Net httpclient to interface the pinterest api. All works fine! But I've been fighting to get their api to respect their promise based on their documentation that says

Each app (with a unique app ID) is allowed 1000 calls per endpoint per hour for each unique user token

I'm using Fiddler to monitor and debug and notice the following:

  1. I make 1000 successful call to this endpoint /v1/me/following/users/
  2. I get the 429 You have exceeded your rate limit. Try again later. That's exactly what's expected according to Pinteret API documentation.
  3. Then I call a whole different endpoint /v1/pins/ and still get 429 You have exceeded your rate limit. Now that's not what the Pinterest API documentation says! Unless I misunderstood the doc.

I tried to run the app in single mode but get the same result as parallel mode which run multiple accounts.

Any help will be greatly appreciated!

Upvotes: 1

Views: 1166

Answers (1)

user1666620
user1666620

Reputation: 4808

Check the EULA more closely - some services will ratelimit if you make too many requests in too short a timespan, as that could have the same affects as a denial of service attack.

In other words, they might say you can make 1000 requests per hour, but that doesn't mean you can make 1000 requests in the space of 1 second, and then wait an hour before making another 1000 requests in a second.

Instead, what you can do is batch your requests. Break your 1000 requests down into batches of 10 (or 20, or 50, or 100) requests, with an X-second wait between each batch.

At the end of the day though, if you feel that Pinterest isn't abiding with their terms of service (such as through a bug in the API or incorrect documentation), then that is something you will have to take up with them.

Upvotes: 2

Related Questions