1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "cities": [
13 "ncr"
14 ],
15 "urls": [
16 "https://www.zomato.com/ncr/delivery",
17 "https://www.zomato.com/ncr/dine-out",
18 "https://www.zomato.com/ncr/restaurants",
19 "https://www.zomato.com/ncr/restaurants/pizza",
20 "https://www.zomato.com/ncr/dine-out?dining_payment_enabled_flag=true",
21 "https://www.zomato.com/ncr/restaurants?q=pizza",
22 "https://www.zomato.com/mumbai",
23 "https://www.zomato.com/ncr/delivery/dish-biryani",
24 "https://www.zomato.com/ncr/delivery-in-connaught-place",
25 "https://www.zomato.com/dubai/delivery",
26 "https://www.zomato.com/ncr/kfc-connaught-place-new-delhi/order",
27 "https://www.zomato.com/ncr/kfc-connaught-place-new-delhi",
28 "https://www.zomato.com/ncr/kfc-connaught-place-new-delhi/reviews",
29 "https://www.zomato.com/ncr/kfc-connaught-place-new-delhi/info",
30 "https://www.zomato.com/ncr/kfc-connaught-place-new-delhi/menu",
31 "https://www.zomato.com/ncr/kfc-connaught-place-new-delhi/photos",
32 "https://m.zomato.com/ncr/kfc-connaught-place-new-delhi/order",
33 "https://zomato.com/ncr/delivery"
34 ],
35 "proxy": {
36 "useApifyProxy": true
37 },
38 "incrementalMode": false,
39 "emitUnchanged": false,
40 "emitExpired": false,
41 "ignoreFieldsForChanges": []
42};
43
44
45const run = await client.actor("abotapi/zomato-scraper").call(input);
46
47
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55