Site
Home / Forum / Developers / Rate Limit

Rate Limit


Posted: 11 May 2023 13:43

zag
Admin
Posts: 3,853
Joined: 2020

I see lots of developers potentially going over the rate limit.

Please remember to limit requests to at maximum 2 per second.
You will get a 429 response if you go over and be banned for 1 minute.

We need to protect the speed of the overall site.

transparent spacer
Posted: 12 May 2023 17:06


No problem! Will adjust all scripts to take this factor into consideration. Its a good implementation overall so everyone can enjoy the site equally.

zag
transparent spacer
Posted: 12 May 2023 21:50

zag
Admin
Posts: 3,853
Joined: 2020

Yes its only there to protect all users of the site and speed. We try to be as generous as possible.

transparent spacer
Posted: 19 May 2023 21:30
estan
Editor
Posts: 12
Joined: 2022

I see lots of developers potentially going over the rate limit.


Hello, I am a user. How can I increase the limit please?

transparent spacer
Posted: 19 May 2023 21:48
estan
Editor
Posts: 12
Joined: 2022

What alternative solutions could you provide me please.

transparent spacer
Posted: 23 May 2023 08:29

zag
Admin
Posts: 3,853
Joined: 2020

What alternative solutions could you provide me please.

We don't allow anyone to go over the rate limit, its there to protect the sites bandwidth and resources.

The livescore and results only update every 2mins so there is no real need to make lots of requests. I suggest looking at the code first to check efficiency.

transparent spacer
Posted: 24 May 2023 06:06
nkl-kst
Editor
Posts: 24
Joined: 2021

Please remember to limit requests to at maximum 2 per second.

Hi Zag,

I'd like to implement an optional request throttling in the PHP library for users who know their scripts will do a lot of requests (https://github.com/nkl-kst/the-sports-db/issues/53).

When exceeding the limit, the API returns a 429 Too Many Requests with the following message: "Rate Limit exceeded. Please keep below 100 requests per 1 minute."

What would be an appropriate default configuration? Because two requests per second (as mentioned above) are more than 100 requests per minute

transparent spacer
Posted: 24 May 2023 15:21

zag
Admin
Posts: 3,853
Joined: 2020

Please remember to limit requests to at maximum 2 per second.

Hi Zag,

I'd like to implement an optional request throttling in the PHP library for users who know their scripts will do a lot of requests (https://github.com/nkl-kst/the-sports-db/issues/53).

When exceeding the limit, the API returns a 429 Too Many Requests with the following message: "Rate Limit exceeded. Please keep below 100 requests per 1 minute."

What would be an appropriate default configuration? Because two requests per second (as mentioned above) are more than 100 requests per minute


Awesome,

Well hard limit is 120

But I advise 100 per minute.

transparent spacer
Posted: 25 May 2023 19:46
smathers
Editor Premium
Posts: 42
Joined: 2023

For my Scottish Football app, I implemented caching via the free tier Amazon AWS Lamba service. I'd never used this before but found it simple to implement. In my case I wrote the function in Python. The app, on the android devices that use it, makes calls only to the Amazon server, and not to thesportsdb endpoints directly. The Lamba function thus decides, based on time, whether to return a cached value or to make a fresh data request to thesportsdb server. If anyone would like more details, I'd be happy to post them.

zag
transparent spacer
Posted: 01 Jun 2023 05:18
nkl-kst
Editor
Posts: 24
Joined: 2021

I'd like to implement an optional request throttling in the PHP library for users who know their scripts will do a lot of requests)

Version 1.4.0 of the PHP library now supports an optional rate limiting with a default of 100 requests per minute. It's also possible to use a custom rate limit.

Cheers

transparent spacer
Showing 0 to 10 (Total: 10)