1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "sources": [
12 "ted",
13 "uk-fts"
14 ],
15 "keywords": [],
16 "cpvCodes": [],
17 "naicsCodes": [],
18 "buyerCountries": [],
19 "publishedSince": "3 days",
20 "onlyNew": false,
21 "watchKey": "",
22 "deadlineFrom": "",
23 "deadlineTo": "",
24 "activeOnly": true,
25 "noticeTypes": [],
26 "minValue": 0,
27 "valueCurrency": "",
28 "maxResultsPerSource": 25,
29 "fetchDetails": false
30};
31
32
33const run = await client.actor("chorelet/government-tenders-scraper").call(input);
34
35
36console.log('Results from dataset');
37console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
38const { items } = await client.dataset(run.defaultDatasetId).listItems();
39items.forEach((item) => {
40 console.dir(item);
41});
42
43