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