Quick answer
How should a scraper handle 403, 429 and CAPTCHA responses?
Treat them as signals, not obstacles. On a 429, wait for Retry-After and lower the rate on that host. On a 403, retry once after a pause, then stop and check the rules. On a CAPTCHA, stop that host. CrawlRelay residential proxies, from $0.50/GB, spread load and set location; they do not override a site's decision.
In brief
- 429: the site wants a slower pace; honour Retry-After, back off, halve per-host concurrency.
- 403: this request is refused; 1 retry after a pause, then stop and review robots.txt and terms.
- CAPTCHA: an escalation; pause the host for several minutes and resume much slower, never solve it automatically.
- Code: a Python fetcher that sends 1 request at a time per host and stops after 3 refusals in a row.
- CrawlRelay forbids CAPTCHA solving and bot-detection evasion through its gateway.
What do the three signals mean at a glance?
| 429 Too Many Requests | The crawler is too fast. Honour Retry-After, back off, lower per-host concurrency |
|---|---|
| 403 Forbidden | This request is refused. One retry after a pause, then stop and review |
| CAPTCHA or challenge page | The site wants to know whether a human is there. Stop the host and slow down |
| Standard for crawl rules | robots.txt, RFC 9309; Crawl-delay is a common extension |
| Not supported by CrawlRelay | CAPTCHA solving, stealth plugins, fingerprint spoofing |
What is each signal telling the crawler?
Each signal is a step up: a 429 asks for a slower pace, a 403 refuses one request, a CAPTCHA doubts the whole traffic.
- 429 is the politest: the content is available, but not at that pace. RFC 6585 defines it, often with a
Retry-Afterheader that says when to return. - 403 is a refusal of this request. It can be fixable (wrong country, missing headers, too fast) or final (the site does not allow automated access to that content).
- A CAPTCHA or a challenge page, often served with a 403 or 503 status, means the site's bot management doubts the traffic. It is an escalation: the step after ignored 429s.
All three are rising signals. Sites that see their 429s ignored escalate to 403s and challenges, then to long blocks on whole IP ranges, which hurts every user of those ranges.
CrawlRelay counted 15 common proxy and HTTP errors in its error reference, with a page each for 429 Too Many Requests and 403 Forbidden.
What should the crawler do for each signal?
| Signal | First response | If it continues | Stop when |
|---|---|---|---|
| 429 | Wait for Retry-After or back off exponentially with jitter | Halve concurrency on that host | Retry-After keeps growing, or 429s persist at one request at a time |
| 403 | One retry after a pause, same country | Compare with a browser from the same country; check robots.txt and terms | A second 403 on the same URL pattern |
| CAPTCHA / challenge | Pause the host for several minutes | Resume at a much lower rate | The challenge returns at a low rate: the site does not want automated access |
| 503 with Retry-After | Wait as asked | Pause the host | Most requests fail for more than a few minutes |
How do I build a crawler that responds correctly?
Put the rules in the fetcher, not in each spider. This one sends one request at a time per host, honours robots.txt and its Crawl-delay, waits for Retry-After, and stops asking a host after three refusals in a row. It treats a 4xx robots.txt as permission and a 5xx as a full disallow, as RFC 9309 specifies.
import time
import urllib.robotparser
from urllib.parse import urlsplit
import requests
PROXY = "http://USERNAME-country-us:[email protected]:7777"
USER_AGENT = "ExampleCrawler/1.0 (+https://example.com/crawler-info)"
class PoliteFetcher:
"""One request at a time per host; robots.txt, Crawl-delay and Retry-After honoured."""
def __init__(self, min_interval=1.0, max_refusals=3):
self.min_interval, self.max_refusals = min_interval, max_refusals
self.http = requests.Session()
self.http.proxies = {"http": PROXY, "https": PROXY}
self.http.headers["User-Agent"] = USER_AGENT
self.robots, self.next_time, self.refusals = {}, {}, {}
def _robots(self, root):
if root not in self.robots:
rp = urllib.robotparser.RobotFileParser(root + "/robots.txt")
try:
r = self.http.get(root + "/robots.txt", timeout=(10, 30))
if r.status_code >= 500:
rp.parse(["User-agent: *", "Disallow: /"]) # unreachable: assume disallow
else:
rp.parse(r.text.splitlines() if r.status_code == 200 else []) # 4xx: allowed
except requests.RequestException:
rp.parse(["User-agent: *", "Disallow: /"])
self.robots[root] = rp
return self.robots[root]
def get(self, url):
scheme, host = urlsplit(url)[:2]
if self.refusals.get(host, 0) >= self.max_refusals:
return None # this host said no: stop asking
rp = self._robots("%s://%s" % (scheme, host))
if not rp.can_fetch(USER_AGENT, url):
return None
delay = max(self.min_interval, rp.crawl_delay(USER_AGENT) or 0)
wait = self.next_time.get(host, 0) - time.monotonic()
if wait > 0:
time.sleep(wait)
r = self.http.get(url, timeout=(10, 30))
pause = delay
if r.status_code in (429, 503):
retry_after = r.headers.get("Retry-After", "")
pause = max(delay, int(retry_after) if retry_after.isdigit() else 60)
refused = r.status_code in (403, 429) or "captcha" in r.text[:5000].lower()
self.refusals[host] = self.refusals.get(host, 0) + 1 if refused else 0
self.next_time[host] = time.monotonic() + pause
return r
fetcher = PoliteFetcher()
resp = fetcher.get("https://example.com/")
print(resp.status_code if resp is not None else "skipped")What fixes a 403 legitimately?
Three 403 causes are on the crawler's side, and fixing them is fair:
- The wrong country. Many sites serve one region. Target the country with
-country-<code>. - Incomplete headers. Send
Accept,Accept-Languageand an honest user agent with a contact URL. A browser-like user agent on a plain HTTP client is inconsistent and often refused. - The crawler's own pace. A 403 that starts after N requests is a rate problem; slow down.
What is not a fix: rotating user agents to look like many different people, spoofing browser fingerprints, or cycling IPs to get around a block the site set on purpose. If a site filters hosting ranges to keep automated traffic out, a residential IP does not make that access permitted.
Why not just solve the CAPTCHAs?
Because a CAPTCHA is the site asking a question the crawler would answer falsely. Automated solving turns a polite crawler into a tool built to defeat an access control, which raises the legal risk: the 2026 US cases over search scraping, Google v. SerpApi and Reddit v. SerpApi and others, turn on claims that defendants circumvented an anti-bot system under the DMCA's anti-circumvention rule. Courts have not settled the question, but the risk is real.
CrawlRelay does not support CAPTCHA solving or bot-detection evasion, and its Acceptable Use Policy forbids them through the gateway. For data behind a challenge, ask the site for access, use its API, or license the data.
When should I contact the site instead?
Contact the site when the crawler needs more than its defaults allow. Many sites offer an API, a data feed, a partner programme or simply a higher limit for a crawler that identifies itself and explains its purpose. Put a contact URL in the user agent, keep a page that describes the crawler and how to opt out, and answer abuse reports quickly. A crawler that can be reached gets warnings before blocks; the concurrency guide gives safe starting rates.
403, 429 and CAPTCHAs: questions
Do residential proxies stop CAPTCHAs?
Do not count on it. A residential exit changes which IP a site sees, not what the crawler does, at CrawlRelay or elsewhere: CAPTCHAs caused by pace or behaviour remain, and they are meant to. If challenges continue at a low request rate, the site does not want automated access to that content.
How long should I wait after a 429 without Retry-After?
CrawlRelay suggests starting at a few seconds and double the wait after each new 429, with a random extra and a cap of about a minute. When requests succeed again, resume at a lower rate than the one that caused the 429, and raise it slowly while the error rate stays flat.
Is rotating IPs to avoid rate limits allowed?
Rotation spreads load across exits and lets you choose locations, which is normal. Using rotation to stay under a per-IP limit while keeping a rate the site refused is evasion. Most terms of use forbid it, and so does the CrawlRelay Acceptable Use Policy.
What user agent should my scraper send?
Its own: a name, a version and a URL that explains the crawler and how to reach its operator, such as ExampleCrawler/1.0 (+https://example.com/crawler-info). CrawlRelay advises never using the names of other crawlers such as Googlebot or GPTBot.
Verdict
- Slow down, honour Retry-After and stop after repeated refusals: that keeps a crawler welcome and its IP ranges usable.
- Use CrawlRelay residential proxies to spread load and pick a country; use the site's API or a data licence when it says no.
Sources (4)
- RFC 9309: Robots Exclusion Protocol — IETF (2022-09)
- RFC 6585: Additional HTTP Status Codes (429) — IETF (2012-04)
- Reddit v. SerpApi LLC — Loeb & Loeb (2026-08)
- Google v. SerpApi: the court granted our motion to dismiss — SerpApi (2026-07-21)
Residential proxies for polite crawlers
$1.50 for 1 GB, $0.50/GB from 50 GB, no KYC.