Bots & traffic

5 min readUpdated

What is web scraping?

Quick answer

Web scraping is the automated extraction of data from websites: fetching pages and parsing out prices, listings, articles or contact details. The technique itself is neutral and powers search engines, price comparison and research. It becomes a business problem when a competitor mirrors your catalogue in real time, when your content is republished elsewhere, or when the traffic costs you more to serve than the visitors it displaces.

01How scrapers work

OWASP lists scraping as automated threat OAT-011: collecting application content or other data for use elsewhere. Its list of related names shows how broad the category is, from comparative shopping and data aggregation to LLM training bots and AI retrieval bots.

The simplest scraper is a script that fetches a URL and extracts data with a parser or regular expression. It is cheap, fast and easy to detect, because it does not behave like a browser at all: no sub-resources, no JavaScript, unusual headers and the TLS handshake of a scripting library.

More capable scrapers drive a real browser, which renders JavaScript and behaves far more convincingly. The most determined route requests through residential proxy networks so the traffic appears to come from ordinary home connections, which removes network reputation as a signal.

Scraper typeHow it fetchesTypical tellsCost to run
HTTP scriptFetches and parses HTML directlyNo sub-resources, library handshake, URLs in sequenceVery low
Headless browserRenders pages like a real browserBreadth of URLs, timing, no real navigation pathModerate
Browser on residential proxiesA headless browser routed through home connectionsOnly the shape of the session; the network looks cleanHigh
API harvesterCalls the JSON endpoints your own pages useHigh volume on list or search APIs with no page loadsLow
Declared crawlerIdentifies itself and usually honours robots.txtA documented user-agent and published address rangesLow, and visible

02AI crawlers and robots.txt

The newest large source of automated reads is AI. Some of it is declared: operators such as OpenAI document separate training and search crawlers that honour robots.txt and publish their IP ranges, while user-triggered fetchers such as ChatGPT-User act on a person's request, so robots.txt rules may not apply to them. The tokens, a tested robots.txt and server-side blocks for the bots that ignore it are covered in how to block AI crawlers.

robots.txt is a request, not a lock. RFC 9309, which standardised the Robots Exclusion Protocol in 2022, states that it is not a substitute for valid content security measures, and listing a path in it advertises that the path exists. Use it to tell well-behaved web crawlers what you want, and use rate limits and challenges for everything that ignores it.

03When it is actually a problem

It is worth being honest about which of these applies to you. Some scraping is genuinely harmless, and defences aimed at all automation tend to catch the crawlers that bring you visitors. Good bot management is about telling the two apart, not about blocking everything that is not a person.

  • Competitors tracking your prices in real time and undercutting automatically
  • Your content republished elsewhere, competing with you in search results
  • Listings and inventory copied wholesale onto another marketplace
  • Contact data harvested for spam
  • Server load and bandwidth spent on traffic that never converts

04What reduces scraping

Scraping cannot be eliminated: anything a browser can display can be extracted. What is achievable is making it expensive and slow enough to stop being worthwhile.

  • Rate limit per client on the endpoints that expose your valuable data, not globally
  • Require a challenge before serving bulk listing or search endpoints
  • Watch for breadth rather than volume: real users view a handful of products, scrapers view all of them
  • Treat datacentre networks differently from residential ones for anonymous bulk access; the autonomous system behind an address tells you which kind it is
  • Put the most valuable data behind authentication so abuse is attributable to an account
  • Monitor for one fingerprint requesting a wide spread of distinct URLs

05Matching the response to the scraper

Different scrapers call for different answers, and the cheapest effective one is usually the right one. Blocking everything automated is rarely proportionate and almost always catches something you wanted.

API design matters more than people expect. A search or listing endpoint that returns thousands of items per call hands a scraper your catalogue in a handful of requests, so page-size limits and per-key quotas often do more than any detection rule.

What you seeProportionate response
A declared crawler you do not want, such as an AI training botA robots.txt rule first; a block by user-agent and published ranges if it is ignored
One address walking your whole catalogueA per-client rate limit on listing and product pages
Many addresses, each fetching a slice, with no assetsA challenge on bulk endpoints, so every new client pays before it reads
Heavy use of your search or listing APIAuthentication, per-key quotas and page-size limits
Your content republished elsewhereLegal and platform takedown routes; technical controls only slow the copying

06Distinguishing a scraper from a customer

Request volume alone is a poor signal: a real person browsing quickly can outpace a polite scraper. The reliable difference is in the shape of the session.

A customer arrives from somewhere, looks at a few items, loads images and scripts, and leaves. A scraper often enters directly on a listing page, requests items in order, fetches no sub-resources, and works through far more distinct URLs than any person would view.

Your access log already holds the evidence. The first query below ranks clients by how many distinct URLs they requested; the second lists clients that loaded many pages but never a stylesheet, script or image. Anything near the top deserves a look: an IP lookup shows which network an address belongs to, and verified crawlers should be excluded before you act.

Two breadth checks on an nginx access log (tested on a sample log)
# distinct URLs per client address
awk '{print $1, $7}' access.log | sort -u \
  | awk '{n[$1]++} END {for (ip in n) print n[ip], ip}' | sort -rn | head

# clients with more than 50 page views and no static assets at all
awk '$7 !~ /\.(css|js|png|jpg|svg|woff2?)$/ {p[$1]++}
     $7 ~  /\.(css|js|png|jpg|svg|woff2?)$/ {a[$1]++}
     END {for (ip in p) if (!a[ip] && p[ip] > 50) print p[ip], ip}' access.log | sort -rn

Questions

Frequently asked questions

It depends on jurisdiction, on what is collected and on how it is used. Publicly visible data is treated very differently from personal data or content behind a login. It is a legal question rather than a technical one, and worth asking a lawyer rather than a firewall.

No. Anything a browser can render can be extracted. The realistic goal is making it slow and expensive enough that it stops being worth doing.

They can, if they are indiscriminate. Verify search crawlers by reverse DNS or their published ranges, as Google documents for Googlebot, and exempt them before any anti-scraping rule runs.

No. It is a convention that well-behaved crawlers follow and others ignore. RFC 9309 says so directly: it is not a substitute for real access controls, so it works alongside rate limits and challenges, not instead of them.

Run a reverse DNS lookup on the address, check that the name ends in googlebot.com, google.com or googleusercontent.com, then run a forward lookup on that name and confirm it returns the same address. Google also publishes its crawler ranges as JSON files you can match against.

Sources

Sources and verification

awk queries run with GNU awk 5.2 against a sample nginx access log on Debian 12, October 2026.

  1. 01OAT-011 Scraping · OWASP
  2. 02RFC 9309: Robots Exclusion Protocol · IETF
  3. 03OpenAI crawlers and user agents · OpenAI
  4. 04Verify requests from Google crawlers and fetchers · Google for Developers

Last updated