1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "locations": [
12 {
13 "country": "egypt",
14 "area": "Maadi, Cairo"
15 },
16 {
17 "country": "uae",
18 "area": "Downtown Dubai"
19 }
20 ],
21 "basketItems": [
22 "rice",
23 "sunflower oil",
24 "sugar",
25 "eggs",
26 "milk",
27 "chicken breast",
28 "bread",
29 "tea",
30 "tomatoes",
31 "bananas"
32 ],
33 "proxyConfiguration": {
34 "useApifyProxy": false
35 }
36};
37
38
39const run = await client.actor("hebaabdalaziz/talabat-mart-grocery-price-index").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