1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "pubKeyword": "cholera",
12 "watchKeywords": [
13 "outbreak",
14 "emergency",
15 "deaths"
16 ],
17 "indicators": [
18 "WHOSIS_000001",
19 "MORT_100"
20 ],
21 "countries": [
22 "IND",
23 "USA"
24 ],
25 "years": [],
26 "trialStatuses": [
27 "RECRUITING",
28 "ACTIVE_NOT_RECRUITING"
29 ],
30 "trialPhases": [
31 "PHASE2",
32 "PHASE3"
33 ],
34 "proxyConfiguration": {
35 "useApifyProxy": true
36 }
37};
38
39
40const run = await client.actor("agrawalheyramb/who-health-intelligence-scraper").call(input);
41
42
43console.log('Results from dataset');
44console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50