1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "epdRecords": [
12 {
13 "product_id": "concrete-a",
14 "declaration_id": "EPD-concrete-a",
15 "declared_unit": "kg",
16 "declared_quantity": 1,
17 "unit_type": "declared",
18 "indicator": "GWP-total",
19 "indicator_unit": "kg CO2 eq",
20 "indicator_version": "EF 3.1 February 2023",
21 "lifecycle_modules": [
22 "A1",
23 "A2",
24 "A3"
25 ],
26 "value": 12,
27 "standard_version": "EN 15804:2012+A2:2019/AC:2021",
28 "pcr_reference": "2019:14",
29 "pcr_version": "2.0.1",
30 "complementary_pcr": "none",
31 "valid_from": "2025-01-01",
32 "valid_until": "2030-01-01",
33 "equivalence_group": "concrete-C30",
34 "functional_specification": "C30 same service",
35 "scope": "cradle-to-gate",
36 "scenario": "reference scenario",
37 "geography": "EU",
38 "reference_service_life": "50 years",
39 "evidence_reference": "customer:row1"
40 },
41 {
42 "product_id": "concrete-b",
43 "declaration_id": "EPD-concrete-b",
44 "declared_unit": "kg",
45 "declared_quantity": 1,
46 "unit_type": "declared",
47 "indicator": "GWP-total",
48 "indicator_unit": "kg CO2 eq",
49 "indicator_version": "EF 3.1 February 2023",
50 "lifecycle_modules": [
51 "A1",
52 "A2",
53 "A3"
54 ],
55 "value": 9,
56 "standard_version": "EN 15804:2012+A2:2019/AC:2021",
57 "pcr_reference": "2019:14",
58 "pcr_version": "2.0.1",
59 "complementary_pcr": "none",
60 "valid_from": "2025-01-01",
61 "valid_until": "2030-01-01",
62 "equivalence_group": "concrete-C30",
63 "functional_specification": "C30 same service",
64 "scope": "cradle-to-gate",
65 "scenario": "reference scenario",
66 "geography": "EU",
67 "reference_service_life": "50 years",
68 "evidence_reference": "customer:row1"
69 },
70 {
71 "product_id": "expired-c",
72 "declaration_id": "EPD-expired-c",
73 "declared_unit": "kg",
74 "declared_quantity": 1,
75 "unit_type": "declared",
76 "indicator": "GWP-total",
77 "indicator_unit": "kg CO2 eq",
78 "indicator_version": "EF 3.1 February 2023",
79 "lifecycle_modules": [
80 "A1",
81 "A2",
82 "A3"
83 ],
84 "value": 10,
85 "standard_version": "EN 15804:2012+A2:2019/AC:2021",
86 "pcr_reference": "2019:14",
87 "pcr_version": "2.0.1",
88 "complementary_pcr": "none",
89 "valid_from": "2025-01-01",
90 "valid_until": "2026-01-01",
91 "equivalence_group": "concrete-C30",
92 "functional_specification": "C30 same service",
93 "scope": "cradle-to-gate",
94 "scenario": "reference scenario",
95 "geography": "EU",
96 "reference_service_life": "50 years",
97 "evidence_reference": "customer:row1"
98 },
99 {
100 "product_id": "different-pcr",
101 "declaration_id": "EPD-different-pcr",
102 "declared_unit": "kg",
103 "declared_quantity": 1,
104 "unit_type": "declared",
105 "indicator": "GWP-total",
106 "indicator_unit": "kg CO2 eq",
107 "indicator_version": "EF 3.1 February 2023",
108 "lifecycle_modules": [
109 "A1",
110 "A2",
111 "A3"
112 ],
113 "value": 10,
114 "standard_version": "EN 15804:2012+A2:2019/AC:2021",
115 "pcr_reference": "2019:14",
116 "pcr_version": "1.3.4",
117 "complementary_pcr": "none",
118 "valid_from": "2025-01-01",
119 "valid_until": "2030-01-01",
120 "equivalence_group": "concrete-C30",
121 "functional_specification": "C30 same service",
122 "scope": "cradle-to-gate",
123 "scenario": "reference scenario",
124 "geography": "EU",
125 "reference_service_life": "50 years",
126 "evidence_reference": "customer:row1"
127 },
128 {
129 "product_id": "needs-density",
130 "declaration_id": "EPD-needs-density",
131 "declared_unit": "m3",
132 "declared_quantity": 1,
133 "unit_type": "declared",
134 "indicator": "GWP-total",
135 "indicator_unit": "kg CO2 eq",
136 "indicator_version": "EF 3.1 February 2023",
137 "lifecycle_modules": [
138 "A1",
139 "A2",
140 "A3"
141 ],
142 "value": 10,
143 "standard_version": "EN 15804:2012+A2:2019/AC:2021",
144 "pcr_reference": "2019:14",
145 "pcr_version": "2.0.1",
146 "complementary_pcr": "none",
147 "valid_from": "2025-01-01",
148 "valid_until": "2030-01-01",
149 "equivalence_group": "concrete-C30",
150 "functional_specification": "C30 same service",
151 "scope": "cradle-to-gate",
152 "scenario": "reference scenario",
153 "geography": "EU",
154 "reference_service_life": "50 years",
155 "evidence_reference": "customer:row1"
156 },
157 {
158 "product_id": "steel",
159 "declaration_id": "EPD-steel",
160 "declared_unit": "kg",
161 "declared_quantity": 1,
162 "unit_type": "declared",
163 "indicator": "GWP-total",
164 "indicator_unit": "kg CO2 eq",
165 "indicator_version": "EF 3.1 February 2023",
166 "lifecycle_modules": [
167 "A1",
168 "A2",
169 "A3"
170 ],
171 "value": 10,
172 "standard_version": "EN 15804:2012+A2:2019/AC:2021",
173 "pcr_reference": "2019:14",
174 "pcr_version": "2.0.1",
175 "complementary_pcr": "none",
176 "valid_from": "2025-01-01",
177 "valid_until": "2030-01-01",
178 "equivalence_group": "steel",
179 "functional_specification": "C30 same service",
180 "scope": "cradle-to-gate",
181 "scenario": "reference scenario",
182 "geography": "EU",
183 "reference_service_life": "50 years",
184 "evidence_reference": "customer:row1"
185 }
186 ]
187};
188
189
190const run = await client.actor("afkdigital/building-product-epd-comparison").call(input);
191
192
193console.log('Results from dataset');
194console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
195const { items } = await client.dataset(run.defaultDatasetId).listItems();
196items.forEach((item) => {
197 console.dir(item);
198});
199
200