1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "searchQuery": "maschinenbau",
12 "searchQueries": [
13 "maschinenbau",
14 "cnc fertigung"
15 ],
16 "startUrls": [
17 {
18 "url": "https://www.wlw.de/de/suche?q=maschinenbau"
19 }
20 ],
21 "countryCode": "40",
22 "supplierType": "",
23 "maxResults": 20,
24 "maxPagesPerSearch": 1,
25 "maxRequestRetries": 3,
26 "proxyConfiguration": {
27 "useApifyProxy": true,
28 "apifyProxyGroups": [
29 "RESIDENTIAL"
30 ]
31 }
32};
33
34
35const run = await client.actor("automation-lab/wlw-de-supplier-directory-scraper").call(input);
36
37
38console.log('Results from dataset');
39console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45