How to Scrape Real Estate Property Data using Python

article feature image

Real estate data is one of the most popular web scraping targets. The web is full of this type of information and in this article, we'll take a look at how to web scrape real estate data using Python for free!

We'll start with a quick overview, use cases and what sort of data can we scrape in this niche. Then, we'll take a look at what are the most popular web scraping targets for real estate property data and how to scrape them. Let's dive in!

Why Scrape Real Estate Data?

The web is full of public housing property data listed by people or agencies. This is the biggest most complete market dataset out there which is vital for business analytics and market analysis.

Want to know what are current trends in New York real estate market? Scraping all New York properties with a little bit of data analytics will get you there!

Using these vast public datasets we can follow housing market trends very closely. What sort of houses are in demand? Which areas are becoming more popular? We can even track the performance of competing agencies as their performance is visible in this data.

This information can even be used in more niche scenarios like architectural trends observation or regulation enforcement as all property listings include detailed data points like floor plans, annotated images and exact specifications.

By scraping property data ourselves using Python we don't need to pay for expensive real estate data API which are expensive and offer incomplete and stale data compared to the live web pages.

What Kind of Property Data is out There?

The public data available varies by source (be it Zillow, Redfin, Realtor.com etc.) though we can overview common and unique data points:

  • Price Data (current and historical)
  • Architectural Details and Features
  • Photos
  • Architectural Plans
  • Listing Performance
  • Listing Ratings and Scores
  • Tax Records
  • Geographical Data - location, address, latitude, longtitude
  • Seller information - phone numbers, names, meta information

It doesn't take a lot of imagination to take advantage of these data points! With persistent tracking, we can also overview how the listing changes through time.

There are many public real estate data sources. Let's take a quick look at the most popular ones and how to scrape them.

1. Zillow.com

Zillow is by far the biggest real property listing source in the United States and it's surprisingly easy to scrape. Zillow also offers unique features like "Zestimate" which estimates property prices in the current and historical markets as well their own property and neighborhood ratings.

Zillow also offers pricing history and engagement statistics like how many times the listing has been viewed or saved. All of this data is publicly available and can be easily scraped using Python.

How to Scrape Zillow Real Estate Property Data in Python

For a complete scrape guide on how to scrape Zillow.com using Python see our full introduction article.

How to Scrape Zillow Real Estate Property Data in Python

2. Realtor.com

Realtor.com is the second biggest real property listing source in the United States. It offers a very similar dataset to Zillow offering similar premium data points like price history as well as property and neighborhood ratings.

When it comes to web scraping, Realtor.com is very similar to Zillow.com (both websites use the same web technologies) making it another easy scrape source in Python.

How to Scrape Realtor.com - Real Estate Property Data

For a complete scrape guide on how to scrape Realtor.com using Python see our full introduction article.

How to Scrape Realtor.com - Real Estate Property Data

3. Redfin

Redfin.com is another big real property listing source in US. Just like Zillow and Realtor, Redfin contains a very similar dataset that not only includes property data but region meta information, agent contact details as well as popularity metadata (e.g. view and save counts).

How to Scrape Redfin Real Estate Property Data in Python

For a complete scrape guide on how to scrape Redfin.com using Python see our full introduction article.

How to Scrape Redfin Real Estate Property Data in Python

4. Idealista

Idealista is the biggest real property listing source in South Europe, primarily most popular in Spain though also available in Italy and Portugal.

The available data points in the European markets are a bit smaller compared to Zillow and Realtor though Idealista still contains unique details like detailed floor plans.

Web scraping Idealista in Python is not any more difficult than other sources either.

How to Scrape Idealista.com in Python - Real Estate Property Data

For a complete scrape guide on how to scrape Idealista.com (as well as .it and .pt) using Python see our full introduction article.

How to Scrape Idealista.com in Python - Real Estate Property Data

5. RightMove

RightMove is the biggest real property listing source in the UK. It offers a very similar dataset to Zillow and Realtor.com and is easy to scrape using hidden web data approach.

How to Scrape RightMove Real Estate Property Data with Python

For a complete scrape guide on how to scrape RightMove.co.uk using Python see our full introduction article.

How to Scrape RightMove Real Estate Property Data with Python

Real Estate Property Platforms by Country

While the US market is owned by a few big players like Zillow and Realtor the rest of the world markets are much more diverse. Here's a list of popular real estate data scrape targets by country:

