What is a 503 error in web scraping?
TL;DR
A 503 Service Unavailable means the server understood your request but cannot serve it at the moment. Unlike a 403, it is explicitly temporary: the standard expects the condition to clear. In scraping it has two quite different causes. Either the site is genuinely overloaded or in maintenance, in which case waiting works, or an anti-bot layer is using 503 as its rejection code, in which case waiting does nothing at all.
Telling the two apart
The response body usually settles it in a few seconds.
A genuine 503 tends to be short, often a default server page from nginx or Apache, sometimes with a Retry-After header giving a delay in seconds or an HTTP date. Everyone gets it, including a browser you open by hand.
An anti-bot 503 tends to carry a branded interstitial, a challenge script, or a "checking your browser" message. The giveaway is that the site loads normally in a regular browser at the same moment your scraper is getting 503s. If a human can reach the page and your client cannot, the status code is describing your request rather than the server's health.
What to do about each
If it is genuine overload, respect Retry-After when it is present. When it is not, back off exponentially rather than retrying on a fixed interval, and add jitter so that a fleet of workers does not synchronise into a thundering herd the moment the site recovers. Retrying hard against a struggling server is how a temporary 503 becomes a permanent block.
If it is anti-bot, treat it as you would a 403. The request is being rejected on identity, so more patience will not help. The usual culprits are an obviously automated fingerprint, a datacenter IP, or headers that do not match the browser you are claiming to be.
How it relates to the codes around it
- 429 is the polite version: too many requests, slow down, and it usually names a limit. See bypassing 429 when scraping.
- 502 and 504 point at a gateway or proxy between you and the origin rather than at the origin itself.
- 403 is a refusal on identity with no expectation that it will clear.
A 503 sits ambiguously between the temporary and the permanent, which is exactly why it is worth checking the body before deciding how to respond.
Key takeaways
A 503 says the server cannot serve you right now. Read the body before reacting: a plain server page with a Retry-After header means back off and retry with jitter, while a branded challenge page means you are being rejected on identity and retrying will not help. If the site loads in a normal browser while your client gets 503s, it is the second kind.
Go deeper on the blog
Last updated: Aug 16, 2026