1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "locations": ["united-kingdom"],
11 "urls": [
12 "https://www.loopnet.com/search/commercial-real-estate/los-angeles-ca/for-lease/",
13 "https://www.loopnet.com/search/commercial-real-estate/los-angeles-ca/for-lease/2/",
14 "https://www.loopnet.com/search/commercial-real-estate/usa/auctions/",
15 "https://www.loopnet.com/search/office-space/los-angeles-ca/for-lease/",
16 "https://www.loopnet.com/search/commercial-real-estate/los-angeles-ca/for-sale/?sk=x&sb=1",
17 "https://www.loopnet.com/search/commercial-real-estate/usa/for-sale/",
18 "https://www.loopnet.com/Listing/11340-W-Olympic-Blvd-Los-Angeles-CA/29122043/",
19 "https://www.loopnet.co.uk/search/commercial-property/london-england--united-kingdom/for-rent/",
20 "https://www.loopnet.co.uk/search/commercial-property/london-england--united-kingdom/for-rent/2/",
21 "https://www.loopnet.co.uk/search/office-space/london-england--united-kingdom/for-rent/",
22 "https://www.loopnet.co.uk/search/commercial-property/united-kingdom/for-sale/",
23 "https://www.loopnet.co.uk/listing/10-prestons-rd-london/35346928/",
24 ],
25 "proxy": {
26 "useApifyProxy": True,
27 "apifyProxyGroups": ["RESIDENTIAL"],
28 },
29 "incrementalMode": False,
30 "emitUnchanged": False,
31 "emitExpired": False,
32 "ignoreFieldsForChanges": [],
33}
34
35
36run = client.actor("abotapi/loopnet-scraper").call(run_input=run_input)
37
38
39print(f"πΎ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
40for item in client.dataset(run.default_dataset_id).iterate_items():
41 print(item)
42
43