1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "url": "https://www.example.dk",
12 "urls": [
13 {
14 "url": "https://www.salon39.dk",
15 "businessName": "Salon39 sample",
16 "businessCategory": "Frisør"
17 },
18 {
19 "url": "https://www.tandcity.dk",
20 "businessName": "TandCity sample",
21 "businessCategory": "Tandlæge"
22 },
23 {
24 "url": "https://www.restaurantkronborg.dk",
25 "businessName": "Restaurant Kronborg sample",
26 "businessCategory": "Restaurant"
27 }
28 ],
29 "businessName": "Example ApS",
30 "businessCategory": "Lokal servicevirksomhed"
31};
32
33
34const run = await client.actor("pixelforge_agency/danish-smb-lead-flow-auditor").call(input);
35
36
37console.log('Results from dataset');
38console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44