@agentstats/sdk 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/bots.cjs +1022 -0
- package/dist/bots.d.cts +265 -0
- package/dist/bots.d.ts +265 -0
- package/dist/bots.js +1010 -0
- package/dist/browser.iife.js +1 -1
- package/dist/index.cjs +3 -6
- package/dist/index.d.cts +1 -5
- package/dist/index.d.ts +1 -5
- package/dist/index.js +3 -6
- package/dist/lite.iife.js +1 -1
- package/dist/server.cjs +293 -204
- package/dist/server.d.cts +76 -18
- package/dist/server.d.ts +76 -18
- package/dist/server.js +293 -204
- package/package.json +21 -12
package/dist/bots.js
ADDED
|
@@ -0,0 +1,1010 @@
|
|
|
1
|
+
// src/bots.curated.ts
|
|
2
|
+
const CURATED = [
|
|
3
|
+
{
|
|
4
|
+
id: "chatgpt-agent",
|
|
5
|
+
name: "ChatGPT agent",
|
|
6
|
+
product: "chatgpt",
|
|
7
|
+
category: "agent",
|
|
8
|
+
pattern: /ChatGPT[- ]Agent/i
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: "chatgpt-user",
|
|
12
|
+
name: "ChatGPT-User",
|
|
13
|
+
product: "chatgpt",
|
|
14
|
+
category: "assistant",
|
|
15
|
+
pattern: /ChatGPT-User/i
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "oai-searchbot",
|
|
19
|
+
name: "OAI-SearchBot",
|
|
20
|
+
product: "chatgpt",
|
|
21
|
+
category: "search",
|
|
22
|
+
pattern: /OAI-SearchBot/i
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "gptbot",
|
|
26
|
+
name: "GPTBot",
|
|
27
|
+
product: "chatgpt",
|
|
28
|
+
category: "training",
|
|
29
|
+
pattern: /GPTBot/i
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "oai-adsbot",
|
|
33
|
+
name: "OAI-AdsBot",
|
|
34
|
+
product: "chatgpt",
|
|
35
|
+
category: "other",
|
|
36
|
+
pattern: /OAI-AdsBot/i
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "claude-code",
|
|
40
|
+
name: "Claude Code",
|
|
41
|
+
product: "claude",
|
|
42
|
+
category: "assistant",
|
|
43
|
+
pattern: /claude-code/i
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "claude-user",
|
|
47
|
+
name: "Claude-User",
|
|
48
|
+
product: "claude",
|
|
49
|
+
category: "assistant",
|
|
50
|
+
pattern: /Claude-User/i
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "claude-searchbot",
|
|
54
|
+
name: "Claude-SearchBot",
|
|
55
|
+
product: "claude",
|
|
56
|
+
category: "search",
|
|
57
|
+
pattern: /Claude-SearchBot/i
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "claudebot",
|
|
61
|
+
name: "ClaudeBot",
|
|
62
|
+
product: "claude",
|
|
63
|
+
category: "training",
|
|
64
|
+
pattern: /ClaudeBot|Claude-Web|anthropic-ai/i
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: "perplexity-user",
|
|
68
|
+
name: "Perplexity-User",
|
|
69
|
+
product: "perplexity",
|
|
70
|
+
category: "assistant",
|
|
71
|
+
pattern: /Perplexity-?User/i
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: "perplexitybot",
|
|
75
|
+
name: "PerplexityBot",
|
|
76
|
+
product: "perplexity",
|
|
77
|
+
category: "search",
|
|
78
|
+
pattern: /PerplexityBot/i
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "google-agent",
|
|
82
|
+
name: "Google-Agent",
|
|
83
|
+
product: "gemini",
|
|
84
|
+
category: "agent",
|
|
85
|
+
pattern: /Google-Agent\b/i
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "googleagent-mariner",
|
|
89
|
+
name: "Project Mariner",
|
|
90
|
+
product: "gemini",
|
|
91
|
+
category: "agent",
|
|
92
|
+
pattern: /GoogleAgent-Mariner/i
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: "googleagent-urlcontext",
|
|
96
|
+
name: "Gemini URL context",
|
|
97
|
+
product: "gemini",
|
|
98
|
+
category: "assistant",
|
|
99
|
+
pattern: /GoogleAgent-URLContext/i
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: "gemini-deep-research",
|
|
103
|
+
name: "Gemini Deep Research",
|
|
104
|
+
product: "gemini",
|
|
105
|
+
category: "assistant",
|
|
106
|
+
pattern: /Gemini-Deep-Research/i
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: "google-gemininotebook",
|
|
110
|
+
name: "Gemini Notebook",
|
|
111
|
+
product: "gemini",
|
|
112
|
+
category: "assistant",
|
|
113
|
+
pattern: /Google-GeminiNotebook|Google-NotebookLM|NotebookLM/i
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "gemini-cli",
|
|
117
|
+
name: "Gemini CLI",
|
|
118
|
+
product: "gemini",
|
|
119
|
+
category: "assistant",
|
|
120
|
+
pattern: /Gemini-?CLI/i
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "google-cloudvertexbot",
|
|
124
|
+
name: "Google-CloudVertexBot",
|
|
125
|
+
product: "gemini",
|
|
126
|
+
category: "search",
|
|
127
|
+
pattern: /Google-CloudVertexBot/i
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: "google-read-aloud",
|
|
131
|
+
name: "Google Read Aloud",
|
|
132
|
+
product: "google",
|
|
133
|
+
category: "other",
|
|
134
|
+
pattern: /Google-Read-Aloud/i
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "google-ads",
|
|
138
|
+
name: "Google Ads crawlers",
|
|
139
|
+
product: "google",
|
|
140
|
+
category: "other",
|
|
141
|
+
pattern: /AdsBot-Google|Mediapartners-Google|APIs-Google/i
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
id: "googleother",
|
|
145
|
+
name: "GoogleOther",
|
|
146
|
+
product: "google",
|
|
147
|
+
category: "other",
|
|
148
|
+
pattern: /GoogleOther|Google-InspectionTool|Storebot-Google/i
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: "googlebot",
|
|
152
|
+
name: "Googlebot",
|
|
153
|
+
product: "google",
|
|
154
|
+
category: "search_engine",
|
|
155
|
+
pattern: /Googlebot/i
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: "azureai-searchbot",
|
|
159
|
+
name: "AzureAI-SearchBot",
|
|
160
|
+
product: "copilot",
|
|
161
|
+
category: "search",
|
|
162
|
+
pattern: /AzureAI-SearchBot/i
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: "bingbot",
|
|
166
|
+
name: "Bingbot",
|
|
167
|
+
product: "copilot",
|
|
168
|
+
category: "search_engine",
|
|
169
|
+
pattern: /bingbot|BingPreview|msnbot/i
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
id: "meta-externalfetcher",
|
|
173
|
+
name: "Meta-ExternalFetcher",
|
|
174
|
+
product: "meta",
|
|
175
|
+
category: "assistant",
|
|
176
|
+
pattern: /meta-externalfetcher/i
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: "meta-webindexer",
|
|
180
|
+
name: "Meta-WebIndexer",
|
|
181
|
+
product: "meta",
|
|
182
|
+
category: "search",
|
|
183
|
+
pattern: /meta-webindexer/i
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: "meta-externalagent",
|
|
187
|
+
name: "Meta-ExternalAgent",
|
|
188
|
+
product: "meta",
|
|
189
|
+
category: "training",
|
|
190
|
+
pattern: /meta-externalagent|FacebookBot/i
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "facebookexternalhit",
|
|
194
|
+
name: "Facebook link preview",
|
|
195
|
+
product: "meta",
|
|
196
|
+
category: "other",
|
|
197
|
+
pattern: /facebookexternalhit|facebookcatalog/i
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: "applebot",
|
|
201
|
+
name: "Applebot",
|
|
202
|
+
product: "apple",
|
|
203
|
+
category: "search_engine",
|
|
204
|
+
pattern: /Applebot/i
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
id: "amazonbuyforme",
|
|
208
|
+
name: "Amazon Buy for Me",
|
|
209
|
+
product: "amazon",
|
|
210
|
+
category: "agent",
|
|
211
|
+
pattern: /AmazonBuyForMe/i
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: "novaact",
|
|
215
|
+
name: "Nova Act",
|
|
216
|
+
product: "amazon",
|
|
217
|
+
category: "agent",
|
|
218
|
+
pattern: /NovaAct/i
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
id: "amzn-user",
|
|
222
|
+
name: "Amzn-User",
|
|
223
|
+
product: "amazon",
|
|
224
|
+
category: "assistant",
|
|
225
|
+
pattern: /Amzn-User/i
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
id: "amzn-searchbot",
|
|
229
|
+
name: "Amzn-SearchBot",
|
|
230
|
+
product: "amazon",
|
|
231
|
+
category: "search",
|
|
232
|
+
pattern: /Amzn-SearchBot|amazon-kendra/i
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
id: "bedrockbot",
|
|
236
|
+
name: "BedrockBot",
|
|
237
|
+
product: "amazon",
|
|
238
|
+
category: "training",
|
|
239
|
+
pattern: /bedrockbot/i
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
id: "amazonbot",
|
|
243
|
+
name: "Amazonbot",
|
|
244
|
+
product: "amazon",
|
|
245
|
+
category: "search",
|
|
246
|
+
pattern: /Amazonbot/i
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
id: "mistralai-user",
|
|
250
|
+
name: "MistralAI-User",
|
|
251
|
+
product: "mistral",
|
|
252
|
+
category: "assistant",
|
|
253
|
+
pattern: /MistralAI-User/i
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: "mistralai-index",
|
|
257
|
+
name: "MistralAI-Index",
|
|
258
|
+
product: "mistral",
|
|
259
|
+
category: "search",
|
|
260
|
+
pattern: /MistralAI-Index/i
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
id: "mistralai-training",
|
|
264
|
+
name: "MistralAI-Training",
|
|
265
|
+
product: "mistral",
|
|
266
|
+
category: "training",
|
|
267
|
+
pattern: /MistralAI-Training/i
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
id: "deepseekbot",
|
|
271
|
+
name: "DeepSeekBot",
|
|
272
|
+
product: "deepseek",
|
|
273
|
+
category: "training",
|
|
274
|
+
pattern: /DeepSeekBot/i
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
id: "doubaobot",
|
|
278
|
+
name: "DoubaoBot",
|
|
279
|
+
product: "bytedance",
|
|
280
|
+
category: "search",
|
|
281
|
+
pattern: /DoubaoBot/i
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
id: "bytespider",
|
|
285
|
+
name: "Bytespider",
|
|
286
|
+
product: "bytedance",
|
|
287
|
+
category: "training",
|
|
288
|
+
pattern: /Bytespider|TikTokSpider/i
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
id: "duckassistbot",
|
|
292
|
+
name: "DuckAssistBot",
|
|
293
|
+
product: "duckduckgo",
|
|
294
|
+
category: "assistant",
|
|
295
|
+
pattern: /DuckAssistBot/i
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
id: "duckduckbot",
|
|
299
|
+
name: "DuckDuckBot",
|
|
300
|
+
product: "duckduckgo",
|
|
301
|
+
category: "search_engine",
|
|
302
|
+
pattern: /DuckDuckBot/i
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
id: "ccbot",
|
|
306
|
+
name: "CCBot",
|
|
307
|
+
product: "commoncrawl",
|
|
308
|
+
category: "training",
|
|
309
|
+
pattern: /CCBot/i
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
id: "cohere-training",
|
|
313
|
+
name: "Cohere training crawler",
|
|
314
|
+
product: "cohere",
|
|
315
|
+
category: "training",
|
|
316
|
+
pattern: /cohere-training-data-crawler/i
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
id: "cohere-ai",
|
|
320
|
+
name: "cohere-ai",
|
|
321
|
+
product: "cohere",
|
|
322
|
+
category: "assistant",
|
|
323
|
+
pattern: /cohere-ai/i
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
id: "youbot",
|
|
327
|
+
name: "YouBot",
|
|
328
|
+
product: "you",
|
|
329
|
+
category: "search",
|
|
330
|
+
pattern: /YouBot/i
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
id: "tongyibot",
|
|
334
|
+
name: "TongyiBot",
|
|
335
|
+
product: "qwen",
|
|
336
|
+
category: "assistant",
|
|
337
|
+
pattern: /TongyiBot/i
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
id: "qwenbot",
|
|
341
|
+
name: "QwenBot",
|
|
342
|
+
product: "qwen",
|
|
343
|
+
category: "training",
|
|
344
|
+
pattern: /QwenBot/i
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
id: "kimi-user",
|
|
348
|
+
name: "Kimi-User",
|
|
349
|
+
product: "kimi",
|
|
350
|
+
category: "assistant",
|
|
351
|
+
pattern: /Kimi-User/i
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
id: "kimi-searchbot",
|
|
355
|
+
name: "Kimi-SearchBot",
|
|
356
|
+
product: "kimi",
|
|
357
|
+
category: "search",
|
|
358
|
+
pattern: /Kimi-SearchBot/i
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
id: "kimibot",
|
|
362
|
+
name: "KimiBot",
|
|
363
|
+
product: "kimi",
|
|
364
|
+
category: "training",
|
|
365
|
+
pattern: /KimiBot/i
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
id: "yiyanbot",
|
|
369
|
+
name: "YiyanBot",
|
|
370
|
+
product: "baidu",
|
|
371
|
+
category: "assistant",
|
|
372
|
+
pattern: /YiyanBot/i
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
id: "erniebot",
|
|
376
|
+
name: "ERNIEBot",
|
|
377
|
+
product: "baidu",
|
|
378
|
+
category: "training",
|
|
379
|
+
pattern: /ERNIEBot/i
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
id: "baiduspider",
|
|
383
|
+
name: "Baiduspider",
|
|
384
|
+
product: "baidu",
|
|
385
|
+
category: "search_engine",
|
|
386
|
+
pattern: /Baiduspider/i
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
id: "yandexadditional",
|
|
390
|
+
name: "YandexAdditional",
|
|
391
|
+
product: "yandex",
|
|
392
|
+
category: "training",
|
|
393
|
+
pattern: /YandexAdditional/i
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
id: "yandexbot",
|
|
397
|
+
name: "YandexBot",
|
|
398
|
+
product: "yandex",
|
|
399
|
+
category: "search_engine",
|
|
400
|
+
pattern: /YandexBot|YandexMobileBot/i
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
id: "pangubot",
|
|
404
|
+
name: "PanguBot",
|
|
405
|
+
product: "huawei",
|
|
406
|
+
category: "training",
|
|
407
|
+
pattern: /PanguBot/i
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
id: "petalbot",
|
|
411
|
+
name: "PetalBot",
|
|
412
|
+
product: "huawei",
|
|
413
|
+
category: "search_engine",
|
|
414
|
+
pattern: /PetalBot/i
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
id: "ai2bot",
|
|
418
|
+
name: "AI2Bot",
|
|
419
|
+
product: "ai2",
|
|
420
|
+
category: "training",
|
|
421
|
+
pattern: /AI2Bot|Ai2Bot-Dolma/i
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
id: "bravebot",
|
|
425
|
+
name: "Bravebot",
|
|
426
|
+
product: "brave",
|
|
427
|
+
category: "search",
|
|
428
|
+
pattern: /Bravebot/i
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
id: "kagi-fetcher",
|
|
432
|
+
name: "Kagi fetcher",
|
|
433
|
+
product: "kagi",
|
|
434
|
+
category: "assistant",
|
|
435
|
+
pattern: /kagi-fetcher/i
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
id: "phindbot",
|
|
439
|
+
name: "PhindBot",
|
|
440
|
+
product: "phind",
|
|
441
|
+
category: "assistant",
|
|
442
|
+
pattern: /PhindBot/i
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
id: "manus-user",
|
|
446
|
+
name: "Manus",
|
|
447
|
+
product: "manus",
|
|
448
|
+
category: "agent",
|
|
449
|
+
pattern: /Manus-User/i
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
id: "cursor",
|
|
453
|
+
name: "Cursor",
|
|
454
|
+
product: "coding",
|
|
455
|
+
category: "assistant",
|
|
456
|
+
pattern: /\bCursor\//i
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
id: "devin",
|
|
460
|
+
name: "Devin",
|
|
461
|
+
product: "coding",
|
|
462
|
+
category: "agent",
|
|
463
|
+
pattern: /\bDevin\b/i
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
id: "opencode",
|
|
467
|
+
name: "opencode",
|
|
468
|
+
product: "coding",
|
|
469
|
+
category: "assistant",
|
|
470
|
+
pattern: /\bopencode\b/i
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
id: "firecrawl",
|
|
474
|
+
name: "Firecrawl",
|
|
475
|
+
product: "aidata",
|
|
476
|
+
category: "assistant",
|
|
477
|
+
pattern: /FirecrawlAgent|Firecrawl/i
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
id: "exa-user",
|
|
481
|
+
name: "Exa (live fetch)",
|
|
482
|
+
product: "aidata",
|
|
483
|
+
category: "assistant",
|
|
484
|
+
pattern: /ExaUser/i
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
id: "exabot",
|
|
488
|
+
name: "Exa",
|
|
489
|
+
product: "aidata",
|
|
490
|
+
category: "search",
|
|
491
|
+
pattern: /ExaBot|ExaSearchBot/i
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
id: "tavilybot",
|
|
495
|
+
name: "Tavily",
|
|
496
|
+
product: "aidata",
|
|
497
|
+
category: "search",
|
|
498
|
+
pattern: /TavilyBot/i
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
id: "linkupbot",
|
|
502
|
+
name: "Linkup",
|
|
503
|
+
product: "aidata",
|
|
504
|
+
category: "search",
|
|
505
|
+
pattern: /LinkupBot/i
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
id: "shapbot",
|
|
509
|
+
name: "Parallel (ShapBot)",
|
|
510
|
+
product: "aidata",
|
|
511
|
+
category: "search",
|
|
512
|
+
pattern: /ShapBot|Shap-User/i
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
id: "jina",
|
|
516
|
+
name: "Jina Reader",
|
|
517
|
+
product: "aidata",
|
|
518
|
+
category: "assistant",
|
|
519
|
+
pattern: /Jina-?Reader|\bJina\b/i
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
id: "diffbot",
|
|
523
|
+
name: "Diffbot",
|
|
524
|
+
product: "aidata",
|
|
525
|
+
category: "training",
|
|
526
|
+
pattern: /Diffbot/i
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
id: "brightbot",
|
|
530
|
+
name: "Bright Data",
|
|
531
|
+
product: "aidata",
|
|
532
|
+
category: "training",
|
|
533
|
+
pattern: /Brightbot/i
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
id: "apifybot",
|
|
537
|
+
name: "Apify",
|
|
538
|
+
product: "aidata",
|
|
539
|
+
category: "training",
|
|
540
|
+
pattern: /ApifyBot|ApifyWebsiteContentCrawler/i
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
id: "crawl4ai",
|
|
544
|
+
name: "Crawl4AI",
|
|
545
|
+
product: "aidata",
|
|
546
|
+
category: "training",
|
|
547
|
+
pattern: /Crawl4AI/i
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
id: "webzio",
|
|
551
|
+
name: "Webz.io",
|
|
552
|
+
product: "aidata",
|
|
553
|
+
category: "training",
|
|
554
|
+
pattern: /omgili|Webzio-Extended/i
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
id: "timpibot",
|
|
558
|
+
name: "Timpibot",
|
|
559
|
+
product: "aidata",
|
|
560
|
+
category: "training",
|
|
561
|
+
pattern: /Timpibot/i
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
id: "imagesiftbot",
|
|
565
|
+
name: "ImagesiftBot",
|
|
566
|
+
product: "aidata",
|
|
567
|
+
category: "training",
|
|
568
|
+
pattern: /ImagesiftBot|img2dataset|LAIONDownloader/i
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
id: "signed-agent",
|
|
572
|
+
name: "Signed agent",
|
|
573
|
+
product: "automation",
|
|
574
|
+
category: "agent",
|
|
575
|
+
pattern: null
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
id: "headless",
|
|
579
|
+
name: "Headless browser",
|
|
580
|
+
product: "automation",
|
|
581
|
+
category: "other",
|
|
582
|
+
pattern: /HeadlessChrome|PhantomJS|Puppeteer|Playwright|Selenium|Lightpanda|webdriver/i
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
id: "ahrefs",
|
|
586
|
+
name: "Ahrefs",
|
|
587
|
+
product: "seo",
|
|
588
|
+
category: "other",
|
|
589
|
+
pattern: /AhrefsBot|AhrefsSiteAudit/i
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
id: "seo",
|
|
593
|
+
name: "SEO crawler",
|
|
594
|
+
product: "seo",
|
|
595
|
+
category: "other",
|
|
596
|
+
pattern: /SemrushBot|SiteAuditBot|MJ12bot|DotBot|rogerbot|Screaming Frog|DataForSeoBot|BLEXBot|serpstatbot|SEOkicks|barkrowler/i
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
id: "link-preview",
|
|
600
|
+
name: "Link preview",
|
|
601
|
+
product: "social",
|
|
602
|
+
category: "other",
|
|
603
|
+
pattern: /Twitterbot|LinkedInBot|Slackbot|Slack-ImgProxy|Discordbot|WhatsApp|TelegramBot|Pinterestbot|redditbot|Embedly|Iframely|SkypeUriPreview|vkShare|Mastodon/i
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
id: "monitor",
|
|
607
|
+
name: "Uptime monitor",
|
|
608
|
+
product: "monitor",
|
|
609
|
+
category: "other",
|
|
610
|
+
pattern: /UptimeRobot|Pingdom|StatusCake|Better ?Uptime|BetterStack|Checkly|Site24x7|NewRelicPinger|Datadog|UptimeKuma|Uptime-Kuma|Hetrix/i
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
id: "search-other",
|
|
614
|
+
name: "Other search engine",
|
|
615
|
+
product: "other",
|
|
616
|
+
category: "search_engine",
|
|
617
|
+
pattern: /Slurp|SeznamBot|Qwantbot|Qwantify|MojeekBot|Ecosia|coccocbot|Sogou|NaverBot|Yeti\//i
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
id: "http-client",
|
|
621
|
+
name: "HTTP client / script",
|
|
622
|
+
product: "tools",
|
|
623
|
+
category: "other",
|
|
624
|
+
pattern: /^curl\/|\bWget\b|python-requests|python-urllib|Python\/\d|aiohttp|python-httpx|Go-http-client|okhttp|axios\/|node-fetch|undici|^node$|Java\/\d|Apache-HttpClient|libwww-perl|^Ruby|Faraday|Scrapy|^Deno\/|^Bun\/|GuzzleHttp|^PostmanRuntime|HTTPie/i
|
|
625
|
+
}
|
|
626
|
+
];
|
|
627
|
+
/** Matched last, after the generated lists: anything that still calls itself a bot, and no User-Agent at all. */
|
|
628
|
+
const CATCH_ALL = [{
|
|
629
|
+
id: "other-bot",
|
|
630
|
+
name: "Other bot",
|
|
631
|
+
product: "other",
|
|
632
|
+
category: "other",
|
|
633
|
+
pattern: /bot\b|bot\/|robot|crawl|spider|scrape|scraping|fetcher|preview|archiver|indexer/i
|
|
634
|
+
}, {
|
|
635
|
+
id: "no-ua",
|
|
636
|
+
name: "No user agent",
|
|
637
|
+
product: "other",
|
|
638
|
+
category: "other",
|
|
639
|
+
pattern: null
|
|
640
|
+
}];
|
|
641
|
+
// src/bots.ts
|
|
642
|
+
/**
|
|
643
|
+
* Known bots, AI crawlers and AI agents, recognised by their User-Agent: the ones we've
|
|
644
|
+
* checked against each vendor's documentation (bots.curated.ts). `detectBot()` uses them in
|
|
645
|
+
* your app, and the middleware uses them to decide what to send.
|
|
646
|
+
*
|
|
647
|
+
* The AgentStats server makes the final call with a much bigger catalogue (these plus public
|
|
648
|
+
* bot lists), so the dashboard knows bots this SDK version doesn't, without an upgrade.
|
|
649
|
+
*/
|
|
650
|
+
/** Categories that count as "AI traffic". Search engines and other bots are shown separately. */
|
|
651
|
+
const AI_CATEGORIES = [
|
|
652
|
+
"training",
|
|
653
|
+
"search",
|
|
654
|
+
"assistant",
|
|
655
|
+
"agent"
|
|
656
|
+
];
|
|
657
|
+
const isAiCategory = (c) => AI_CATEGORIES.includes(c);
|
|
658
|
+
/** Products group several bots from one vendor ("ChatGPT" = GPTBot + OAI-SearchBot + ChatGPT-User + ChatGPT agent). */
|
|
659
|
+
const BOT_PRODUCTS = {
|
|
660
|
+
chatgpt: {
|
|
661
|
+
name: "ChatGPT",
|
|
662
|
+
operator: "OpenAI"
|
|
663
|
+
},
|
|
664
|
+
claude: {
|
|
665
|
+
name: "Claude",
|
|
666
|
+
operator: "Anthropic"
|
|
667
|
+
},
|
|
668
|
+
perplexity: {
|
|
669
|
+
name: "Perplexity",
|
|
670
|
+
operator: "Perplexity"
|
|
671
|
+
},
|
|
672
|
+
gemini: {
|
|
673
|
+
name: "Gemini",
|
|
674
|
+
operator: "Google"
|
|
675
|
+
},
|
|
676
|
+
copilot: {
|
|
677
|
+
name: "Copilot & Bing",
|
|
678
|
+
operator: "Microsoft"
|
|
679
|
+
},
|
|
680
|
+
meta: {
|
|
681
|
+
name: "Meta AI",
|
|
682
|
+
operator: "Meta"
|
|
683
|
+
},
|
|
684
|
+
apple: {
|
|
685
|
+
name: "Apple",
|
|
686
|
+
operator: "Apple"
|
|
687
|
+
},
|
|
688
|
+
amazon: {
|
|
689
|
+
name: "Amazon",
|
|
690
|
+
operator: "Amazon"
|
|
691
|
+
},
|
|
692
|
+
mistral: {
|
|
693
|
+
name: "Mistral",
|
|
694
|
+
operator: "Mistral AI"
|
|
695
|
+
},
|
|
696
|
+
deepseek: {
|
|
697
|
+
name: "DeepSeek",
|
|
698
|
+
operator: "DeepSeek"
|
|
699
|
+
},
|
|
700
|
+
bytedance: {
|
|
701
|
+
name: "ByteDance",
|
|
702
|
+
operator: "ByteDance"
|
|
703
|
+
},
|
|
704
|
+
xai: {
|
|
705
|
+
name: "Grok",
|
|
706
|
+
operator: "xAI"
|
|
707
|
+
},
|
|
708
|
+
duckduckgo: {
|
|
709
|
+
name: "DuckDuckGo",
|
|
710
|
+
operator: "DuckDuckGo"
|
|
711
|
+
},
|
|
712
|
+
commoncrawl: {
|
|
713
|
+
name: "Common Crawl",
|
|
714
|
+
operator: "Common Crawl Foundation"
|
|
715
|
+
},
|
|
716
|
+
cohere: {
|
|
717
|
+
name: "Cohere",
|
|
718
|
+
operator: "Cohere"
|
|
719
|
+
},
|
|
720
|
+
you: {
|
|
721
|
+
name: "You.com",
|
|
722
|
+
operator: "You.com"
|
|
723
|
+
},
|
|
724
|
+
qwen: {
|
|
725
|
+
name: "Qwen",
|
|
726
|
+
operator: "Alibaba"
|
|
727
|
+
},
|
|
728
|
+
kimi: {
|
|
729
|
+
name: "Kimi",
|
|
730
|
+
operator: "Moonshot AI"
|
|
731
|
+
},
|
|
732
|
+
baidu: {
|
|
733
|
+
name: "Baidu",
|
|
734
|
+
operator: "Baidu"
|
|
735
|
+
},
|
|
736
|
+
yandex: {
|
|
737
|
+
name: "Yandex",
|
|
738
|
+
operator: "Yandex"
|
|
739
|
+
},
|
|
740
|
+
huawei: {
|
|
741
|
+
name: "Huawei",
|
|
742
|
+
operator: "Huawei"
|
|
743
|
+
},
|
|
744
|
+
ai2: {
|
|
745
|
+
name: "Ai2",
|
|
746
|
+
operator: "Allen Institute for AI"
|
|
747
|
+
},
|
|
748
|
+
brave: {
|
|
749
|
+
name: "Brave",
|
|
750
|
+
operator: "Brave"
|
|
751
|
+
},
|
|
752
|
+
kagi: {
|
|
753
|
+
name: "Kagi",
|
|
754
|
+
operator: "Kagi"
|
|
755
|
+
},
|
|
756
|
+
phind: {
|
|
757
|
+
name: "Phind",
|
|
758
|
+
operator: "Phind"
|
|
759
|
+
},
|
|
760
|
+
poe: {
|
|
761
|
+
name: "Poe",
|
|
762
|
+
operator: "Quora"
|
|
763
|
+
},
|
|
764
|
+
manus: {
|
|
765
|
+
name: "Manus",
|
|
766
|
+
operator: "Butterfly Effect"
|
|
767
|
+
},
|
|
768
|
+
ai: {
|
|
769
|
+
name: "Other AI bots",
|
|
770
|
+
operator: "Various"
|
|
771
|
+
},
|
|
772
|
+
coding: {
|
|
773
|
+
name: "Coding agents",
|
|
774
|
+
operator: "Various"
|
|
775
|
+
},
|
|
776
|
+
aidata: {
|
|
777
|
+
name: "AI data providers",
|
|
778
|
+
operator: "Various"
|
|
779
|
+
},
|
|
780
|
+
google: {
|
|
781
|
+
name: "Google Search",
|
|
782
|
+
operator: "Google"
|
|
783
|
+
},
|
|
784
|
+
searchengines: {
|
|
785
|
+
name: "Other search engines",
|
|
786
|
+
operator: "Various"
|
|
787
|
+
},
|
|
788
|
+
automation: {
|
|
789
|
+
name: "Automated browsers",
|
|
790
|
+
operator: "Various"
|
|
791
|
+
},
|
|
792
|
+
seo: {
|
|
793
|
+
name: "SEO tools",
|
|
794
|
+
operator: "Various"
|
|
795
|
+
},
|
|
796
|
+
social: {
|
|
797
|
+
name: "Link previews",
|
|
798
|
+
operator: "Various"
|
|
799
|
+
},
|
|
800
|
+
monitor: {
|
|
801
|
+
name: "Monitoring",
|
|
802
|
+
operator: "Various"
|
|
803
|
+
},
|
|
804
|
+
feeds: {
|
|
805
|
+
name: "Feed readers",
|
|
806
|
+
operator: "Various"
|
|
807
|
+
},
|
|
808
|
+
security: {
|
|
809
|
+
name: "Security scanners",
|
|
810
|
+
operator: "Various"
|
|
811
|
+
},
|
|
812
|
+
archive: {
|
|
813
|
+
name: "Archivers",
|
|
814
|
+
operator: "Various"
|
|
815
|
+
},
|
|
816
|
+
research: {
|
|
817
|
+
name: "Research crawlers",
|
|
818
|
+
operator: "Various"
|
|
819
|
+
},
|
|
820
|
+
ads: {
|
|
821
|
+
name: "Advertising bots",
|
|
822
|
+
operator: "Various"
|
|
823
|
+
},
|
|
824
|
+
tools: {
|
|
825
|
+
name: "HTTP clients & scripts",
|
|
826
|
+
operator: "Various"
|
|
827
|
+
},
|
|
828
|
+
other: {
|
|
829
|
+
name: "Other bots",
|
|
830
|
+
operator: "Unknown"
|
|
831
|
+
}
|
|
832
|
+
};
|
|
833
|
+
/** Every bot this SDK recognises, in the order they're tried: the first match wins, catch-alls last. */
|
|
834
|
+
const BOT_PATTERNS = [...CURATED, ...CATCH_ALL];
|
|
835
|
+
const BY_ID = new Map(BOT_PATTERNS.map((b) => [b.id, b]));
|
|
836
|
+
/** Real browsers whose UA happens to contain a bot-ish word. */
|
|
837
|
+
const HUMAN_LOOKALIKES = /cubot|\bbotswana\b/i;
|
|
838
|
+
/** The first bot in `list` whose pattern matches `ua` (trimmed, non-empty). Shared with the server's bigger catalogue. */
|
|
839
|
+
function firstMatch(list, s) {
|
|
840
|
+
for (const b of list) {
|
|
841
|
+
if (!b.pattern || !b.pattern.test(s)) continue;
|
|
842
|
+
if ((b.id === "other-bot" || b.id === "link-preview") && HUMAN_LOOKALIKES.test(s)) continue;
|
|
843
|
+
return b;
|
|
844
|
+
}
|
|
845
|
+
return null;
|
|
846
|
+
}
|
|
847
|
+
/** Identify a bot from its User-Agent. Returns null for (what looks like) a normal browser. */
|
|
848
|
+
function classifyUserAgent(ua) {
|
|
849
|
+
const s = (ua ?? "").trim();
|
|
850
|
+
if (!s) return BY_ID.get("no-ua");
|
|
851
|
+
return firstMatch(BOT_PATTERNS, s);
|
|
852
|
+
}
|
|
853
|
+
/** Hostnames of AI assistants that send people to websites, and the `utm_source` values they add. */
|
|
854
|
+
const AI_REFERRERS = [
|
|
855
|
+
{
|
|
856
|
+
product: "chatgpt",
|
|
857
|
+
hosts: /(^|\.)(chatgpt\.com|chat\.openai\.com)$/,
|
|
858
|
+
utm: /^(chatgpt(\.com)?|openai)$/
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
product: "perplexity",
|
|
862
|
+
hosts: /(^|\.)perplexity\.ai$/,
|
|
863
|
+
utm: /^perplexity(\.ai)?$/
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
product: "claude",
|
|
867
|
+
hosts: /(^|\.)claude\.ai$/,
|
|
868
|
+
utm: /^claude(\.ai)?$/
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
product: "gemini",
|
|
872
|
+
hosts: /^(gemini|bard)\.google\.com$/,
|
|
873
|
+
utm: /^(gemini|bard)$/
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
product: "copilot",
|
|
877
|
+
hosts: /^copilot\.microsoft\.com$|(^|\.)copilot\.cloud\.microsoft$|^copilot\.com$/,
|
|
878
|
+
utm: /^copilot(\.com)?$/
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
product: "meta",
|
|
882
|
+
hosts: /(^|\.)meta\.ai$/,
|
|
883
|
+
utm: /^meta\.?ai$/
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
product: "deepseek",
|
|
887
|
+
hosts: /(^|\.)deepseek\.com$/,
|
|
888
|
+
utm: /^deepseek$/
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
product: "xai",
|
|
892
|
+
hosts: /(^|\.)grok\.com$/,
|
|
893
|
+
utm: /^grok$/
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
product: "mistral",
|
|
897
|
+
hosts: /^chat\.mistral\.ai$/,
|
|
898
|
+
utm: /^(le-?chat|mistral)$/
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
product: "you",
|
|
902
|
+
hosts: /(^|\.)you\.com$/
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
product: "phind",
|
|
906
|
+
hosts: /(^|\.)phind\.com$/
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
product: "poe",
|
|
910
|
+
hosts: /(^|\.)poe\.com$/
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
product: "duckduckgo",
|
|
914
|
+
hosts: /^duck\.ai$/
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
product: "qwen",
|
|
918
|
+
hosts: /^chat\.qwen\.ai$/
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
product: "kimi",
|
|
922
|
+
hosts: /(^|\.)kimi\.(com|ai)$|^kimi\.moonshot\.cn$/
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
product: "bytedance",
|
|
926
|
+
hosts: /(^|\.)doubao\.com$/
|
|
927
|
+
}
|
|
928
|
+
];
|
|
929
|
+
function hostOf(raw) {
|
|
930
|
+
try {
|
|
931
|
+
return new URL(raw.includes("://") ? raw : `https://${raw}`).hostname.toLowerCase().replace(/^www\./, "");
|
|
932
|
+
} catch {
|
|
933
|
+
return "";
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* Which AI assistant sent a human to this page, from the Referer header and/or
|
|
938
|
+
* the landing URL's `utm_source`. Returns the product id, or null.
|
|
939
|
+
*/
|
|
940
|
+
function classifyReferral(referrer, url) {
|
|
941
|
+
if (referrer) {
|
|
942
|
+
const host = hostOf(referrer);
|
|
943
|
+
const hit = host && AI_REFERRERS.find((r) => r.hosts.test(host));
|
|
944
|
+
if (hit) return hit.product;
|
|
945
|
+
}
|
|
946
|
+
if (url && url.includes("utm_source=")) {
|
|
947
|
+
const m = url.match(/[?&]utm_source=([^&#]+)/);
|
|
948
|
+
const src = m ? decodeURIComponent(m[1]).toLowerCase().replace(/^www\./, "") : "";
|
|
949
|
+
const hit = src && AI_REFERRERS.find((r) => r.utm?.test(src) || r.hosts.test(src));
|
|
950
|
+
if (hit) return hit.product;
|
|
951
|
+
}
|
|
952
|
+
return null;
|
|
953
|
+
}
|
|
954
|
+
function readHeader(h, name) {
|
|
955
|
+
if (!h) return null;
|
|
956
|
+
if (typeof h.get === "function") return h.get(name);
|
|
957
|
+
const v = h[name];
|
|
958
|
+
return Array.isArray(v) ? v.join(", ") : v ?? null;
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* What kind of client sent this request, from its User-Agent, Web Bot Auth headers and referrer.
|
|
962
|
+
* Synchronous and dependency-free, so it works in any server, middleware or edge function.
|
|
963
|
+
*
|
|
964
|
+
* It reports who the client *claims* to be. Anyone can send `User-Agent: GPTBot`, so don't
|
|
965
|
+
* use it to grant access; your dashboard verifies each hit against the vendor's IP ranges,
|
|
966
|
+
* reverse DNS and signatures.
|
|
967
|
+
*
|
|
968
|
+
* detectBot(request) // fetch Request (Next, SvelteKit, Astro, Hono, Workers…)
|
|
969
|
+
* detectBot(await headers()) // Next.js server components
|
|
970
|
+
* detectBot(req) // Node / Express IncomingMessage
|
|
971
|
+
*/
|
|
972
|
+
function detectBot(input) {
|
|
973
|
+
const headers = input && typeof input.get === "function" ? input : input?.headers;
|
|
974
|
+
return detectFromHeaders((name) => readHeader(headers, name), input && "url" in input && typeof input.url === "string" ? input.url : null);
|
|
975
|
+
}
|
|
976
|
+
/** `detectBot` over a header getter (used by the server adapters). */
|
|
977
|
+
function detectFromHeaders(header, url) {
|
|
978
|
+
const ua = header("user-agent") ?? null;
|
|
979
|
+
const signed = !!(header("signature-agent") && header("signature-input"));
|
|
980
|
+
const bot = classifyUserAgent(ua) ?? (signed ? BY_ID.get("signed-agent") : null);
|
|
981
|
+
if (!bot) {
|
|
982
|
+
const referral = classifyReferral(header("referer"), url);
|
|
983
|
+
return {
|
|
984
|
+
isBot: false,
|
|
985
|
+
isAI: false,
|
|
986
|
+
id: null,
|
|
987
|
+
name: null,
|
|
988
|
+
category: null,
|
|
989
|
+
product: null,
|
|
990
|
+
operator: null,
|
|
991
|
+
browser: false,
|
|
992
|
+
signed: false,
|
|
993
|
+
referral: referral ? BOT_PRODUCTS[referral].name : null
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
const product = BOT_PRODUCTS[bot.product];
|
|
997
|
+
return {
|
|
998
|
+
isBot: true,
|
|
999
|
+
isAI: isAiCategory(bot.category),
|
|
1000
|
+
id: bot.id,
|
|
1001
|
+
name: bot.name,
|
|
1002
|
+
category: bot.category,
|
|
1003
|
+
product: product.name,
|
|
1004
|
+
operator: bot.operator ?? product.operator,
|
|
1005
|
+
browser: bot.category === "agent" || bot.product === "automation",
|
|
1006
|
+
signed,
|
|
1007
|
+
referral: null
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
export { AI_CATEGORIES, AI_REFERRERS, BOT_PATTERNS, BOT_PRODUCTS, CATCH_ALL, CURATED, classifyReferral, classifyUserAgent, detectBot, detectFromHeaders, firstMatch, isAiCategory };
|