1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "schemaVersion": "1.1",
12 "thresholds": {
13 "acceptThreshold": 80,
14 "reviewThreshold": 50,
15 "thresholdOrder": "accept_gt_review"
16 },
17 "rows": [
18 {
19 "signalId": "signal-001",
20 "normalizedSignal": 96
21 },
22 {
23 "signalId": "signal-002",
24 "normalizedSignal": 82
25 },
26 {
27 "signalId": "signal-003",
28 "normalizedSignal": 61
29 },
30 {
31 "signalId": "signal-004",
32 "normalizedSignal": 39
33 }
34 ]
35};
36
37
38const run = await client.actor("zinin/us-brand-signal-confidence-gate").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