Start this hobby
Your first practical checklist
Buy or borrow
A computer and Python (or similar). Free, and libraries for fetching pages and parsing HTML are easy to install.
First 30 minutes
Open a practice scraping site, use Inspect to find where one item's title and price sit in the HTML and note the tags and class names.
First week goal
Read the robots.txt and terms of use of a real site you might want data from, and decide whether it allows scraping or offers an API or download instead.
Avoid this mistake
Scraping with no pause between requests hammers a site and gets you blocked, so add a delay.
Is this for me?
A quick fit check
Good signs
- You like detective work, such as finding where a number sits inside a page's structure.
- You have a data question that no ready-made dataset answers, like how prices on a listing change over weeks.
- You are patient with fiddly problems, including a page that works one day and breaks the next.
Think twice if
- Scrapers break whenever a site changes its layout, so maintenance is part of the hobby.
- Terms of service, copyright, database rights and data protection can all apply, and some sites forbid scraping altogether.
- Many modern sites build their content with JavaScript, which makes simple scraping harder and calls for extra tools.
Make web scraping practice easier
Stick to sandbox sites built for scraping practice and to sites that publish an official API or open data, so you can learn the technique without worrying about terms.
First session
What to do in the first 30 minutes
Open a practice scraping site and use the browser's Inspect tool to find the HTML for one product title.
Install Python and a parsing library, then write a script that downloads the page and prints the HTML.
Use a selector to pull out every title and price on that page and print them as a tidy list.
Save the results to a CSV file and open it in a spreadsheet to check it matches what the page shows.
The appeal · Digital practice
Why try web scraping practice?
Web scraping practice means writing programs, usually in Python, that download web pages and pick out the data you want, such as titles, prices or listings. It differs from API client building because pages were not made for programs, so your code is more fragile and the legal and ethical limits matter more. Beginners practise on sandbox sites built for learners, then handle pagination and JavaScript-built pages, and eventually collect data for their own projects within a site's terms.
Data you cannot get any other way
Within the rules, you can build your own dataset on a topic that matters to you and then clean, chart or analyse it.
Seeing how web pages are built
HTML, CSS selectors and requests make the web far less mysterious.
A skill that feeds other hobbies
Collected data goes straight into data cleaning, charts, dashboards and data stories.
Keep it simple
What you need to begin
- A computer and Python (or similar)Free, and libraries for fetching pages and parsing HTML are easy to install.
- A browser with developer toolsRight-click and Inspect shows the HTML behind any page so you can find the elements you want.
- A practice site made for scrapingSandbox sites built for learners, such as Books to Scrape and Quotes to Scrape, let you practise without worrying about terms or load on a real business.
- Somewhere to save resultsA CSV file or small SQLite database holds what you collect so you can clean and analyse it later.
The fundamentals
Four skills to build
Reading HTML
Understanding tags, classes and nesting in the browser inspector tells you where the data sits.
Selectors
CSS selectors or XPath let your code pick exactly the elements you want from a page.
Polite crawling
Pausing between requests, identifying your script and respecting robots.txt and a site's terms keeps you on the right side of the site and the law.
Pagination and messy data
Following Next links and tidying inconsistent text turns a run of pages into a usable table.
Four small steps
Your first week
- Open a practice scraping site, use Inspect to find where one item's title and price sit in the HTML and note the tags and class names.
- Write a script that downloads one page and prints the title and price of every item on it.
- Extend it to follow the Next link through several pages with a pause between requests, and save the results to a CSV file.
- Read the robots.txt and terms of use of a real site you might want data from, and decide whether it allows scraping or offers an API or download instead.
The longer path
How progress usually looks
For web scraping practice, a sustainable rhythm is a couple of hours a week, with longer sessions when a project needs pagination or cleaning. Move forward when the current step feels repeatable, not merely possible once.
Practice sites
You scrape titles and prices from a sandbox site and save them to a CSV.
Multi-page scrapers
You follow pagination, handle missing fields and errors, and pause politely between requests.
Dynamic pages
You deal with content loaded by JavaScript, find hidden JSON requests or use a browser-automation tool, and prefer APIs where they exist.
Project datasets
You run scheduled scrapes within a site's terms, store history in a database and analyse or chart the results.
Progress markers
What improvement looks like
You scrape titles and prices from a sandbox site and save them to a CSV.
You deal with content loaded by JavaScript, find hidden JSON requests or use a browser-automation tool, and prefer APIs where they exist.
You run scheduled scrapes within a site's terms, store history in a database and analyse or chart the results.
Spend deliberately
A realistic cost plan
The headline starting range is Free (using a computer you own), but access, borrowing and second-hand equipment can change that substantially.
Learn with other people
Community and safety
Finding your people
Local Python and data meetups, library and university coding groups and online forums for scraping libraries are where UK beginners usually find help. Open data communities can also point you to datasets that save you from scraping at all.
Safety note
Check a site's terms of use and robots.txt before scraping, keep your request rate low and do not collect personal data about individuals, which brings UK data protection obligations. Scraped content may be protected by copyright or database rights, so do not republish it without permission.
Three common beginner mistakes
- Scraping with no pause between requests hammers a site and gets you blocked, so add a delay.
- Writing selectors that rely on fragile details, like 'the tenth div', breaks easily, so choose stable class names or IDs.
- Not checking for an official API or download first wastes effort, so look for a data or developer page before you scrape.
Good to know
One tip worth keeping
Beginners often fire off requests too fast or scrape sites that forbid it. Check robots.txt and the terms of use first, prefer an official API or data download when there is one, pause between requests and do not collect personal data.
Before you begin
Common questions
Is web scraping legal in the UK?+
It depends on what you scrape and how. Terms of service, copyright, database rights and data protection law can all apply, so check each site's terms, avoid personal data and take proper advice before any commercial use.
What is robots.txt?+
A file at the root of a site telling automated tools which pages they are asked not to visit. It is a convention rather than a law, but respecting it is basic good practice.
What is the difference between scraping and using an API?+
An API is designed for programs and returns structured data under stated rules. Scraping reads pages made for people, so it is more fragile and may breach terms, which is why an API is better when one exists.
Which language is best for web scraping?+
Python is the usual choice, with libraries for fetching and parsing pages. JavaScript with Node is also common, especially for pages built by scripts.
Why does my scraper return empty results?+
Often the page builds its content with JavaScript after loading, so the HTML you downloaded does not contain the data. Check the browser's network tab for a JSON request, or use a browser-automation tool.