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