1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "auto",
12 "country": "uae",
13 "areaId": "1174",
14 "areaSlug": "al-barsha-1",
15 "maxResults": 3,
16 "enrichDetails": false,
17 "vertical": "restaurants",
18 "groceryOnly": false,
19 "includeMenuItems": false,
20 "includeChoices": true,
21 "includePromotions": false,
22 "includePaymentMethods": false,
23 "includeReviews": false,
24 "maxReviewsPerRestaurant": 20,
25 "maxChoicesPerRestaurant": 0,
26 "fetchChannel": "auto",
27 "menuFetch": "app_api",
28 "enrichMenus": false,
29 "maxEnrich": 5,
30 "maxMenuItemsPerRestaurant": 20,
31 "fetchAllPages": false,
32 "maxPages": 3,
33 "page": 1
34};
35
36
37const run = await client.actor("lentic_clockss/talabat-scraper").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47