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 "categories": [
13 "restaurant"
14 ],
15 "locations": [
16 "wien"
17 ],
18 "urls": [
19 "https://www.herold.at/gelbe-seiten/wien/restaurant/",
20 "https://www.herold.at/gelbe-seiten/restaurant/",
21 "https://www.herold.at/gelbe-seiten/wien/restaurant/seite/2/",
22 "https://www.herold.at/gelbe-seiten/k%C3%A4rnten/restaurant/",
23 "https://www.herold.at/gelbe-seiten/wien/bierlokale-pubs/",
24 "https://www.herold.at/gelbe-seiten/wien/4F7QT/kfc/",
25 "https://www.herold.at/gelbe-seiten/firmen-az/a/"
26 ],
27 "proxy": {
28 "useApifyProxy": true,
29 "apifyProxyGroups": [
30 "RESIDENTIAL"
31 ],
32 "apifyProxyCountry": "AT"
33 },
34 "ignoreFieldsForChanges": []
35};
36
37
38const run = await client.actor("abotapi/herold-at-scraper").call(input);
39
40
41console.log('Results from dataset');
42console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48