Web scraping - what is HTTP 520 status code?

Response status code 520 generally means the server failed to generate a valid response (Often related to Cloudflare). This could be caused by technical issues however in web scraping this can also mean insufficient request details or web scraper blocking.

To avoid status code 520 when web scraping ensure that sent requests contain all required headers like secret/CSRF tokens, Origin, Referer and other commonly required details. If it's a POST request make sure the sent body matches expected format.

Otherwise, it's possible the scraper is being identified and blocked. For that refer to our how to scrape without being blocked guide which covers all of the ways to prevent web scrapers from being identified.

Question tagged: Scraper Blocking

Related Posts

How to Bypass Imperva Incapsula when Web Scraping in 2023

In this article we'll take a look at a popular anti bot service Imperva Incapsula anti bot WAF. How does it detect web scrapers and bots and what can we do to prevent our scrapers from being detected?

How to Bypass Datadome Anti Scraping in 2023

In this article we'll take a look at a popular anti bot service Datadome Anti Bot firewall. How does it detect web scrapers and bots and what can we do to prevent our scrapers from being detected?

How to Bypass Akamai when Web Scraping in 2023

In this article we'll take a look at a popular anti bot service Akamai Bot Manager. How does it detect web scrapers and bots and what can we do to prevent our scrapers from being detected?