1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "listings": [
12 {
13 "id": "EXAMPLE-BERLIN",
14 "country": "DE",
15 "title": "Example 3-room flat in Berlin",
16 "description": "Bright 3-room flat, 78 m², balcony. Baujahr 1978. Energieausweis liegt vor."
17 },
18 {
19 "id": "EXAMPLE-HAMBURG",
20 "country": "DE",
21 "title": "Example 2-room flat in Hamburg",
22 "description": "Energieausweis: Verbrauchsausweis, Endenergieverbrauch 112,5 kWh/(m²·a), wesentlicher Energieträger Fernwärme, Baujahr laut Energieausweis 1965, Energieeffizienzklasse D."
23 },
24 {
25 "id": "EXAMPLE-LYON",
26 "country": "FR",
27 "title": "Example 2-room flat in Lyon",
28 "description": "Appartement 2 pièces, 45 m². DPE : F."
29 },
30 {
31 "id": "EXAMPLE-MILANO",
32 "country": "IT",
33 "title": "Example 3-room flat in Milan",
34 "description": "Trilocale luminoso, 85 m², secondo piano con ascensore."
35 }
36 ]
37};
38
39
40const run = await client.actor("ultimatemc/property-energy-certificate-checker").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50