How to implement ratelimiting

I want that the user can't spam my API. What is the recommended way of ratelimiting?
Was this page helpful?