# LoopNet UK Scraper \[$0.5/1k💰] | Office & Retail | Market Data (`ahmed_jasarevic/loopnet-scraper`) Actor

Scrape LoopNet UK commercial property listings for lease and for sale - office, industrial, retail and coworking space. Get asking rents, prices, sq ft, broker contacts and photos for lead generation, rent monitoring and market research.

- **URL**: https://apify.com/ahmed\_jasarevic/loopnet-scraper.md
- **Developed by:** [Ahmed Jasarevic](https://apify.com/ahmed_jasarevic) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.47 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## LoopNet UK Scraper — Commercial Property Listings, Asking Rents & Broker Leads

Extract commercial property listings from **LoopNet UK (loopnet.co.uk)** — office space, industrial units, retail and coworking space for **lease and for sale** — as structured data for commercial property lead generation, asking-rent monitoring and CRE market research. No LoopNet API key and no CoStar subscription required.

### Main Use Cases

- **Commercial property lead generation** — build prospect lists of available office, retail and industrial space per UK city, complete with broker company and agent names where published.
- **Asking rent monitoring & market research** — track available inventory, asking rents (per sq ft pa) and space-use trends across UK markets on a schedule.
- **Commercial real estate comps & underwriting** — refresh comparable ("comps") data for valuation models, site-selection studies and investment memos.
- **Commercial property database building** — scrape the whole country or a multi-city batch in one run and export JSON, CSV or Excel into your CRM, BI tool or analytics pipeline.
- **New-listing alerts** — run `incrementalMode` daily and get a change feed of new, changed or removed listings instead of a full snapshot.

### How It Works

Instead of loading LoopNet's JavaScript-heavy search pages in a browser, this Actor walks LoopNet UK's **server-rendered SERP** with Cheerio over the **Apify UNBLOCKER** proxy and parses the listing placards plus embedded JSON-LD into 30+ structured fields. The plain-HTTP walk is roughly **10x faster** than a browser crawler and uses far fewer compute units.

### Build A UK Commercial Property Dataset Without A CoStar Subscription

LoopNet has no public API for bulk commercial real estate data. CoStar-tier data access is enterprise-negotiated and expensive. This Actor gives you the same publicly visible loopnet.co.uk listings — asking rents, prices, sq ft, property type, description, photos and broker contacts — as a clean, structured dataset you own. Measured on cloud builds (Sep 2026): a 3-city batch (London + Manchester + United Kingdom) of ~540 listings ran in ~189s for **~$0.0186 total (~$0.035 per 1,000 listings)** — 20–35x cheaper than competing LoopNet Actors (which charge $0.7–1.5 per 1,000).

### Collect Commercial Real Estate Leads From LoopNet UK

Every record carries the listing's location, property type, size range, asking price/rent, photo and — on US placards and where published on UK cards — the listing broker company and agent name. That is everything needed to start tenant-rep, landlord-rep or investment-sales prospecting in a target market without manually clicking through LoopNet search pages.

### Monitor Asking Rents Across UK Markets

Recurring runs are cheap by design:

- **CHEAP MODE** (`cacheTtlHours`, default 6h): a run that reuses the previous walk pays **0 UNBLOCKER requests** — it only re-fetches once the location's cache expires. If a fresh walk fails, the older cached copy is served instead of an empty run.
- **`incrementalMode`**: pushes only listings that are **NEW or CHANGED** (price, size, type or contact) since the previous run — your dataset becomes a change feed for monitoring.

A twice-a-day scheduler on one location makes almost every run a fraction of a compute unit.

### Input — Configure Your LoopNet UK Scrape

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `locationSlug` | string | No | `new-york-ny` | LoopNet URL slug for the target market. UK examples: `london-england--united-kingdom`, `manchester-gtm--united-kingdom`, whole country: `united-kingdom` |
| `batches` | array | No | — | Scrape several locations in ONE run (one container, one cold start). Each item: `locationSlug` (required), optional `listingMode`, `site`, `maxItems`, `maxPages`. Overrides top-level `locationSlug` |
| `urls` | array | No | — | Paste LoopNet SERP search or single-listing URLs directly. Site auto-detected; search URLs resume from the pasted page. Overrides slug/batches |
| `listingMode` | select | No | `for-lease` | `for-lease` / `for-sale` |
| `site` | select | No | `com` | `com` = loopnet.com (US), `co-uk` = loopnet.co.uk (UK). **For co-uk use UNBLOCKER** — it is the verified reliable path |
| `maxItems` | integer | No | `200` | Max listings to collect (max 750 per query) |
| `maxPages` | integer | No | `30` | Max SERP pages to fetch (25 items per page, max 30) |
| `minPrice` / `maxPrice` | integer | No | — | Post-parse filter on total asking/sale price. Per-sqft-rate listings (no total) are kept |
| `minSqft` / `maxSqft` | integer | No | — | Post-parse filter on size in sq ft (metric sizes converted) |
| `sortBy` | select | No | `default` | `most-recent`, `price-asc`, `price-desc`, `size-asc`, `size-desc` |
| `incrementalMode` | boolean | No | `false` | Monitoring: push only NEW/CHANGED listings vs the previous run (keyed per location + mode) |
| `cacheTtlHours` | integer | No | `6` | **CHEAP MODE** — reuse the last walk's results per location (0 UNBLOCKER requests); `0` = always walk live |
| `maxWalkAttempts` | integer | No | `2` | Re-walk after ~30s on a 0-item walk to ride out UNBLOCKER outages |
| `delayMs` | integer | No | `800` | Delay between page requests (500–10000 ms) |
| `debugProbeUrls` / `debugProbeHeaders` / `debugDumpBody` | array / object / boolean | No | — | DEBUG helpers: probe specific URLs over a pinned proxy session (overrides normal scraping) |
| `proxyConfiguration` | proxy | No | UNBLOCKER | **Use Apify UNBLOCKER for co-uk**; custom residential proxy URLs for `com` if you need US runs |

### Output — Structured Commercial Property Listings Data

One dataset record per listing. The `overview` dataset view (`address`, `summary`, `location`, `property type`, `space use`, `company`, `broker`, `listing URL`, `photo`, `listing ID`) is available from the run's Storage tab, and the full dataset exports as **JSON, CSV, Excel or HTML**.

| Field | Description |
|---|---|
| `listingId` | LoopNet internal listing ID |
| `url` | Canonical listing URL |
| `address` | Property street address / building name |
| `subtitle` | Placard summary line (e.g. "57,937 SF Office Available") |
| `location` / `city` / `state` / `zip` | Location components |
| `propertyType` | Office, Retail, Industrial, Co-working, etc. |
| `spaceUse` | Intended space use advertised in the listing |
| `listingTypeName` / `transactionType` | LET / FOR SALE; `FOR-LEASE` / `FOR-SALE` |
| `description` | First data-points paragraph from the placard |
| `priceText` / `priceMin` / `priceMax` / `priceCurrency` | Asking price or per-sqft rate. Per-sqft-per-annum rates ("£49.50 sq ft pa") stay as `priceText` with no bogus total |
| `sizeText` / `sizeMinSqFt` / `sizeMaxSqFt` | Available size range (sqm converted to sqft) |
| `images` / `imageUrl` | Photos |
| `highlights` | Amenity/EPC-style data tags |
| `lat` / `lng` | Coordinates (when present) |
| `contactCompany` / `contactName` | Broker/listing company and agent (US placards, wherever published) |
| `country` | e.g. `United Kingdom` |
| `searchPage` | Result page the listing appeared on |

### Example Input — Scrape London Office Space For Lease

```json
{
  "locationSlug": "london-england--united-kingdom",
  "listingMode": "for-lease",
  "site": "co-uk",
  "maxItems": 200,
  "maxPages": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["UNBLOCKER"]
  }
}
```

Or scrape several UK markets in one container via `batches`:

```json
{
  "batches": [
    { "locationSlug": "london-england--united-kingdom", "listingMode": "for-lease" },
    { "locationSlug": "manchester-gtm--united-kingdom", "listingMode": "for-lease" },
    { "locationSlug": "united-kingdom", "listingMode": "for-sale", "maxItems": 300 }
  ],
  "site": "co-uk",
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["UNBLOCKER"] }
}
```

### Example Output — One Record Per Commercial Listing

```json
{
  "listingId": "35346928",
  "url": "https://www.loopnet.co.uk/Listing/...",
  "address": "Bloom Poplar - 10 Prestons Rd",
  "city": "London",
  "zip": "E14 9RL",
  "propertyType": "Light Industrial",
  "listingTypeName": "LET",
  "transactionType": "FOR-LEASE",
  "description": "Explore Bloom Poplar, the latest newly refurbished warehousing facility...",
  "sizeText": "1,292 - 27,043 sq ft",
  "sizeMinSqFt": 1292,
  "sizeMaxSqFt": 27043,
  "priceText": "£49.50 sq ft pa",
  "priceCurrency": "£",
  "images": ["https://images1.loopnet.com/i2/..."],
  "highlights": ["4 Units Available Now"],
  "country": "United Kingdom",
  "searchPage": 1
}
```

Download the dataset as **JSON, HTML, CSV or Excel** from the run's Storage tab, or pull it over the Apify API into your own pipeline.

### Integrations & Automation — Monitor Commercial Rents On A Schedule

This Actor runs on the Apify platform, so you get these out of the box:

- **API** — call it programmatically from JavaScript, Python or any HTTP client.
- **Scheduling** — set a daily or weekly schedule for recurring commercial property monitoring (see CHEAP MODE above — recurring runs are nearly free).
- **Webhooks** — push new/changed listings to your CRM, Slack, Google Sheets (Make/Zapier) or analytics pipeline the moment a run finishes.
- **Apify integrations** — 30+ connectors including Make, Zapier, Google Sheets and more.

**Recommended setup for rent monitoring**: schedule 1–2 runs per day per target market with `incrementalMode: true` and leave `cacheTtlHours` on its default of 6h.

### Related Apify Actors — Commercial Real Estate Scrapers

- [memo23/loopnet-scraper-ppe](https://apify.com/memo23/loopnet-scraper-ppe) — LoopNet US + UK/Realla commercial property scraper (per-1,000 pricing)
- [azzouzana/loopnet-scraper](https://apify.com/azzouzana/loopnet-scraper) — LoopNet.com & LoopNet.co.uk no-code scraper (sale, lease, auctions)
- [parsebird/loopnet-scraper](https://apify.com/parsebird/loopnet-scraper) — LoopNet US and UK listings, tax records and broker directories
- [studio-amba/loopnet-uk-scraper](https://apify.com/studio-amba/loopnet-uk-scraper) — LoopNet.co.uk commercial property listings (UK-focused)
- [abotapi/loopnet-scraper](https://apify.com/abotapi/loopnet-scraper) — LoopNet commercial properties across US/Canada/UK with search and URL modes

### FAQ — LoopNet API Alternatives, Scraping And Data Questions

#### Why use this actor instead of the official LoopNet API?

**There is no public LoopNet API.** LoopNet (a CoStar Group company) does not offer a self-serve REST API; programmatic access to CoStar/LoopNet data is enterprise-negotiated and expensive, and CoStar's terms bar automated extraction from their paid portals. This Actor reads **publicly visible loopnet.co.uk search results** — no LoopNet login, no cookies, no CAPTCHA solving — and hands you the data as a structured dataset you keep.

#### What are LoopNet UK alternatives for commercial property data?

LoopNet UK (loopnet.co.uk) carries the former Realla inventory — CoStar acquired Realla in 2018 and consolidated its listings under LoopNet UK. Alternative UK commercial property sources include Rightmove Commercial, Zoopla commercial, EG PropertyLink and local agent portals — but none offers bulk, structured, API-friendly data for free. For UK commercial listings with asking rents, sq ft and broker contacts in one scrape, loopnet.co.uk via this Actor is the direct route.

#### Does this actor work on loopnet.com (US)?

The verified, reliable path is `site=co-uk` over the Apify UNBLOCKER proxy — `loopnet.com` (US) is Akamai-blocked from all Apify egress IPs. The `com` site option exists for users who bring their own working residential proxy URLs. If your project is US-only, check the US-focused actors listed under Related Actors.

#### What is CHEAP MODE?

With `cacheTtlHours` left on (default 6h), a run that starts within the TTL of the last walk's cache serves results straight from the key-value store with **0 UNBLOCKER requests** — the run log says "CHEAP MODE". If a fresh walk fails (dead UNBLOCKER window), the older cached copy is served as a fallback instead of an empty run. Changing min/max price/size or sort automatically invalidates the cache so you never get wrongly filtered data.

#### How much does it cost to scrape LoopNet UK?

Pay-per-event: you pay per useful result (`$0.0005` per dataset item plus a tiny `$0.0005` run-start event) — roughly **$0.50 per 1,000 listings** at list price, and nothing for empty runs. Measured platform cost on real cloud runs: ~$0.035 per 1,000 listings (20–35x below competing LoopNet Actors). Recurring CHEAP-MODE runs cost a fraction of that.

#### Is scraping LoopNet legal?

Scraping publicly accessible data may still be bound by the site's Terms of Service and by applicable law. Run this Actor only on data you are authorised to collect, respect rate limits, and make sure your use (including storing broker/contact details) complies with local privacy regulations such as UK GDPR. This tool is provided as-is without warranty. See the disclaimer below.

#### How do I find industrial units to let or warehouse space for rent?

Use a `locationSlug` like `manchester-gtm--united-kingdom` with `listingMode: for-lease`, then filter with `minSqft` / `maxSqft` and `sortBy: size-desc` to surface the largest available units in a market. LoopNet UK's industrial and warehouse categories are fully covered by the SERP walk.

### How This Actor Compares — Verified Against Competitors

| Capability | Typical competing LoopNet actors | This actor |
|---|---|---|
| Price per 1,000 results | $0.70–$1.50 (verified on memo23/azzouzana pages) | ~$0.50 (list price) |
| UK loopnet.co.uk path | Varies; some US-focused actors report persistent Akamai 403s (verified: crawlerbros docs) | Verified working: plain-HTTP SERP walk over UNBLOCKER |
| Recurring monitoring runs | Re-crawl every run | CHEAP MODE reuses last walk (0 UNBLOCKER requests) + `incrementalMode` change feed |

Every row in this table is drawn from the cited actor pages or this actor's own run data — nothing assumed.

### For AI Agents & LLM Apps

**Purpose:** given a location slug and listing mode, returns structured commercial property listings from LoopNet UK (dataset items with address, price/rent, sq ft, property type, description, photos and broker contact where published).

**Minimal working input:**

```json
{
  "locationSlug": "london-england--united-kingdom",
  "listingMode": "for-lease",
  "site": "co-uk",
  "maxItems": 25,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["UNBLOCKER"] }
}
```

**Variant inputs (distinct modes):**

- Multi-city batch in one run: set `batches` (array of `{locationSlug, listingMode, site, maxItems, maxPages}`) and omit `locationSlug`.
- Monitoring change feed: add `"incrementalMode": true` to push only new/changed listings.
- Cheap recurring run: keep `cacheTtlHours` at 6 to reuse the previous walk (0 proxy requests).

**Output fields (dataset):** `listingId`, `url`, `address`, `subtitle`, `location`, `city`, `state`, `zip`, `propertyType`, `spaceUse`, `listingTypeName`, `transactionType`, `description`, `priceText`, `priceMin`, `priceMax`, `priceCurrency`, `sizeText`, `sizeMinSqFt`, `sizeMaxSqFt`, `images`, `imageUrl`, `highlights`, `lat`, `lng`, `contactCompany`, `contactName`, `country`, `searchPage`.

**Behaviors an agent should know:**

- `site` default is `com`, but `co-uk` over the UNBLOCKER proxy is the only verified reliable path — always pass `site: "co-uk"` for UK runs.
- `maxItems` caps at 750 per query; `maxPages` caps at 30 (25 items/page). Price/size filters are post-parse: per-sqft-rate listings with no total price are kept even when `minPrice`/`maxPrice` are set.
- If `batches` or `urls` is set, top-level `locationSlug` is ignored.
- `incrementalMode` and `cacheTtlHours` are the cost-control levers for recurring schedules; debug fields (`debugProbeUrls` etc.) override normal scraping — never set them in production calls.

**Billing:** pay-per-event — `$0.0005` per dataset item + `$0.0005` per run start (i.e. ~$0.50 per 1,000 listings).

### Legal & Compliance Disclaimer

This Actor is an independent tool and is **not affiliated with, endorsed by, or sponsored by LoopNet, Realla, or CoStar Group**. It accesses only **publicly available search-result pages** on loopnet.co.uk — it does not bypass logins, solve CAPTCHAs, or access paid CoStar data. Users are responsible for complying with LoopNet's Terms of Service and applicable data-protection law (including UK GDPR) when collecting and processing listings and any contact details they contain. Broker names and contact information should not be used for unsolicited commercial outreach in violation of applicable law.

### SEO Keywords

loopnet uk scraper, loopnet.co.uk commercial property listings, commercial property data uk, commercial real estate data, commercial real estate leads, commercial property lead generation, office space to rent uk, office space for lease london, industrial units to let, warehouse for rent uk, retail space to rent uk, asking rent monitoring, commercial rent trends uk, commercial property market research, commercial real estate comps, commercial real estate database, uk commercial property dataset, manchester industrial space to let, loopnet api, loopnet alternative, scrape loopnet without api, does loopnet have an api, commercial property for sale uk, cre underwriting data

# Actor input Schema

## `locationSlug` (type: `string`):

LoopNet URL slug for the target location. US examples: 'new-york-ny', 'los-angeles-ca', 'chicago-il', 'san-francisco-ca'. UK examples (with site=co-uk): 'london-england--united-kingdom', 'manchester-gtm--united-kingdom', or the whole country: 'united-kingdom'.

## `batches` (type: `array`):

OPTIONAL. Scrape several locations in ONE run (one container, one cold start, shared memory — faster and cheaper than N runs). Each batch item: 'locationSlug' (required), optional 'listingMode' ('for-lease'/'for-sale'), optional 'site' ('com'/'co-uk'), optional 'maxItems'/'maxPages'. Per-location values default to the top-level ones. When this is set, the top-level 'locationSlug' is ignored.

## `urls` (type: `array`):

OPTIONAL. Paste LoopNet SERP search URLs (e.g. https://www.loopnet.co.uk/search/commercial-property/london-england--united-kingdom/for-lease/) or single listing URLs. Each URL is handled independently (site auto-detected from the host; search URLs resume from the pasted page). When set, locationSlug/batches are ignored. minPrice/maxPrice/minSqft/maxSqft/sortBy still apply to search-URL results.

## `listingMode` (type: `string`):

Search for lease or sale listings.

## `site` (type: `string`):

Which LoopNet portal to scrape. 'com' = loopnet.com (US), 'co-uk' = loopnet.co.uk (United Kingdom). For co-uk, the fast reliable path is the plain-HTTP walk with the Apify UNBLOCKER proxy (verified working). Apify RESIDENTIAL (any pool) gets hard 403 on the co.uk search pages, so don't use it for co-uk search.

## `maxItems` (type: `integer`):

Maximum number of listings to scrape (max 750 per query).

## `maxPages` (type: `integer`):

Maximum number of result pages to crawl (25 items per page, max 30 pages).

## `minPrice` (type: `integer`):

OPTIONAL. Only keep listings whose total asking price/sale price is at least this value. Listings without a known total price (per-sqft rates, Price Upon Request) are kept, matching industry behavior.

## `maxPrice` (type: `integer`):

OPTIONAL. Only keep listings whose total price is at most this value.

## `minSqft` (type: `integer`):

OPTIONAL. Only keep listings of at least this size in square feet (metric sizes are converted).

## `maxSqft` (type: `integer`):

OPTIONAL. Only keep listings of at most this size in square feet.

## `sortBy` (type: `string`):

OPTIONAL. Sort each page's results before saving: most-recent (default order), price-asc, price-desc, size-asc, size-desc.

## `incrementalMode` (type: `boolean`):

When enabled, the Actor compares this run's SERP results against the previous run's snapshot (stored in a key-value store, keyed per location+mode) and only pushes listings that are NEW or CHANGED (price, size, type, or contact). A listing is output only when something changed — the dataset becomes a change feed for monitoring. Disable for full snapshot scraping.

## `cacheTtlHours` (type: `integer`):

CHEAP MODE: how long a scraped location's results stay reusable before a fresh walk is needed. When a run starts and a cache from the last run is younger than this value, the Actor serves those results straight from the key-value store with 0 UNBLOCKER requests (log says 'CHEAP MODE'). If a fresh walk fails (e.g. a dead UNBLOCKER window), an older cached copy is served as a fallback instead of returning nothing. Set 0 to disable caching and always walk live. Caches are keyed per site+location+mode, and a change in minPrice/maxPrice/minSqft/maxSqft/sortBy automatically invalidates them.

## `maxWalkAttempts` (type: `integer`):

How many times to re-run the SERP walk with a short cooldown if the first attempt yields nothing (typically a bad UNBLOCKER window). 1 = try once (fast fail), 2 = one re-try after ~30s, 3 = two re-tries. Helps ride out brief UNBLOCKER outages.

## `delayMs` (type: `integer`):

Delay in milliseconds between fetched SERP pages. Lower settings are fine with UNBLOCKER (it rotates per request); raise it if you are using your own slower residential proxies.

## `debugProbeUrls` (type: `array`):

DEBUG: fetch these URL(s) over a pinned Apify proxy session and log status/bytes/flags/cookies. Plain URL = GET. 'POST;{json};{url}' = POST. Overrides normal scraping (returns immediately). Format: 'https://...' or 'POST;{};https://...'.

## `debugProbeHeaders` (type: `object`):

DEBUG: extra headers sent with each debug probe request.

## `debugDumpBody` (type: `boolean`):

DEBUG: when debugProbeUrls is set, store the first probe response body to KVS key 'probe-body.html'.

## `proxyConfiguration` (type: `object`):

Proxy settings to avoid IP-based blocking. Works with the plain-HTTP SERP walk. For loopnet.co.uk use UNBLOCKER; for loopnet.com use RESIDENTIAL (US) - if LoopNet still blocks it, supply your own residential proxy URLs in a batch or URL input.

## Actor input object example

```json
{
  "locationSlug": "new-york-ny",
  "batches": [
    {
      "locationSlug": "london-england--united-kingdom"
    },
    {
      "locationSlug": "manchester-gtm--united-kingdom"
    }
  ],
  "urls": [
    "https://www.loopnet.co.uk/search/commercial-property/london-england--united-kingdom/for-lease/"
  ],
  "listingMode": "for-lease",
  "site": "com",
  "maxItems": 200,
  "maxPages": 30,
  "sortBy": "default",
  "incrementalMode": false,
  "cacheTtlHours": 6,
  "maxWalkAttempts": 2,
  "delayMs": 800,
  "debugDumpBody": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ]
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all scraped listings

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "locationSlug": "new-york-ny",
    "batches": [
        {
            "locationSlug": "london-england--united-kingdom"
        },
        {
            "locationSlug": "manchester-gtm--united-kingdom"
        }
    ],
    "urls": [
        "https://www.loopnet.co.uk/search/commercial-property/london-england--united-kingdom/for-lease/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "UNBLOCKER"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahmed_jasarevic/loopnet-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "locationSlug": "new-york-ny",
    "batches": [
        { "locationSlug": "london-england--united-kingdom" },
        { "locationSlug": "manchester-gtm--united-kingdom" },
    ],
    "urls": ["https://www.loopnet.co.uk/search/commercial-property/london-england--united-kingdom/for-lease/"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["UNBLOCKER"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("ahmed_jasarevic/loopnet-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "locationSlug": "new-york-ny",
  "batches": [
    {
      "locationSlug": "london-england--united-kingdom"
    },
    {
      "locationSlug": "manchester-gtm--united-kingdom"
    }
  ],
  "urls": [
    "https://www.loopnet.co.uk/search/commercial-property/london-england--united-kingdom/for-lease/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ]
  }
}' |
apify call ahmed_jasarevic/loopnet-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ahmed_jasarevic/loopnet-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bK6lsZci2ZFYr19Fb/builds/cgPCmC8l2R8I2G7n2/openapi.json
