1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "domains": [
12 "apify.com",
13 "wikipedia.org",
14 "github.com",
15 "python.org",
16 "nodejs.org"
17 ],
18 "recordTypes": [
19 "A",
20 "AAAA",
21 "MX",
22 "TXT",
23 "NS",
24 "CNAME",
25 "SOA",
26 "CAA"
27 ],
28 "emailAuth": false,
29 "rowPerRecord": false,
30 "resolver": "cloudflare",
31 "maxItems": 100
32};
33
34
35const run = await client.actor("one_dollar_store/dns-records-lookup").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45