1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrls": [
12 "https://www.properstar.co.uk/united-kingdom/london/buy/apartment-house",
13 "https://www.properstar.co.uk/united-kingdom/london/buy/apartment-house?p=2",
14 "https://www.properstar.co.uk/united-kingdom/london/rent/apartment-house",
15 "https://www.properstar.co.uk/united-kingdom/buy/apartment-house",
16 "https://www.properstar.co.uk/united-kingdom/london/buy/apartment-house?price=500000-1000000&bedrooms=2",
17 "https://www.properstar.co.uk/united-kingdom/london/buy/apartment-house?sort=price-asc",
18 "https://www.properstar.co.uk/united-kingdom/london/buy",
19 "https://www.properstar.co.uk/switzerland/buy/apartment-house",
20 "https://www.properstar.co.uk/listing/121377505",
21 "https://www.properstar.co.uk/agency/the-private-realtor-ltd/6482545"
22 ],
23 "proxy": {
24 "useApifyProxy": true,
25 "apifyProxyGroups": [
26 "RESIDENTIAL"
27 ]
28 },
29 "incrementalMode": false,
30 "emitUnchanged": false,
31 "emitExpired": false,
32 "ignoreFieldsForChanges": []
33};
34
35
36const run = await client.actor("abotapi/properstar-scraper").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46