1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "searchType": "auto",
12 "region": "montreal",
13 "market": "ca",
14 "maxResults": 1,
15 "startPage": 1,
16 "pageSize": 20,
17 "startOffset": 0,
18 "maxRequests": 3000,
19 "includeReviews": false,
20 "includeStats": false,
21 "maxReviews": 20,
22 "maxGallery": 100,
23 "enrichDetails": true,
24 "allRegions": false,
25 "includeInactive": false,
26 "featuredOnly": false,
27 "seasonalOnly": false,
28 "filterProsByRegion": false,
29 "includeGallery": false,
30 "maxPages": 1
31};
32
33
34const run = await client.actor("lentic_clockss/jiffy-ondemand-scraper").call(input);
35
36
37console.log('Results from dataset');
38console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44