1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "googleSheetId": "1jNh9tJyyc7k6jcihQ8BGCkpZOsDmyyrql9TN45vjebI",
12 "worksheetName": "Sheet1",
13 "companies": [
14 {
15 "company_name": "Test Financial Corp Ltd",
16 "symbol": "TESTFIN",
17 "exchange": "NSE",
18 "sector": "Financial Services",
19 "revenue": "1000 Cr",
20 "profit": "150 Cr",
21 "market_cap": "5000 Cr",
22 "pe_ratio": "15.5",
23 "debt_to_equity": "0.3",
24 "roe": "12.8",
25 "current_ratio": "1.2",
26 "dividend_yield": "2.5",
27 "_mock_data": true,
28 "_test_mode": true,
29 "_data_completeness": 100,
30 "_data_quality_score": 95,
31 "_extraction_timestamp": "2025-08-05T12:00:00.000Z"
32 }
33 ],
34 "startRow": 2,
35 "endRow": 2,
36 "batchSize": 1,
37 "batchIndex": 0,
38 "testMode": true,
39 "maxConcurrency": 1,
40 "waitForLoadMs": 500,
41 "urlDiscoveryTimeout": 3000,
42 "includeFinancialRatios": false,
43 "dataSource": "auto"
44};
45
46
47const run = await client.actor("shashghosh/comprehensive-financial-scraper").call(input);
48
49
50console.log('Results from dataset');
51console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
52const { items } = await client.dataset(run.defaultDatasetId).listItems();
53items.forEach((item) => {
54 console.dir(item);
55});
56
57