DEV Community

Cover image for How to Scrape LoopNet UK Commercial Property Listings with Python
ReventaData
ReventaData

Posted on Originally published at apify.com

How to Scrape LoopNet UK Commercial Property Listings with Python

By the end of this tutorial you will have a Python script that pulls commercial property listings from LoopNet UK into structured rows: the title and address, city, postcode, property type, asking price where one is shown, size, initial yield and the broker. The listings cover England, Scotland, Wales and Northern Ireland.

LoopNet UK Commercial Property (reventadata/loopnet-scraper) is the Apify Actor built for this site. You describe a search, and it returns one row per listing. This guide runs it from Python with the Apify API client. The sample rows come from one run of the Actor's example task on 18 November 2026, so every row you see below is real output from that run.


Prerequisites

You need three things:

  1. Python 3.11 or newer (the Apify client for Python 3.x requires it).
  2. A free Apify account.
  3. Your API token, from Settings > API & Integrations in Apify Console.

Install the client and export the token:

pip install -U "apify-client~=3.0"
export APIFY_API_TOKEN="your_apify_token_here"
Enter fullscreen mode Exit fullscreen mode

No scraping code is needed on your side. The Actor reads public pages with no login, so you do not need a LoopNet account.


What you'll achieve

You will search the whole UK for commercial property for sale, read the rows in Python and print a short summary for each listing. Each row carries the listing ID and link, the title and address, the city, county and postcode, the property type, the asking price as text and as a number, the size, the initial yield when one is shown, and the broker name and company.

Not every listing has every field. The run quoted in this guide returned ten listings, and the price field was empty on six of them. The script below prints empty fields as they come, so you can see where the gaps are.

A search for property for sale across the whole UK returns mixed categories: industrial units, offices, land and portfolios. Step 2 shows how to narrow the search with the property type input.


Step 1: Open LoopNet UK Commercial Property

Open the LoopNet UK Commercial Property page on Apify Store. The Try for free button there opens the Actor in Apify Console. This tutorial calls the Actor from Python, so you only need its name, reventadata/loopnet-scraper.


Step 2: Choose the search

The search is described by four input fields:

  • searchQueries: a list of one or more places, such as london or manchester, or a loopnet.co.uk search URL without the part after ?. The field is required.
  • transactionType: for-sale or for-rent. The default is for-rent. Any other value is refused before the run starts.
  • propertyType: an optional property type slug, such as industrial-properties, office-space, warehouses or land. Leave it empty to search all commercial property.
  • maxItems and maxPages: caps on the number of rows and on search pages per query. A full search page holds 40 listings, and maxPages accepts up to 19 pages.

The Actor stops once it has saved maxItems rows. A query of united-kingdom covers the whole country, while a place name narrows it.

To search the whole UK for property for sale, with ten rows from the first page, the input looks like this:

{
    "searchQueries": ["united-kingdom"],
    "transactionType": "for-sale",
    "maxItems": 10,
    "maxPages": 1
}
Enter fullscreen mode Exit fullscreen mode

Step 3: Run it from Python

This script starts the Actor, waits for it, reads the dataset and prints two lines per listing:

import os
from apify_client import ApifyClient

# 1. Initialise the client with your token from the environment
client = ApifyClient(os.environ["APIFY_API_TOKEN"])

# 2. Describe the search: commercial property for sale across the UK, ten rows from one page
run_input = {
    "searchQueries": ["united-kingdom"],
    "transactionType": "for-sale",
    "maxItems": 10,
    "maxPages": 1,
}

# 3. Start the Actor and wait for it to finish
run = client.actor("reventadata/loopnet-scraper").call(run_input=run_input)
if run is None or run.status != "SUCCEEDED":
    status = run.status if run else "unknown"
    raise SystemExit(f"Run did not succeed (status: {status}).")

# 4. Read the rows from the run's default dataset
items = client.dataset(run.default_dataset_id).list_items().items
print(f"Retrieved {len(items)} listings.\n")

# 5. Print two lines per listing
for item in items:
    price = item.get("price") or "no price field"
    size = item.get("size") or "no size field"
    print(f"{item.get('title')} | {item.get('city')} ({item.get('postalCode')}) | {item.get('propertyType')}")
    print(f"  {price} | {size} | broker: {item.get('brokerCompany')}")
