1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "enableSearch": true,
12 "searchTasks": [
13 {
14 "keyword": "sushi",
15 "location": "New York, NY",
16 "maxItems": 10
17 },
18 {
19 "keyword": "italian",
20 "location": "Chicago, IL",
21 "maxItems": 10
22 }
23 ],
24 "maxDepthPerTask": 20,
25 "enrichContacts": false,
26 "maxItems": 1000,
27 "proxyConfiguration": {
28 "useApifyProxy": true,
29 "apifyProxyGroups": [
30 "RESIDENTIAL"
31 ]
32 }
33};
34
35
36const run = await client.actor("b2b_leads/opentable-real-time-data").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46