Can web scraping be detected?
Short answer
Yes. Simple scrapers show up in access logs through library user agents, missing headers, no asset requests and steady request rates. Scrapers that run real browsers through residential proxies are harder to catch, and finding them means combining TLS fingerprints, browser checks, behaviour and clustering across many IP addresses. Detection gives a confidence level, so match the response to it.
The effort to detect a scraper grows with the effort the scraper puts into hiding. A script that uses an HTTP library from a cloud server is visible in a basic log query. A scraper that runs a real browser through residential proxies looks like a person on any single request, and it only shows itself when you combine network, device and behaviour signals across many requests.
What gives simple scrapers away?
Start with your access logs or CDN logs. The cheapest signals are:
- User agents of HTTP libraries and frameworks, such as
python-requests,Go-http-client,okhttp,curlorScrapy - Missing headers that every browser sends, such as
Accept-Language - HTML requests with no matching requests for CSS, JavaScript or images
- Cookies that are never sent back, so each request starts a new session
- URLs requested in ID or page order, at a fixed interval
- Traffic from hosting providers' networks (ASNs) where you expect home and mobile users
This PostgreSQL query lists IP addresses that fetched more than 200 product pages in the last hour without loading a single static asset. Adjust the table and paths to your own schema. The 200 threshold is a starting point to tune against your traffic.
SELECT ip,
COUNT(*) FILTER (WHERE path LIKE '/product/%') AS product_pages,
COUNT(DISTINCT path) FILTER (WHERE path LIKE '/product/%') AS distinct_products,
COUNT(*) FILTER (WHERE path LIKE '/static/%') AS asset_requests
FROM access_log
WHERE ts >= NOW() - INTERVAL '1 hour'
GROUP BY ip
HAVING COUNT(*) FILTER (WHERE path LIKE '/product/%') > 200
AND COUNT(*) FILTER (WHERE path LIKE '/static/%') = 0
ORDER BY product_pages DESC;If a CDN serves your static files from cache, origin logs show no asset requests from anyone, and every visitor looks like a scraper. Run the query on CDN logs in that case.
How do you detect scrapers that use real browsers?
Scrapers that drive Chrome or Firefox through automation frameworks run your JavaScript, keep cookies and send normal headers. The useful signals move to places that are harder to fake consistently:
- The TLS fingerprint should match the claimed browser. JA4 summarises how a client sets up an encrypted connection, and a request that claims to be Chrome but negotiates TLS like a Python library is lying about something. See TLS fingerprinting with JA3 and JA4.
- Headless and automated browsers expose properties and rendering differences that normal browsers do not, covered in headless browser detection.
- The browser fingerprint should be internally consistent. A client that claims to be a Mac but renders graphics with a software renderer, or reports a screen size no real device has, is running in a spoofed environment.
- People scroll, hover, pause and go back. Scrapers load a page, read it and move to the next URL at a steady rhythm, often with no pointer or scroll events at all. Behavioral bot detection explains how this is measured.
Can scrapers on residential proxies be detected?
Residential proxies route traffic through home and mobile connections, so the IP address looks like a customer's and IP reputation stops working. Other signs remain:
- The IP address changes in the middle of a session while the device fingerprint stays the same
- One device fingerprint or JA4 value appears behind hundreds of unrelated IP addresses in a day
- The IP's country does not match the browser's time zone or language
- Connection timing shows an extra hop between the client and the residential address
How to detect residential proxies goes further into each of these.
Look at clusters instead of single requests
A distributed scraper may send only 20 requests from each IP address, which no per-IP rule will flag. Group traffic by what the scraper cannot rotate cheaply: TLS fingerprint, header order, device fingerprint and the set of paths requested. Five hundred IP addresses that share one JA4 value and one header order, and together cover your whole catalogue once a day, are one scraper. Track catalogue coverage per cluster per day. A human shopper rarely views more than a small part of a large catalogue.
How sure can you be?
Detection gives a probability. Some real users look like scrapers: offices behind one NAT address, privacy browsers that resist fingerprinting, screen readers and other assistive tools, and partners nobody added to the allowlist. Let the confidence decide the response: block what is certain, challenge what is likely and log the rest. Run new rules in a log-only mode first and review what they would have blocked. False positives in bot detection covers how to measure the error rate.
Tools that help
StopBots is published by Kairal, which is one of the tools listed. The list is not a ranking.
- GoAccess is a free, open-source log analyser that shows top IP addresses, user agents and paths in a terminal or HTML report, which is enough to find simple scrapers on a small site.
- JA4 is an open specification for TLS and HTTP client fingerprints with reference implementations, useful if you terminate TLS on your own servers and want to log fingerprints yourself.
- Fingerprint identifies browsers and devices across sessions, and its open-source library is a free way to start linking requests to one device.
- Cloudflare Bot Management gives each request a bot score built from machine learning, heuristics and behaviour signals, which you can log and use in rules.
- Kairal links device, network and behavioural signals across sessions and shows the evidence behind each decision in its console, including related devices and IP addresses.
Common questions
How do websites detect web scraping?
Most start with request patterns such as rates, missing headers, no asset loads and library user agents. Larger sites add TLS fingerprints, JavaScript browser checks and behaviour scoring, usually through a CDN or a bot management service.
Is a high request rate enough to call it a scraper?
No. Search engines, uptime monitors and offices behind one shared address can all send many requests. Treat a high rate as a reason to look closer, and confirm with headers, fingerprints and the pages requested before you block.
Does Google Analytics show scraper traffic?
Mostly not. Scrapers that never run JavaScript never fire the analytics tag, and GA4 excludes traffic from known bots automatically. Scrapers that run a full browser can appear as real sessions with very short engagement and unusual locations.