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 "postalCode": "",
14 "channel": "koop",
15 "mapListingType": "koop",
16 "objectType": "",
17 "price": "",
18 "sort": "",
19 "constructionType": "",
20 "officeId": "",
21 "officeUrl": "",
22 "bbox": "",
23 "locale": "nl",
24 "maxResults": 3,
25 "maxPages": 1,
26 "detailUrls": [],
27 "enrichDetails": true,
28 "enrichMedia": false,
29 "enrichLead": true,
30 "sitemapBuckets": [
31 "koop"
32 ],
33 "includeRaw": false,
34 "sitemapDetails": false,
35 "fields": [],
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