1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "companies": [
12 {
13 "id": "microsoft",
14 "name": "Microsoft",
15 "criticality": "high",
16 "owner": "ESG Program Office",
17 "peerGroup": "mega-cap-software",
18 "tags": [
19 "software",
20 "scope-3",
21 "climate"
22 ],
23 "disclosurePacks": {
24 "sustainability": [
25 {
26 "id": "msft-sustainability-report",
27 "name": "Microsoft Sustainability Report",
28 "url": "https://www.microsoft.com/en-us/corporate-responsibility/sustainability/report",
29 "includePatterns": [
30 "sustainability report",
31 "annual report",
32 "scope 1",
33 "scope 2",
34 "scope 3",
35 "net zero"
36 ],
37 "staleAfterDays": 430
38 }
39 ],
40 "sec_filings": [
41 {
42 "id": "msft-sec-10k",
43 "name": "Microsoft SEC climate watch",
44 "sourceType": "sec_edgar",
45 "cik": "789019",
46 "formTypes": [
47 "10-K",
48 "10-Q",
49 "8-K"
50 ],
51 "staleAfterDays": 430
52 }
53 ]
54 }
55 }
56 ]
57};
58
59
60const run = await client.actor("taroyamada/esg-disclosure-tracker").call(input);
61
62
63console.log('Results from dataset');
64console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
65const { items } = await client.dataset(run.defaultDatasetId).listItems();
66items.forEach((item) => {
67 console.dir(item);
68});
69
70