1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrl": "https://www.realtor.ca/map#ZoomLevel=4&Center=49.864363%2C-84.749636&LatitudeMax=60.60705&LongitudeMax=-33.33362&LatitudeMin=36.06441&LongitudeMin=-136.16565&view=list&Sort=6-D&PropertyTypeGroupID=1&TransactionTypeId=2&PropertySearchTypeId=0&Currency=CAD"
12};
13
14
15const run = await client.actor("shahidirfan/realtor-ca-property-scraper").call(input);
16
17
18console.log('Results from dataset');
19console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
20const { items } = await client.dataset(run.defaultDatasetId).listItems();
21items.forEach((item) => {
22 console.dir(item);
23});
24
25