1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "locations": [
12 "London"
13 ],
14 "startUrls": [
15 {
16 "url": "https://www.rightmove.co.uk/property-for-sale/find.html?locationIdentifier=REGION%5E87490"
17 },
18 {
19 "url": "https://www.rightmove.co.uk/property-to-rent/find.html?locationIdentifier=REGION%5E87490"
20 },
21 {
22 "url": "https://www.rightmove.co.uk/property-for-sale/find.html?locationIdentifier=REGION%5E87490&index=24"
23 },
24 {
25 "url": "https://www.rightmove.co.uk/property-for-sale/find.html?locationIdentifier=REGION%5E87490&minPrice=300000&maxPrice=500000&minBedrooms=2&sortType=6&propertyTypes=flat&includeSSTC=false"
26 },
27 {
28 "url": "https://www.rightmove.co.uk/properties/94114530"
29 },
30 {
31 "url": "https://www.rightmove.co.uk/property-for-sale/property-155320229.html"
32 },
33 {
34 "url": "https://www.rightmove.co.uk/property-to-rent/property-108124898.html"
35 },
36 {
37 "url": "https://www.rightmove.co.uk/property-for-sale/Wimbledon.html"
38 },
39 {
40 "url": "https://www.rightmove.co.uk/house-prices/london.html"
41 },
42 {
43 "url": "https://www.rightmove.co.uk/house-prices/SW19.html"
44 },
45 {
46 "url": "https://www.rightmove.co.uk/house-prices/detail.html?country=england&locationIdentifier=REGION%5E87490&searchLocation=London"
47 },
48 {
49 "url": "https://www.rightmove.co.uk/house-prices/details/2f92dc36-9eea-49a6-9143-aedb0ba11b30"
50 },
51 {
52 "url": "https://www.rightmove.co.uk/new-homes-for-sale/find.html?locationIdentifier=REGION%5E87490"
53 }
54 ],
55 "proxyConfiguration": {
56 "useApifyProxy": true
57 },
58 "ignoreFieldsForChanges": []
59};
60
61
62const run = await client.actor("abotapi/rightmove-scraper").call(input);
63
64
65console.log('Results from dataset');
66console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
67const { items } = await client.dataset(run.defaultDatasetId).listItems();
68items.forEach((item) => {
69 console.dir(item);
70});
71
72