Update API with Ajax

If you are doing it that quick, don’t use setInterval

Run a request, when the request completes start the next one.

Or collect events via other means and push that to the front end.

Which API’s are you trying to call?