1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "sourceMode": "sample",
12 "mode": "demo",
13 "startUrls": [
14 {
15 "url": "https://transparenz.hamburg.de/",
16 "sourceId": "HAMBURG-TRANS",
17 "userData": {
18 "sourceId": "HAMBURG-TRANS"
19 }
20 },
21 {
22 "url": "https://geoportal-hamburg.de/planportal/",
23 "sourceId": "HAMBURG-PLAN",
24 "userData": {
25 "sourceId": "HAMBURG-PLAN"
26 }
27 },
28 {
29 "url": "https://www.govdata.de/",
30 "sourceId": "GOVDATA-DE",
31 "userData": {
32 "sourceId": "GOVDATA-DE"
33 }
34 }
35 ],
36 "maxItems": 25,
37 "outputMode": "sample-records"
38};
39
40
41const run = await client.actor("zentrafoundry/municipal-planning-applications-monitor-sh-hh-ni").call(input);
42
43
44console.log('Results from dataset');
45console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
46const { items } = await client.dataset(run.defaultDatasetId).listItems();
47items.forEach((item) => {
48 console.dir(item);
49});
50
51