1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "demo",
12 "sourceMode": "sample",
13 "startUrls": [
14 {
15 "url": "https://docs.ted.europa.eu/api/latest/index.html",
16 "sourceId": "TED-API",
17 "userData": {
18 "sourceId": "TED-API"
19 }
20 },
21 {
22 "url": "https://docs.ted.europa.eu/eforms/latest/reference/code-lists/index.html",
23 "sourceId": "TED-EFORMS",
24 "userData": {
25 "sourceId": "TED-EFORMS"
26 }
27 }
28 ],
29 "lookbackDays": 3650,
30 "includeRaw": false,
31 "emitDiagnostics": true,
32 "outputMode": "sample-records"
33};
34
35
36const run = await client.actor("zentrafoundry/tender-language-normalizer").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46