Country Sources
Europe
๐Ÿ‡ง๐Ÿ‡พ Belarus realt.by
๐Ÿ‡ง๐Ÿ‡ช Belgium immoweb.be
๐Ÿ‡จ๐Ÿ‡ฟ Czech Republic sreality.cz
๐Ÿ‡ฉ๐Ÿ‡ฐ Denmark boligsiden.dk
๐Ÿ‡ช๐Ÿ‡ช Estonia kv.ee
๐Ÿ‡ซ๐Ÿ‡ฎ Finland etuovi.com
๐Ÿ‡ซ๐Ÿ‡ท France seloger.com
๐Ÿ‡ฉ๐Ÿ‡ช Germany ImmobilienScout24.de
๐Ÿ‡ฎ๐Ÿ‡ธ Iceland visir.is
๐Ÿ‡ฎ๐Ÿ‡ช Ireland daft.ie
๐Ÿ‡ฎ๐Ÿ‡น Italy idealista.com, immobiliare.it
๐Ÿ‡ณ๐Ÿ‡ฑ Netherlands funda.nl
๐Ÿ‡ณ๐Ÿ‡ด Norway finn.no
๐Ÿ‡ต๐Ÿ‡น Portugal idealista.com
๐Ÿ‡ช๐Ÿ‡ธ Spain idealista.com
๐Ÿ‡ธ๐Ÿ‡ช Sweden hemnet.se
๐Ÿ‡จ๐Ÿ‡ญ Switzerland homegate.ch
๐Ÿ‡ฌ๐Ÿ‡ง United Kingdom rightmove.co.uk
๐Ÿ‡ฆ๐Ÿ‡น Austria Immobilienscout24.at, immowelt.at
๐Ÿ‡ง๐Ÿ‡ฌ Bulgaria imot.bg
๐Ÿ‡ญ๐Ÿ‡ท Croatia oglasnik.hr
๐Ÿ‡ฌ๐Ÿ‡ท Greece spitogatos.gr
๐Ÿ‡ญ๐Ÿ‡บ Hungary ingatlan.com
๐Ÿ‡ฑ๐Ÿ‡ป Latvia city24.lv
๐Ÿ‡ฑ๐Ÿ‡น Lithuania aruodas.lt
๐Ÿ‡ต๐Ÿ‡ฑ Poland otodom.pl
๐Ÿ‡ท๐Ÿ‡ด Romania storia.ro, imobiliare.ro
๐Ÿ‡ท๐Ÿ‡บ Russia cian.ru, domclick.ru
๐Ÿ‡ท๐Ÿ‡ธ Serbia 4zida.rs
๐Ÿ‡ธ๐Ÿ‡ฐ Slovakia nehnutelnosti.sk
๐Ÿ‡ธ๐Ÿ‡ฎ Slovenia nepremicnine.net
๐Ÿ‡บ๐Ÿ‡ฆ Ukraine dom.ria.com
Others
๐Ÿ‡ฆ๐Ÿ‡ฒ Armenia estate.am
๐Ÿ‡ฆ๐Ÿ‡บ Australia realestate.com.au
๐Ÿ‡ฆ๐Ÿ‡ฟ Azerbaijan bina.az
๐Ÿ‡ง๐Ÿ‡ญ Bahrain propertyfinder.com.bh
๐Ÿ‡ฐ๐Ÿ‡ญ Cambodia realestate.com.kh
๐Ÿ‡จ๐Ÿ‡ณ China anjuke.com, fang.com, lianjia.com
๐Ÿ‡ฌ๐Ÿ‡ช Georgia myhome.get
๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia 99.co/id, rumah.com
๐Ÿ‡ฎ๐Ÿ‡ท Iran kilid.com, 2nabsh.com
๐Ÿ‡ฎ๐Ÿ‡ถ Iraq iq.opensooq.com
๐Ÿ‡ฎ๐Ÿ‡ฑ Israel madlan.co.il
๐Ÿ‡ฏ๐Ÿ‡ต Japan suumo.jp
๐Ÿ‡ฏ๐Ÿ‡ด Jordan bayut.jo
๐Ÿ‡ฐ๐Ÿ‡ผ Kuwait kw.opensooq.com
๐Ÿ‡ฑ๐Ÿ‡ฆ Laos banlao.la
๐Ÿ‡ฑ๐Ÿ‡ง Lebanon propertyfinder.com.lb
๐Ÿ‡ฒ๐Ÿ‡พ Malaysia iproperty.com.my, propertyguru.com.my
๐Ÿ‡ณ๐Ÿ‡ฟ New Zealand realestate.co.nz
๐Ÿ‡ด๐Ÿ‡ฒ Oman mawa.om
๐Ÿ‡ต๐Ÿ‡ญ Philippines lamudi.com.ph, dotproperty.com.ph
๐Ÿ‡ถ๐Ÿ‡ฆ Qatar propertyfinder.com.qa
๐Ÿ‡ธ๐Ÿ‡ฆ Saudi Arabia sa.aqar.fm
๐Ÿ‡ธ๐Ÿ‡ฌ Singapore propertyguru.com.sg, 99.co
๐Ÿ‡ฐ๐Ÿ‡ท South Korea land.naver.com
๐Ÿ‡น๐Ÿ‡ผ Taiwan 591.com.tw
๐Ÿ‡น๐Ÿ‡ญ Thailand ddproperty.com
๐Ÿ‡น๐Ÿ‡ท Turkey emlakjet.com, hepsiemlak.com
๐Ÿ‡ฆ๐Ÿ‡ช UAE bayut.com, propertyfinder.com.ae
๐Ÿ‡ป๐Ÿ‡ณ Vietnam batdongsan.com.vn, alonhadat.com.vn
๐Ÿ‡พ๐Ÿ‡ช Yemen ye.opensooq.com
๐Ÿค– scrape this table?

