When This Error Shows Up
You're running a small business website or a tool that talks to an API – maybe you're pulling inventory from Shopify, sending invoices via Stripe, or using a WordPress plugin that hits a weather API. Then suddenly you see:
429 Too Many Requests
API Rate Limit Abuse Detected
Or something like Rate limit exceeded or Retry after with a number. I had a client last month whose WooCommerce store stopped processing payments because a custom plugin hammered Stripe's API 50 times a second. They thought their site was hacked. It wasn't – just bad coding.
What's Really Going On
APIs have limits. They're like a bouncer at a club: you can only ask for data so many times per minute. When you cross that line – whether from a script, plugin, or even your own code – the server returns 429. The trigger is usually:
- A cron job that runs too often
- A plugin that polls an API every few seconds
- A bot or scraping tool you forgot about
- Multiple requests from the same IP in a short window
The key thing is: the server isn't mad forever. It usually tells you how long to wait in a header called Retry-After. Most people ignore this and just refresh, which makes it worse.
How to Fix It – Step by Step
I'm giving you the fix that works for 90% of small business cases. Don't overthink it.
Step 1: Stop All Requests Immediately
This sounds dumb, but most people keep trying. If you're running a script, kill it with Ctrl+C. If it's a plugin, temporarily deactivate it. Wait at least 60 seconds. The API will reset your window after a bit.
Step 2: Find the Retry-After Header
Open your browser's developer tools (F12) and look at the network tab. Find the request that got 429. Check the response headers for Retry-After. It'll be a number of seconds. For example:
Retry-After: 120
That means wait 2 minutes. Don't skip this – I've seen people wait 10 seconds when the API wanted 5 minutes. That never works.
Step 3: Add a Delay in Your Code
If you wrote the script that's hitting the API, add a pause between requests. Here's a simple example in Python:
import time
# after each request
print('Waiting 2 seconds...')
time.sleep(2)
For PHP, use sleep(2). For JavaScript, use setTimeout(). The point is: don't fire requests faster than one per second. Check the API's docs – they usually say the max rate. GitHub allows 60 requests per hour for unauthenticated users. That's one per minute.
Step 4: Check Your Plugin Settings
If you're using a WordPress plugin like WP All Import or a caching plugin that pings an API, go to its settings. Look for a field that says "Polling interval" or "Update frequency". Change it to something like "Every 5 minutes" or "Every hour". I had a client using a currency converter plugin that updated every 30 seconds. That's insane. Changed it to once an hour, and the error disappeared.
Step 5: Use an API Key or Authenticate
Some APIs give higher limits when you log in. For example, GitHub's unauthenticated limit is 60 requests per hour. But with a token, it's 5,000 per hour. That's a huge difference. So if you're getting rate limited, check if you can add an API key:
# Add this to your request header
Authorization: Bearer YOUR_API_KEY
You can get a key from the API provider's dashboard. For Stripe, it's under Developers > API keys.
What to Check If It Still Fails
If you've done steps 1–5 and you're still getting 429, look at these:
- Multiple tools hitting the same API. I once had a client whose staging site and live site both hit the same API. The combined traffic triggered the limit. Solution: use different API keys for each environment.
- A malware-infected script. A bot could be using your server to send requests. Check your server logs for unusual traffic from your IP. If you see requests to weird URLs, scan for malware with a tool like Wordfence or Sucuri.
- Your hosting provider's IP is blacklisted. Some APIs block entire IP ranges if they see abuse. Call your host and ask for a new IP. Or use a VPN or proxy.
- The API's rate limit changed. Check their docs again. Some APIs lower limits during peak hours. Twitter's API had a 15-minute window that used to be 450 requests, now it's 300.
If nothing works, contact the API support team. Send them the exact error message and the time it happened. They can usually unblock you or raise your limit if you explain it's a legit business use.
Bottom line: this error isn't a hack – it's just your tool being too chatty. Slow it down, add delays, and you'll be fine. I've fixed this for over a dozen small businesses, and it's never taken more than an hour.