1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "rows": [
12 {
13 "ip": "66.249.66.1",
14 "userAgent": "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
15 },
16 {
17 "ip": "203.0.113.50",
18 "userAgent": "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
19 },
20 {
21 "ip": "157.55.39.1",
22 "userAgent": "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
23 },
24 {
25 "ip": "198.51.100.7",
26 "userAgent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)"
27 },
28 {
29 "ip": "192.0.2.44",
30 "userAgent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
31 },
32 {
33 "ip": "198.51.100.99",
34 "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/126.0 Safari/537.36"
35 }
36 ],
37 "logLines": "",
38 "logFileUrl": "",
39 "aggregateByIp": true,
40 "onlyClaimedBots": false,
41 "maxUniqueRows": 2000
42};
43
44
45const run = await client.actor("that_red_bird/verify-bot-ips").call(input);
46
47
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55