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 "well pump for a 3 bathroom house, static water level 80 ft, 200 ft well, house 30 ft above the well, 150 ft from the well",
13 "submersible pump set at 300 ft, 2 bathrooms, 1-1/4 inch pipe",
14 "well yields 4 gpm, 2.5 baths, water level 120 ft, 250 ft deep well, irrigation 6 gpm",
15 "shallow well jet pump, water level 18 ft, 1 bath, 30/50 psi",
16 "pressure tank for a 10 gpm pump, 40/60 switch",
17 "20 gallon tank with a 12 gpm 1.5 hp pump, 30/50 pressure switch",
18 {
19 "bathrooms": 4,
20 "staticLevel": 150,
21 "drawdown": 40,
22 "elevation": -10,
23 "run": 400,
24 "switch": "50/70",
25 "hp": 1
26 }
27 ]
28};
29
30
31const run = await client.actor("jumblemog/well-pump-calculator").call(input);
32
33
34console.log('Results from dataset');
35console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38 console.dir(item);
39});
40
41