1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "keywords": [
12 "cybersecurity",
13 "AI",
14 "cloud computing"
15 ],
16 "sources": [
17 "sam",
18 "grants"
19 ],
20 "samApiKey": "",
21 "maxResults": 20,
22 "filterBy": {
23 "agency": "",
24 "minValue": 0,
25 "postedWithinDays": 0
26 },
27 "webhookUrl": ""
28};
29
30
31const run = await client.actor("second_coming/gov-contract-monitor").call(input);
32
33
34console.log('Results from dataset');
35console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38 console.dir(item);
39});
40
41