What is web scraping? Crawling vs scraping
Short answer
Web scraping is the automated extraction of specific data from websites, such as prices, listings or articles, into a structured format. Crawling is the discovery side: a crawler follows links to find and fetch pages, as search engines do. Most scrapers crawl to reach pages, but their goal is the data, and many hide who they are.
A scraper is a program that requests web pages, reads the HTML or JSON that comes back, and copies out the fields it was built for: a product name, a price, a stock level, a phone number. It stores them in a spreadsheet or database and repeats the job across thousands of URLs. A person copying prices by hand does the same work, only slower. OWASP lists scraping as OAT-011 in its catalogue of automated threats.
Crawling vs scraping: what is the difference?
Crawling is about finding pages. A crawler starts from a list of URLs, fetches each one, extracts the links and adds them to its queue. Googlebot and Bingbot crawl to build a search index. Scraping is about pulling data out of pages. A scraper often knows which URLs it wants and keeps only a few fields from each.
The two overlap. Most scrapers crawl to discover product or listing URLs, and search engines store a copy of what they fetch. For a site owner the useful distinction is behaviour: who runs the bot, whether it says who it is, whether it follows your rules, and what it does with what it takes.
| Search engine crawler | Scraper | |
|---|---|---|
| Goal | Index pages so people can find them | Extract specific data for reuse |
| What it keeps | Page content for search results | Selected fields such as prices, listings, text or contacts |
| Identifies itself | Yes, with a documented user agent and IP ranges | Often poses as a normal browser |
| Follows robots.txt | Yes | Usually not |
| What you get back | Visitors from search | Usually nothing |
AI crawlers that collect training data sit between the two columns. They identify themselves and many honour robots.txt, but they send few or no visitors back.
How does web scraping work?
- The scraper finds URLs from sitemaps, category pages and pagination, or by counting through IDs such as
/product/1001,/product/1002. - It fetches each page. Simple scrapers use an HTTP library and never run JavaScript. Others drive a headless browser so that pages built with JavaScript render fully; how modern bots are built explains the tooling.
- It parses the response with CSS selectors or XPath. Many scrapers skip the HTML and call the JSON API that the page itself uses, because that data is already structured.
- It stores the results and runs again on a schedule, sometimes every few minutes for prices.
Scrapers that expect to be blocked spread their requests across many IP addresses, often through residential proxies, so each address sends only a handful of requests.
What do scrapers collect?
- Prices, stock levels and promotions, usually for competitors or resellers
- Full product catalogues with descriptions and images, to copy onto other shops
- Listings from real estate, job, travel and classifieds sites
- Articles and other text, for republishing or for AI training datasets
- Profiles, email addresses and phone numbers, for spam and fraud lists
- Reviews and ratings
When is scraping a problem?
Price comparison partners, academic researchers, web archives and search engines all crawl or scrape, and many site owners want them to. What separates good bots from bad bots is mostly permission and behaviour.
Scraping becomes a problem when it costs you money or advantage. Heavy scrapers load your origin servers and raise hosting bills. A competitor that reads your prices every hour can undercut each change within the hour. Copied content can compete with yours in search results. Harvested personal data puts your users at risk and raises questions under privacy law, covered in is web scraping legal?. Scrapers that execute JavaScript also skew analytics and conversion rates.
What does scraping look like in your logs?
Simple scrapers are easy to spot in access logs. Look for:
- User agents of HTTP libraries such as
python-requests,Go-http-client,curlorScrapy - HTML pages requested with no CSS, JavaScript or image requests from the same client
- URLs that walk through IDs or page numbers in order
- Requests at a steady interval, day and night
- Heavy traffic from cloud hosting networks (an ASN, or autonomous system number, identifies the network that owns an IP address)
- No cookies sent back, so every request starts a new session
Scrapers that run real browsers through residential proxies hide most of these signs. Catching them takes device, network and behaviour signals together, as described in can web scraping be detected?. The defences are in how to prevent web scraping, and Kairal has a separate guide to web scraping protection.
Common questions
Is web scraping legal?
It depends on what is collected, how it is accessed and where. Public facts are treated differently from copyrighted text or personal data, and terms accepted when creating an account can apply even when the data is visible to everyone.
Can web scraping be detected?
Scrapers built on plain HTTP libraries show up in ordinary access logs. Scrapers that run real browsers through residential proxies need detection that combines TLS, browser fingerprint and behaviour signals, and some still get through.
Is web crawling the same as web scraping?
They overlap but are not the same. A search engine crawls broadly and sends visitors back, while a price scraper may request the same few hundred product URLs every hour and never follow a link.