1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "watches": [
12 {
13 "id": "acetaminophen-labels",
14 "drugNames": [
15 "acetaminophen"
16 ],
17 "publishedDateFrom": "2024-01-01",
18 "publishedDateComparison": "gte"
19 },
20 {
21 "id": "example-setid",
22 "setIds": [
23 "1efe378e-fee1-4ae9-8ea5-0fe2265fe2d8"
24 ]
25 },
26 {
27 "id": "example-labeler",
28 "labelers": [
29 "Example Labeler"
30 ],
31 "publishedDateFrom": "2025-01-01",
32 "publishedDateComparison": "gte"
33 }
34 ]
35};
36
37
38const run = await client.actor("taroyamada/dailymed-label-change-watch-report").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48