1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "requests": [
12 "2,400 sq ft house, electric range 12 kW, dryer 5 kW, water heater 4.5 kW, dishwasher 1.2 kW, disposal 0.9 kW, microwave 1.5 kW, AC 30 A, electric furnace 10 kW",
13 "1,800 sq ft home with gas heat, AC 24 A, dishwasher, disposal, microwave, 200 A panel, can I add a 48 A EV charger",
14 "3,000 sq ft, heat pump 25 A with 10 kW heat strips, cooktop 7 kW, 2 wall ovens 4 kW each, dryer 5.5 kW, water heater 4500 W, 100 A service",
15 "1,200 sq ft cabin, 6 baseboard heaters 1.5 kW each, range 8 kW, water heater 4.5 kW, well pump 1 hp",
16 {
17 "area": 2000,
18 "appliances": [
19 "range 12 kW",
20 {
21 "name": "dryer",
22 "kw": 5
23 },
24 {
25 "name": "EV charger",
26 "amps": 40,
27 "new": true
28 }
29 ],
30 "existingService": 100
31 }
32 ]
33};
34
35
36const run = await client.actor("jumblemog/electrical-load-calculator").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46