Most APIs have rate limits. A rate limit is the # of times you can call the API in a given timeframe. If you exceed that limit then you cannot call the API again until the timeframe elapses. This is a security and debugging feature to ensure a client isn't attempting to call an API too many times either for malicious reasons or because of a bug. Rate limits tend to be something like no more than 5 calls a minute or 100 calls an hour.
Some APIs also have a quota limit. Quota limits tend to be associated with pricing tiers and set a fixed limit on how many times you can use an API for a given time frame. This is on top of and different than rate limits. Quotas tend to be something like 1000 calls per month or 100 calls per day.
For your specific case the HTTP header X-RateLimit-Reset
tells you when your rate limit resets and you can start calling again. Until this time all requests will fail. You just have to wait the required time, there is nothing to fix. Refer to the official docs here, identify the API calls you're making and you can see what the rate limits are.