1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "inputBusinesses": [
12 {
13 "businessName": "Cafe de Flore",
14 "category": "cafe",
15 "location": "Paris",
16 "website": "https://cafedeflore.fr/"
17 },
18 {
19 "businessName": "Austin Dental Spa",
20 "category": "dentist",
21 "location": "Austin",
22 "website": "https://www.austindentalspa.com/"
23 }
24 ],
25 "country": "Spain",
26 "locations": [
27 "Barcelona",
28 "Milan",
29 "Austin"
30 ],
31 "businessTypes": [
32 "restaurant",
33 "cafe",
34 "dentist",
35 "gym",
36 "lawyer",
37 "car_repair"
38 ],
39 "overpassEndpoints": [
40 "https://overpass-api.de/api/interpreter",
41 "https://overpass.kumi.systems/api/interpreter"
42 ]
43};
44
45
46const run = await client.actor("viable_guard/local-business-website-opportunity-scanner").call(input);
47
48
49console.log('Results from dataset');
50console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
51const { items } = await client.dataset(run.defaultDatasetId).listItems();
52items.forEach((item) => {
53 console.dir(item);
54});
55
56