1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "searchType": "privacy",
12 "findDesc": "",
13 "findLoc": "",
14 "cflt": "",
15 "sortBy": "recommended",
16 "start": 0,
17 "bizSlug": "",
18 "market": "us",
19 "enrichDetails": true,
20 "includeReviews": false,
21 "reviewTerm": "",
22 "reviewLimit": 20,
23 "reviewOffset": 0,
24 "includePhotos": false,
25 "photoLimit": 10,
26 "registerDevice": false,
27 "includePresentation": false,
28 "phoneNumber": "",
29 "phoneCountry": "US",
30 "communityQuestionsFirst": 5,
31 "maxResults": 3,
32 "maxPages": 1,
33 "startUrls": [],
34 "workerBaseUrl": "",
35 "provider": "app_api"
36};
37
38
39const run = await client.actor("lentic_clockss/yelp-scraper").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49