info@worthwebscraping.com
or (+91) 79841 03276

How to Scrape Zoopla | UK Real Estate Property Listings scraping using Python

How to Scrape Zoopla | UK Real Estate Property Listings scraping using Python

Download Python Script

Send download link to:

Zoopla is a leading real estate listing website in UK. The app consists of data about millions of homes. These homes include the ones for sale, rent, or even ones not currently on the market. It provides rent and property estimates. so learn here how to scrape zoopla properties.

When it comes to buying or renting properties, we know that the first thing that comes to one’s mind is price comparison. This site for housing provide price comparison with all listings in that area, as well as basic information like the type of house it is, number of rooms, the size, a short description, etc.

Download scraped zoopla data with our zoopla data scraping services for better understanding.

By Creating a web scraper one can scrape all the details of the houses in any area and then filter them as per requirement or can get all the contact numbers of owners and get in touch with them.

In this tutorial we will go to Zoopla and search for houses in London.

https://www.zoopla.co.uk/to-rent/property/london/?price_frequency=per_month&q=london&results_sort=newest_listings&search_source=to-rent

We will scrape zoopla and extract details like price, number of bedrooms, number of bathrooms, location and phone number. Watch video for detailed explanation.

See complete code below:

Import Libraries:
import requests
from bs4 import BeautifulSoup as soup

Send Get Request:

page = requests.get('https://www.zoopla.co.uk/to-rent/property/london/?price_frequency=per_month&q=london&results_sort=newest_listings&search_source=to-rent')
bsobj = soup(page.content,'lxml')

Scrape House Price:

price = []
for i in bsobj.findAll('div',{'class':'listing-results-right clearfix'}):
  price.append(i.a.text.strip()) 

Output:

Get number of bedrooms:

bedrooms = []
for bed in bsobj.findAll('span',{'class':'num-icon num-beds'}):
  bedrooms.append(int(bed.text.strip()))

Output:

Get number of bathrooms: As not all the houses have bathroom info so wherever it is missing we will add “No Info”

bathrooms = []
for b in bsobj.findAll('h3'):
  try:
    bath = b.findAll('span',{'class':'num-icon num-baths'})[0]
    bathrooms.append(int(bath.text.strip()))
  except:
    bathrooms.append('No Info')

Output:

Get Location:

address = []
for i in bsobj.findAll('div',{'class':'listing-results-right clearfix'}):
  address.append(i.findAll('a')[-1].text.strip())

Output:

Get Phone Number:

phone = []
for p in bsobj.findAll('span',{'class':'agent_phone'}):
  phone.append(p.text.replace(' **','').strip())

Output:

Hope this tutorial is helpful for you to collect real estate data from UK. Apart from Zoopla you can also extract UK properties data using Rightmove scraper. Rightmove is also popular and widely used site among UK people.