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": "8.8.8.8",
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": "132.196.86.10",
26 "userAgent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)"
27 },
28 {
29 "ip": "1.1.1.1",
30 "userAgent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)"
31 },
32 {
33 "ip": "216.73.216.10",
34 "userAgent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
35 },
36 {
37 "ip": "198.51.100.99",
38 "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/126.0 Safari/537.36"
39 }
40 ],
41 "logLines": "",
42 "logFileUrl": "",
43 "aggregateByIp": true,
44 "maxUniqueRows": 2000
45};
46
47
48const run = await client.actor("that_red_bird/verify-bot-ips").call(input);
49
50
51console.log('Results from dataset');
52console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
53const { items } = await client.dataset(run.defaultDatasetId).listItems();
54items.forEach((item) => {
55 console.dir(item);
56});
57
58