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 "we use 800 gallons of heating oil a year at $3.90/gal, what would a heat pump cost at 15 cents/kWh?",
13 "we spend $2,400 a year on propane at $2.90/gal, compare propane vs heat pump vs pellets",
14 "2,000 sq ft house in Ohio, natural gas $1.30/therm, electricity $0.16/kWh",
15 "1,100 therms of natural gas a year, 80% furnace",
16 "4 cords of oak a year, wood $280/cord, heat pump hspf 9",
17 "old 1,800 sq ft farmhouse in zone 6, heat pump install $14,000, currently heating with oil",
18 {
19 "loadMMBtu": 60,
20 "current": "electric resistance",
21 "prices": {
22 "electricity": 0.2
23 },
24 "fuels": [
25 "electric resistance",
26 "heat pump",
27 "propane"
28 ],
29 "only": true
30 }
31 ]
32};
33
34
35const run = await client.actor("jumblemog/heating-cost-calculator").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