1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "financials": {
12 "company": "Example Technology Inc.",
13 "period": "Last 12 months - end of June 2026",
14 "currency": "USD",
15 "sectorProfile": "saas",
16 "incomeStatement": {
17 "netSales": 24500000,
18 "costOfSales": 13200000,
19 "operatingExpenses": 8100000,
20 "depreciation": 600000,
21 "ebitda": null,
22 "interestExpense": 900000,
23 "netProfit": 1100000
24 },
25 "balanceSheet": {
26 "cashAndEquivalents": 2400000,
27 "tradeReceivables": 4900000,
28 "inventory": 1800000,
29 "totalCurrentAssets": 9800000,
30 "currentLiabilities": 7300000,
31 "tradePayables": 3100000,
32 "totalFinancialDebt": 5200000,
33 "equity": 6100000
34 },
35 "monthlyRevenue": [
36 1650000,
37 1700000,
38 1780000,
39 1820000,
40 1900000,
41 1950000,
42 2050000,
43 2100000,
44 2200000,
45 2280000,
46 2350000,
47 2450000
48 ],
49 "annualInflationRate": 3,
50 "customer": {
51 "largestCustomerShare": 22,
52 "annualChurnRate": 12,
53 "churnNotApplicable": false
54 }
55 }
56};
57
58
59const run = await client.actor("bloom-consulting/financial-health-score").call(input);
60
61
62console.log('Results from dataset');
63console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
64const { items } = await client.dataset(run.defaultDatasetId).listItems();
65items.forEach((item) => {
66 console.dir(item);
67});
68
69