Enter fullscreen mode Exit fullscreen mode

Keep maxPages at 1 while you test. A larger value walks more search pages before the run ends.


Step 4: Read the output

The loop prints one block per listing. This is the output for the ten rows of the run dated 18 November 2026:

Retrieved 10 listings.

Logistics City | Bracknell (RG12 1RL) | Industrial
  no price field | 104,339 sq ft | broker: Hatch Real Estate
Circular 13 | Barking (IG11 7HP) | Industrial
  no price field | 98,544 sq ft | broker: Dowley Turner Real Estate
1200 Daresbury Park | Warrington (WA4 4HS) | Office
  £4,300,000 | 31,250 sq ft | broker: None
The Fraser Centre | Swindon (SN3 5HS) | Industrial
  no price field | 4,571 - 6,692 sq ft | broker: None
Residential Development Land | Liverpool (L3 6EP) | Land
  no price field | no size field | broker: Land Settlement 1 Limited
Reversionary Multi-Let Industrial Investment | Nottingham (NG8 4GP) | Industrial
  £11,500,000 | 146,450 sq ft | broker: Commercial Property Partners LLP
3 & 5 Freeston Drive | Nottingham (None) | Industrial
  £3,300,000 | no size field | broker: Commercial Property Partners LLP
1 & 2 Glaisdale Business Centre | Nottingham (None) | Industrial
  £2,950,000 | no size field | broker: Commercial Property Partners LLP
Panattoni Haydock 66 | Haydock (WA11 9FS) | Industrial
  no price field | 65,890 sq ft | broker: None
Churchgate House | Bolton (BL1 1HL) | Office
  no price field | 36,839 sq ft | broker: Kingston Estates
Enter fullscreen mode Exit fullscreen mode

The text no price field and no size field are labels the script prints when the field is empty. The text None is how Python shows an empty broker or postcode field. The first listing has no price field, yet its card lists "Price Upon Request" among its details.


Understanding your results

Each row keeps the listing's own values as text, and adds a number where the text has one.

  • price holds the text shown on the card, such as £4,300,000. priceAmount holds the number in GBP. Both are empty on six of the ten rows, and on all six the card's details list "Price Upon Request".
  • size is filled only from text in square feet or square metres. The land listing "Residential Development Land" lists 1.98 ac in its details, and its size field is empty.
  • yield is filled on three rows: 7.89%, 7.53% and 6.76%, all in Nottingham.
  • units is filled on one row, 5 Units, for The Fraser Centre in Swindon.
  • postalCode is empty on two Nottingham rows, whose address reads Nottingham, NTT.
  • The broker fields are empty on three rows. Three Nottingham listings name the same broker and company.
  • details keeps the bullet points from the card, in the order the card shows them.
  • searchQuery and page tell you which query and search page produced each row. Every row in this run has united-kingdom and page 1.

Pro tips

  • Start small. Set maxItems to a low number and maxPages to 1 until the output looks right, then raise them.
  • Narrow with property type. Empty propertyType returns offices, industrial units, land and portfolios together. A slug such as warehouses keeps the search to one type.
  • Group by query. When you run several place names in one input, the searchQuery column keeps each row tied to the query that found it.
  • Key on id. The Actor does not save the same listing twice within one run. Across runs, use id to match a listing you saved before.
  • Keep empty values. An empty field is data too. Filter for it, or leave it in and count it, rather than dropping the row.
  • Count the gaps before you report. Before you build a table of prices, count the rows that have one. In the run quoted here, price was empty on six of ten rows, so a price table would cover four listings.

Troubleshooting common issues

  • The run ends SUCCEEDED with no rows. A search that matches nothing ends with a status message in the run log. The dataset is then empty, so check the query and the transaction type first.
  • The run ends FAILED. The site refused the run. Run the same input again later. If it fails again, open the run log and look for the message from the Actor.
  • The run is refused before it starts. A transactionType other than for-sale or for-rent is not accepted. Correct the input and start again.

For help with a specific run, check its log first.


Next steps

Once the script prints the rows you want, save them to a file, or change the search to for-rent to compare leases with sales. Run the same script on a schedule with whatever scheduler you already use, and keep the id column so you can match listings between runs.

Try the LoopNet UK Commercial Property with a place name of your own, and see what the rows show.

For current pricing and details, see the Store page.

Top comments (0)