1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "id": "lead-1",
14 "company": {
15 "name": "Acme",
16 "city": "Singapore"
17 },
18 "score": "9",
19 "active": true
20 },
21 {
22 "id": "lead-1",
23 "company": {
24 "name": "Acme",
25 "city": ""
26 },
27 "score": 9,
28 "active": true
29 },
30 {
31 "id": "lead-3",
32 "company": {
33 "name": "Beta"
34 },
35 "score": null
36 }
37 ]
38};
39
40
41const run = await client.actor("eager_vitamin/apify-dataset-quality-profiler").call(input);
42
43
44console.log('Results from dataset');
45console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
46const { items } = await client.dataset(run.defaultDatasetId).listItems();
47items.forEach((item) => {
48 console.dir(item);
49});
50
51