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 "new lawn 5,000 sq ft, tall fescue, seed or sod?",
13 "overseed 1/4 acre of kentucky bluegrass",
14 "how much 32-0-4 fertilizer for 8,000 sq ft at 1 lb nitrogen, 15 lb bags",
15 "soil ph 5.6 on 6,000 sq ft clay lawn, target 6.5",
16 "sod for a 50 x 80 ft backyard minus a 400 sq ft patio, bermuda, $0.38/sq ft",
17 "1/4 inch of compost topdressing on 3,000 sq ft and how much water a week",
18 {
19 "area": 10000,
20 "grass": "zoysia",
21 "jobs": [
22 "sod",
23 "fertilizer"
24 ],
25 "npk": [
26 16,
27 4,
28 8
29 ],
30 "ph": 7.8,
31 "soil": "sand"
32 }
33 ]
34};
35
36
37const run = await client.actor("jumblemog/lawn-calculator").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47