What a 521 Web Server Is Down means
Cloudflare tried to open a connection to the origin server - the real machine hosting the site - and failed. Cloudflare itself is up; the server behind it refused or dropped the connection. You'll see Cloudflare's branded 521 page with a ray ID (a reference code for the failed request). In short, a 521 means Cloudflare couldn't open a connection to the origin server.
Why scrapers see 521
A 521 is an origin-side problem: the site's own server is down, is blocking the IP ranges Cloudflare connects from, or is misconfigured. For a scraper this is usually temporary and not a personal block aimed at you - though it can sometimes show up alongside aggressive edge rules (extra filtering Cloudflare applies at its network edge before traffic reaches the origin).
How to fix a 521 error
Retry with backoff - wait a bit and try again, increasing the gap each time. A 521 usually clears once the origin recovers, and there's nothing in your headers or IP to change, because the failure happens between Cloudflare and the origin, not in your request. If you only get 521 through certain proxies, test the site directly (no proxy) to rule out a proxy problem. When you need reliable access to Cloudflare-fronted sites despite these intermittent edge errors, Web Access API and WAF handling handle the retries and challenges for you.