Reddit API rate limits and how to handle 429 errors
Short answer: Reddit's free Data API allows 100 queries per minute per OAuth client ID, averaged over 10 minutes. When you go over, Reddit answers with HTTP 429. Read the X-Ratelimit headers and wait for the reset before retrying.
The limits
| Access | Limit |
|---|---|
| OAuth client, free tier | 100 queries per minute, averaged over a 10 minute window |
| Requests without OAuth | Much lower, and often blocked outright |
| Commercial agreement | Set in your agreement with Reddit |
The averaging window means short bursts are tolerated as long as your 10 minute total stays under the limit. Reddit documents this in its Data API wiki.
The headers that tell you where you stand
| Header | Meaning |
|---|---|
X-Ratelimit-Used | Requests used in the current window |
X-Ratelimit-Remaining | Requests left in the current window |
X-Ratelimit-Reset | Seconds until the window resets |
Handle a 429 properly
- Stop and wait. Sleep for the seconds given in
X-Ratelimit-Reset. Retrying at once makes it worse. - Slow down before you hit zero. When
X-Ratelimit-Remaininggets low, space your requests out. - Back off on repeat failures. Double the wait each time, with some randomness, up to a cap.
- Ask for more per request. Use
limit=100so one call returns a full page. - Send a descriptive User-Agent. Generic ones are throttled much harder.
import time, requests
def get(url, headers):
for attempt in range(5):
r = requests.get(url, headers=headers)
if r.status_code != 429:
return r
wait = float(r.headers.get("X-Ratelimit-Reset", 2 ** attempt))
time.sleep(wait)
raise RuntimeError("still rate limited")
When 100 per minute is not enough
The official way to go faster is a commercial agreement with Reddit. Registering extra apps or accounts to multiply the limit breaks Reddit's rules and gets clients banned.
A third-party API moves the limit to the provider. Apixstar allows 30 requests per second per account, regardless of top-up amount, each returning up to 100 posts. A request that is rejected by our limit, or that fails upstream, is not charged. See pricing.
Questions about Reddit rate limits
What is the Reddit API rate limit?
For free access, 100 queries per minute per OAuth client ID, averaged over a 10 minute window.
What does a 429 error from Reddit mean?
Too many requests. You exceeded the rate limit, or Reddit is throttling your client. Wait for the number of seconds in the X-Ratelimit-Reset header before trying again.
How do I check how many requests I have left?
Read the X-Ratelimit-Remaining response header. X-Ratelimit-Used shows requests used in the current window and X-Ratelimit-Reset shows seconds until it resets.
Can I raise my Reddit API rate limit?
Higher limits need a commercial agreement with Reddit. Creating extra apps or accounts to multiply a limit is against Reddit's rules.
What are the Apixstar rate limits?
30 requests per second per account, regardless of top-up amount. A request rejected by the limit is not charged.
Next: how to get a Reddit API key and what the Reddit API costs.