1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "checks": [
12 {
13 "domain": "one.one.one.one",
14 "record_type": "A",
15 "expected": [
16 "1.0.0.1",
17 "1.1.1.1"
18 ]
19 },
20 {
21 "domain": "dns.google",
22 "record_type": "A",
23 "expected": [
24 "8.8.4.4",
25 "8.8.8.8"
26 ]
27 },
28 {
29 "domain": "dns.google",
30 "record_type": "AAAA",
31 "expected": [
32 "2001:4860:4860::8844",
33 "2001:4860:4860::8888"
34 ]
35 }
36 ],
37 "resolvers": [
38 "https://cloudflare-dns.com/dns-query",
39 "https://dns.google/dns-query",
40 "https://dns.quad9.net/dns-query",
41 "https://unfiltered.adguard-dns.com/dns-query",
42 "https://doh.opendns.com/dns-query",
43 "https://dns.mullvad.net/dns-query",
44 "https://doh.sb/dns-query",
45 "https://dns.nextdns.io/dns-query"
46 ],
47 "pollIntervalSeconds": 60,
48 "maxWaitMinutes": 30,
49 "requireAllResolvers": true,
50 "webhookUrl": "",
51 "timeoutSeconds": 10
52};
53
54
55const run = await client.actor("kingii98/dns-cutover-convergence-gate-with-webhook-receipt").call(input);
56
57
58console.log('Results from dataset');
59console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
60const { items } = await client.dataset(run.defaultDatasetId).listItems();
61items.forEach((item) => {
62 console.dir(item);
63});
64
65