1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "selectedArea": "amsterdam",
12 "selectedAreas": [],
13 "detailUrls": [],
14 "officeUrl": "",
15 "officeId": "",
16 "postalCode": "",
17 "maxResults": 3,
18 "channel": "koop",
19 "mapListingType": "koop",
20 "bbox": "",
21 "objectType": "",
22 "price": "",
23 "sort": "",
24 "constructionType": "",
25 "locale": "nl",
26 "maxPages": 1,
27 "enrichDetails": true,
28 "enrichMedia": false,
29 "enrichLead": true,
30 "fields": [],
31 "sitemapBuckets": [
32 "koop"
33 ],
34 "sitemapDetails": false,
35 "includeRaw": false,
36 "workerBaseUrl": ""
37};
38
39
40const run = await client.actor("lentic_clockss/funda-scraper").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50