To scrape tables like this we can use Python and XPath selectors:

# For this example we'll be using 2 community packages:
# pip install httpx parsel
import httpx
from parsel import Selector

response = httpx.get("https://scrapfly.io/blog/how-to-scrape-real-estate-property-data-using-python/")
selector = Selector(text=response.text)
results = {}
table = selector.xpath('//h3[contains(@id,"by-country")]/following-sibling::table[1]')
for row in table.xpath('tbody/tr'):
    country = row.xpath('td[1]/text()').get()
    urls = row.xpath('td[2]//a/@href').getall()
    if urls:  # skip separator rows
        results[country] = urls
print(results)

All of these real estate property websites can be scraped using Python and a few popular community libraries.

Hands on Python Web Scraping Tutorial and Example Project

If you're new to web scraping see our complete introduction to web scraping in Python is the most popular programming language for this niche

Hands on Python Web Scraping Tutorial and Example Project

Scraping Tips

The number one tip for scraping real estate property websites is to look out for hidden web data. Many of real estate platforms are powered by Javascript front-ends such as Nextjs which often store whole dataset hidden away in HTML. For more see:

How to Scrape Hidden Web Data

Hidden web data is usually tucked away in HTML script tags or javascript variables. See our full introduction with examples how to scrape it with Python.

How to Scrape Hidden Web Data

Another tip - for finding all properties for a conclusive dataset try checking /robots.txt location for a sitemap. Since real estate web pages want to be indexed by crawlers they often contain detailed sitemaps with all of the property links or even split into categories by location or features.

Real Estate Scraping Challenges

By far the biggest challenge when it comes to scraping real estate data is scraper blocking. Some property listing websites only allow connections from specific countries and some use anti web scraping technologies to block scrapers.

To scrape these sources ScrapFly web scraping API can be used which retrieves public web pages for you.

scrapfly middleware

ScrapFly feels like a proxy but does much more!

ScrapFly offers several powerful features that help to scrape hard to reach web pages:

Scrapfly comes with a convenient Python SDK python package that implements all of these features in a Python client.

FAQ

To wrap this article up let's take a look at some common questions about scraping in real estate:

Is it illegal to scrape real estate listings?

No, scraping public data is perfectly legal. Scraping real estate property data at respectful rates is legal and ethical. That being said, extra attention should be paid when scraping personal details like seller names and phone numbers in the EU (see GDPR). For more, see our Is Web Scraping Legal? article.

My scraper can't find data that is visible on the page - why?

Many real estate property websites use dynamic javascript content in their pages which cannot be understood by web scrapers. To scrape this hidden web data scraping can be used or scraping using web browsers can render all dynamic content as seen by web browsers.

Summary

In this quick introduction, we've taken a look at real estate web scraping. We noted how important hidden web data parsing is in this scraping area and covered the most popular property websites like Zillow, Realtor.com, Idealista and dozens more.

Note that web scraping real estate data is perfectly legal and easily achievable using just Python though if you'd like to scale up check out ScrapFly's Python SDK for free!

Related Posts

How to Scrape RightMove Real Estate Property Data with Python

In this scrape guide we'll be taking a look at scraping RightMove.co.uk - one of the most popular real estate listing websites in the United Kingdom. We'll be scraping hidden web data and backend APIs directly using Python.

How to Scrape Google Search with Python

In this scrape guide we'll be taking a look at how to scrape Google Search - the biggest index of public web. We'll cover dynamic HTML parsing and SERP collection itself.

How to Scrape Ebay using Python

In this scrape guide we'll be taking a look at Ebay.com - the biggest peer-to-peer e-commerce portal in the world. We'll be scraping product details and product search.