1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "language": "pt-BR",
12 "currency": "BRL",
13 "products": [
14 {
15 "name": "Café especial 250 g",
16 "unitCost": 18,
17 "extraVariableCost": 2.5,
18 "monthlyVolume": 300
19 },
20 {
21 "name": "Kit presente",
22 "unitCost": 45,
23 "extraVariableCost": 6,
24 "monthlyVolume": 80
25 },
26 {
27 "name": "Workshop online (vaga)",
28 "unitCost": 12,
29 "monthlyVolume": 40
30 }
31 ],
32 "fixedExpenses": [
33 {
34 "name": "Aluguel",
35 "amount": 3500
36 },
37 {
38 "name": "Pró-labore",
39 "amount": 6000
40 },
41 {
42 "name": "Contabilidade",
43 "amount": 600
44 },
45 {
46 "name": "Software",
47 "amount": 250
48 }
49 ],
50 "taxRegime": "Simples Nacional",
51 "effectiveTaxRatePct": 6,
52 "cardFeePct": 3.5,
53 "variableExpensesPct": 5,
54 "desiredMarginPct": 20,
55 "openingCashBalance": 10000,
56 "monthlyRevenue": [
57 18000,
58 17500,
59 19000,
60 21000,
61 26000,
62 15000,
63 15500,
64 16000,
65 17000,
66 18500,
67 19000,
68 22000
69 ],
70 "monthlyExpenses": [
71 16500,
72 16500,
73 17000,
74 17500,
75 19500,
76 15500,
77 15500,
78 15800,
79 16200,
80 16800,
81 17000,
82 18500
83 ],
84 "startMonth": "2026-11"
85};
86
87
88const run = await client.actor("kman-br/pricing-cash-flow-calculator").call(input);
89
90
91console.log('Results from dataset');
92console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
93const { items } = await client.dataset(run.defaultDatasetId).listItems();
94items.forEach((item) => {
95 console.dir(item);
96});
97
98