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://docs.ted.europa.eu/api/latest/search.html",
14 "sourceId": "TED-SEARCH",
15 "userData": {
16 "sourceId": "TED-SEARCH"
17 }
18 },
19 {
20 "url": "https://docs.ted.europa.eu/api/latest/index.html",
21 "sourceId": "TED-API",
22 "userData": {
23 "sourceId": "TED-API"
24 }
25 },
26 {
27 "url": "https://ted.europa.eu/en/simap/developers-corner-for-reusers",
28 "sourceId": "TED-DEV",
29 "userData": {
30 "sourceId": "TED-DEV"
31 }
32 }
33 ]
34};
35
36
37const run = await client.actor("zentrafoundry/eu-solar-tender-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