Skip to content

Common Pitfalls

Blitz Rakete edited this page Jul 26, 2017 · 2 revisions

I want to get >3,000 objects from the API, why is this not possible?

Although it looks like everything is sent in a single request, that it not true. The API only allows up to 100 results per request (except for the sites method), so if you specify more than 100 users, you'll get amount / 100 requests. For 3,000 users, that results in 30 requests per second, which the API doesn't allow.

You need to send for example 1,000 users, wait a bit, and then repeat to avoid getting banned.

Why are max_quota() and/or remaining_quota() not changing even after several requests?

That is because you filtered out the quota_max and/or quota_remaining fields from the Common Wrapper. Don't filter them out if you want to read these.

Requests with more than 100 objects don't seem to work, returning only the first 100. Why?

This is probably because you filtered out has_more. This field is used by the API to check if there are more results to get, and if you filter it out, it will think that every object has already been returned.