Esta página aún no está disponible en Español, por eso se muestra en inglés.
Web scraping

Web scraping for business: how it works and how to do it responsibly

What web scraping is, how a scraper turns web pages into a spreadsheet, what businesses use it for, and the legal and ethical points to check before you start.

8 min read

A lot of useful business information is published on websites: company listings, prices, product details, property listings, job postings, reviews. Reading it by hand works for ten records and fails at ten thousand. Web scraping is how that information is collected automatically and turned into a structured file you can filter, analyze or import.

This guide explains how scraping works, what it is used for, when another approach is better, and what to check before you start, including the legal side.

In short

  • Web scraping uses software to read web pages and copy specific details into rows and columns.
  • A good project starts with the decision the data will support, then the fields, sources, volume and how often it should repeat.
  • Check for an official API or a ready-made dataset first. They are often simpler and more stable.
  • Public data is not automatically free to use. Check the site's terms and robots.txt, avoid personal data you do not need, and never get around logins or other access barriers.

What web scraping is

Web scraping (also called data extraction or crawling) means using a program to visit web pages, find specific pieces of information on them, and save that information in a structured format such as a spreadsheet, a database table or a JSON file.

A person reading a business directory sees a page of listings. A scraper sees the same page as code, finds each listing's name, category, address, phone number and website, and writes them out as one row per business. Repeated across thousands of pages, that becomes a dataset.

How a scraper works, step by step

  1. Choose the pages. Start from a list of addresses, a site's sitemap, category pages or search results. This step decides how complete the data will be.
  2. Fetch each page. The scraper requests the page, as a browser would. Some sites build their pages with JavaScript after loading, so the scraper has to run a real browser in the background to see the content.
  3. Find the data. The scraper locates each field in the page's structure (for example, "the text inside the element marked as the price"). Many sites also include structured data in the page that is easier to read reliably.
  4. Clean and structure it. Raw values are rarely ready to use. Prices need a currency, phone numbers a consistent format and addresses splitting into parts, and duplicates have to be removed.
  5. Check it. Compare a sample against the live pages, look for empty or odd values, and count records against what the site shows.
  6. Deliver and repeat. Save the result as CSV, Excel, JSON or straight into a database or CRM, and schedule the next run if the data needs to stay current.

Websites change their layout without warning, so scrapers that run regularly need monitoring. A change that breaks one field should be noticed before it reaches your reports.

What businesses use it for

UseTypical dataWho uses it
Lead generationBusiness names, categories, phone numbers, websites, locationsSales and marketing teams
Price and product monitoringPrices, stock status, product details, sellersRetailers, brands, marketplaces
Market researchListings, ratings, review counts, categoriesAnalysts, consultants, founders
Real estateListings, prices, property details, agentsAgents, investors, property platforms
Jobs dataJob titles, companies, locations, posting datesRecruiters, HR and labor market analysts
MonitoringNews, announcements, changes to public pagesCommunications, compliance and research teams

Scraping, an API or a ready-made dataset?

Scraping is not always the best route. Before you start, check whether one of these fits better:

OptionGood whenWatch out for
Official APIThe site offers one with the fields you needUsage limits, costs and fields that are missing from the API
Ready-made datasetThe data is common and does not need to be current to the dayAge of the data, coverage and licence terms
Web scrapingThe data is public, but there is no API or dataset that fitsSite terms, layout changes and data protection rules
Manual researchYou need a few hundred records with judgment appliedTime and cost per record

Many projects combine them: a dataset as the base, scraping to fill gaps or keep it current, and manual research for the records that need a person to check them.

Whether a particular scraping project is lawful depends on the country, the site, the data and what you do with it. The points below are general background, not legal advice.

Public pages and access rules

In the United States, two court cases are often cited. In hiQ Labs v. LinkedIn, the Ninth Circuit, upholding a preliminary injunction in April 2022, found that the "without authorization" part of the Computer Fraud and Abuse Act likely does not apply to data on public websites. The case did not end there: later in 2022 the district court found that LinkedIn's user agreement, which bans scraping and fake profiles, could be enforced as a contract, and the parties settled in December 2022 with a judgment against hiQ.

In Meta Platforms v. Bright Data, a federal court in California ruled in January 2024 that Bright Data did not breach Meta's terms by scraping public data while logged out, because the terms, as the court read them, covered people using Facebook and Instagram, not logged-off visitors.

The lesson from both: what is publicly visible and what a site's terms allow are separate questions, and logging in usually means accepting terms that may forbid scraping. Collecting data behind a login, or getting around technical barriers such as CAPTCHAs, carries much more risk.

robots.txt

Most websites publish a robots.txt file that tells automated visitors which parts of the site they may crawl. The rules were standardized as RFC 9309 in September 2022. The standard itself says the rules "are not a form of access authorization", so they do not decide on their own what is legal. Respecting them is still the norm for responsible crawlers, and ignoring them is hard to defend if a site owner complains.

Facts on their own are generally not protected by copyright in the United States; the Supreme Court said so in Feist v. Rural Telephone (1991), a case about a telephone directory. Text, photos and the creative way information is presented can be protected, though, so copying descriptions or images is different from collecting names and prices. In the European Union, the Database Directive gives a separate right to the makers of databases that took substantial investment, which can restrict extracting the whole or a substantial part of a database.

Personal data

Publicly visible personal data is still personal data. In August 2023, twelve data protection authorities, including the UK's ICO and the Canadian and Australian privacy regulators, issued a joint statement on scraping. The ICO's summary puts it plainly: organizations "must have a lawful reason for collecting and using people's data, even when it is publicly available." Under the GDPR, if you collect personal data about someone from another source, you must also tell them, at the latest when you first contact them.

For business data, that means: collect company-level information where you can, collect only the personal details you need (such as a business contact's name, role and work email), and act on removal requests.

A responsible scraping checklist

  • Read the site's terms of use and its robots.txt before starting.
  • Do not log in to collect data, and do not get around CAPTCHAs, paywalls or other access barriers.
  • Keep request rates low, so the site is not slowed down for its users.
  • Collect only the fields you need, and avoid personal data you will not use.
  • Do not republish copyrighted text or images.
  • Record the source and the collection date for every record.
  • Honor removal and opt-out requests, and keep a list of them.

Questions to answer before you start

Clear answers to these make a scraping project faster to scope, and the result easier to use:

  1. What decision will the data support? "Find clinics to call" leads to different fields than "track competitor prices".
  2. Which fields do you need, and which are only nice to have?
  3. Which sites, and are there official APIs or datasets for them?
  4. How many records, roughly, and for which countries or categories?
  5. How often should the data be refreshed: once, weekly, daily?
  6. What format do you need: Excel, CSV, JSON, or straight into your CRM or database?
  7. What happens to the data next, and do any data protection rules apply to it?

If you have a project in mind, send us a brief with the sites and fields you need, and we will reply with questions or a scope.

Sources

Share this article

All articles

Keep reading

Data analytics · 5 min de lectura

Competitor Price Monitoring Without Manual Checks

Competitor price monitoring made simple: match products first, track prices, promotions and stock on schedule, and get alerts when rivals undercut you.

Data enrichment · 7 min de lectura

How to Clean an Email List Before You Send

Clean an email list you already own before you send: back it up, suppress bad addresses, remove obvious junk, verify mailboxes, and decide what to do with risky results.

Lead generation · 8 min de lectura

How to build a B2B lead list your sales team will actually use

A practical guide to defining your ideal customer, choosing sources and fields, checking contact data, and staying within the email marketing rules in the US, UK, EU and Canada.

Escribe para buscar entre 235 servicios, sectores y herramientas.