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