Skip to content
TORNLIFE More

API calls noob question

Started by Asshole [949262] on in API Development.

13 replies · 326 views · thread synced · 10 days ago · View on torn.com
About this thread

Posts archived: 14 / 14 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
14
Discussion span
→
People posting
10
Likes on archived posts
5
Authority score
67 / 100
Historical score
25 / 100
Story score
34 / 100
Engagement score
59 / 100
Asshole [949262]

Would I get in trouble if I made a large amount of API calls to torn using a script?

I've noticed in the documentation that API calls to torn are limited to 100 per minute per key. So, just wondering if it's safe to do like 50,000 API calls over the necessary period of time.

I might even be planning to have multiple people doing a bunch of requests at the same time. Would that break the server or something.
Pi77Bull [2082618]

If you don't go over the limit of 100 calls per minute you'll be fine. If you go over that limit you'll be temporarily banned from accessing the API. It would definitely not break the server ^^
Murky [1839173]

the temporary ban for violating >100 calls a minute is 10 minutes where your API requests will return an error, something like "Too many requests".
madnessReigns [2109369]

To be safe, limit calls to 95 per minute and run the jobs on a time delay. That should allow you enough room for error in case anything happens. Good luck with the data acquirement.
Mephiles [2087524]

If you have enough users for the script then you will probably be okay. I would keep the limit to either 30 (if u have enough users) or at maximum 60 requests as people will be using other scripts also.

Also be sure to notify your users that they are making so many requests for your "database?".
Asshole [949262]

yeah i keep getting the "too many requests" response even though I'm making only ~80 requests per minute. 60 is probably better.
Murky [1839173]

i also had to reduce requests per minute.  It would be nice to know if they officially reduced the limit or not so people know.
Meme_Raven [1891116]

Don't pull a McNeo - if you're expecting to make a large amount of calls (20+) add a sleep timer between each calls to reduce load on the servers. example, for up to 40 calls per minute, add a 0.5 - 1 sec sleep timer.

Things like up to 10, it'll be more efficient to do it all in one go.
Baldr [1847600] Reporter

Honestly, anything that requires 50,000 API calls sounds like you either shouldn't be doing it, or need to seriously rethink what you are trying to accomplish and how to get there.