genshindev / api

A fan-made Genshin Impact API for easy access to game data.
https://genshin.jmp.blue
Open Software License 3.0
704 stars 190 forks source link

[Question] Public API load limits #125

Closed muirch closed 2 years ago

muirch commented 2 years ago

Hi 👋

Is there any limitations to usage of public api deployed on https://api.genshin.dev?

I plan to create something like open source catalog web app based on data from your API with features like search, team builder and much more.

If this app will send requests based on the pages visited by users like search by name of hero or something like this, will I be penalized if it makes a heavy load on your server?

LiterallyLink commented 2 years ago

You should be caching a majority if not all of the data you’re fetching to avoid constant API calls.

muirch commented 2 years ago

You should be caching a majority if not all of the data you’re fetching to avoid constant API calls.

I understand how to work with API to avoid constant calls, but caching all data in local storage seems not best case for me. I can use some libs for state management and call data only once when user opens the app, but it still can make heavy load if app will become popular and have much users => much calls. So will I be banned from API usage in this case or not, that's the question.

NurMarvin commented 2 years ago

The server the API is deployed on is rather durable so I don't intend on banning people for putting too heavy load on the API. If the API load becomes too much I will simply upgrade the infrastructure. So no, you shouldn't fear getting banned from the API unless you manage to trigger some ban on Cloudflare's side as the API is proxied through it.