1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "keyword": "",
12 "keywords": [],
13 "agencies": [],
14 "fundingCategories": [],
15 "eligibilities": [],
16 "fundingInstruments": [],
17 "cfda": "",
18 "opportunityNumber": "",
19 "oppStatuses": [
20 "posted",
21 "forecasted"
22 ],
23 "sortBy": "openDate|desc",
24 "pageSize": 100,
25 "maxResults": 10,
26 "emitAll": true
27};
28
29
30const run = await client.actor("socosupply/grants-watch").call(input);
31
32
33console.log('Results from dataset');
34console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
35const { items } = await client.dataset(run.defaultDatasetId).listItems();
36items.forEach((item) => {
37 console.dir(item);
38});
39
40