1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "currentItems": [
12 {
13 "domain": "acme-support.example",
14 "brand": "Acme",
15 "tld": "example",
16 "similarityScore": 92,
17 "dnsState": "active MX"
18 },
19 {
20 "domain": "getacme.example",
21 "brand": "Acme",
22 "tld": "example",
23 "similarityScore": 83,
24 "dnsState": "active"
25 }
26 ],
27 "previousItems": [
28 {
29 "domain": "getacme.example",
30 "brand": "Acme",
31 "tld": "example",
32 "similarityScore": 72,
33 "dnsState": "parked"
34 }
35 ]
36};
37
38
39const run = await client.actor("quanmatrix/domain-brand-infringement-intelligence").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49