1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "urls": [
12 {
13 "url": "https://www.rightmove.co.uk/commercial-property-to-let/find.html?locationIdentifier=REGION%5E87490&radius=0.0&rent.x=RENT&search=To+Rent&index=0&sortType=13&priceType=pcm&channel=COMMERCIAL_RENT&transactionType=LETTING&displayLocationIdentifier=London-87490.html&minPrice=17500&maxPrice=20000&areaSizeUnit=sqm&minSize=500&maxSize=7500&propertyTypes=business-park%2Ccommercial-property%2Cresidential-development%2Cstorage%2Ctakeaway%2Cretail_property_shopping_centre_%2Cretail_property_retail_park_%2Cretail_property_high_street_%2Cretail_property_out_of_town_%2Cretail_property_pop_up_%2Cconvenience-store%2Cgarage%2Chairdresser-barber-shop%2Cpost-office%2Cshop%2Cworkshop"
14 }
15 ],
16 "maxListings": 100
17};
18
19
20const run = await client.actor("rigelbytes/rightmove-scraper").call(input);
21
22
23console.log('Results from dataset');
24console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
25const { items } = await client.dataset(run.defaultDatasetId).listItems();
26items.forEach((item) => {
27 console.dir(item);
28});
29
30