Page 1 of 1

HTTP API rough limits

Posted: Sat Dec 14, 2024 12:23 am
by O2theC
I've been using the HTTP API a bunch recently and downloading mods, getting mod info and other things, something i have been wondering, since i don't want to stress factorio infra, or get rate limited, what are some rough limits for the API, just so i can get an idea of what is reasonable and unreasonable to do?

Re: HTTP API rough limits

Posted: Sat Dec 14, 2024 4:41 am
by eugenekay
You will (almost) never receive fully correct information on API rate limits in Public, because this same knowledge is also VERY valuable to “the bad guys”. The published limits are often much lower than the actual limits, until they are suddenly enforced.

A more useful point to consider is that “mods.factorio.com” utilizes CloudFlare for its public access path. It is not clear which product is in-use or how it is configured, but generally speaking, they use multiple “signals” to determine if you are a Human or Bot.

My personal advice? Don’t submit more than 1 HTTP request per Second, on average. Spread out your requests even more if possible - you probably don’t need to scrape the entire Mod Databsse every day, for example.

Re: HTTP API rough limits

Posted: Sat Dec 14, 2024 3:18 pm
by O2theC
yeah, that's why i asked for rough limits, so i can get a rough idea of what to aim for (or i guess stay away from), so should i just follow that avg requests per sec? like does request or response content matter at all?, and how avg does it have to be, like is downloading like 60 mods in 6 sec ok if i don't do it often, like maybe once per minute (likely just testing,more likely much farther apart)

Re: HTTP API rough limits

Posted: Sat Dec 14, 2024 9:58 pm
by eugenekay
I do not know anything specific about the Factorio infrastructure's limits beyond what can be deduced publicly from DNS etc. The "1 HTTP request per second average" suggestion is purely from my own Experience in writing Bots for other APIs, and remaining "under the radar". If anybody is looking at the request logs in detail your IP address will be an Outlier due to the number and regularity of requests, but I doubt that Wube would take action unless you were being truly malicious. :-)