@trustbot/lists 0.0.0-stage → 1.0.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 (2026-12-02)
4
+
5
+ First release.
6
+
7
+ - 41 bots with operator, kind, User-Agent tokens and how each can be verified (`bots.json`).
8
+ - 16 official IP lists from OpenAI, Anthropic, Google, Microsoft, Apple, Perplexity, Mistral, DuckDuckGo and Common Crawl (`ranges.json` and `ranges/<id>.txt`).
9
+ - `rangesFor()`, `format()` and `getBot()`.
10
+ - `trustbot-lists` command: allowlists for nginx, Apache, Caddy and Cloudflare.
11
+ - Zero dependencies.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CK Giri
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,113 @@
1
- # Temporary Holding Version
1
+ # @trustbot/lists
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <p>
4
+ <a href="https://www.npmjs.com/package/@trustbot/lists"><img src="https://img.shields.io/npm/v/@trustbot/lists" alt="npm version"></a>
5
+ <a href="https://bundlephobia.com/package/@trustbot/lists"><img src="https://img.shields.io/badge/dependencies-0-brightgreen" alt="zero dependencies"></a>
6
+ <a href="https://github.com/ckgiri/trustbot-lists/actions/workflows/update.yml"><img src="https://img.shields.io/badge/IP%20lists-updated%20weekly-blue" alt="IP lists updated weekly"></a>
7
+ <a href="https://github.com/ckgiri/trustbot-lists/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@trustbot/lists" alt="MIT license"></a>
8
+ </p>
9
+
10
+ **The data behind [trustbot](https://github.com/ckgiri/trustbot), without the code.** 41 known bots with who runs them and how to verify them, plus every operator's official IP ranges (OpenAI, Anthropic, Google, Microsoft, Apple, Perplexity, Mistral, DuckDuckGo, Common Crawl), refreshed every week.
11
+
12
+ Use it as JSON from any language, as plain-text lists for a firewall, or as ready-to-paste allowlists for nginx, Apache, Caddy and Cloudflare.
13
+
14
+ ```bash
15
+ npx @trustbot/lists ranges GPTBot ClaudeBot --format nginx
16
+ # allow 4.227.36.0/25;
17
+ # allow 20.125.66.80/28;
18
+ # …
19
+ ```
20
+
21
+ ## When to use this, and when to use trustbot
22
+
23
+ | You want to… | Use |
24
+ |---|---|
25
+ | Check a request in your app: is this GPTBot real? | [trustbot](https://www.npmjs.com/package/trustbot): it also checks reverse DNS and signatures, and keeps the lists fresh at runtime |
26
+ | Allowlist real bots in nginx, Apache, Caddy or a Cloudflare WAF rule | this package's CLI |
27
+ | Feed the data into Python, Go, a SIEM or a spreadsheet | `bots.json`, `ranges.json` or the `.txt` files |
28
+ | Know who runs a bot and how it can be verified | `bots.json` |
29
+
30
+ An IP allowlist only covers bots that publish IP lists. Yandex, Baidu and Amazon verify by reverse DNS instead, and ChatGPT agent by signature, so they need trustbot.
31
+
32
+ ## Command line
33
+
34
+ ```bash
35
+ npx @trustbot/lists ranges <bot...> [--format txt|json|nginx|apache|caddy|cloudflare] [--ipv4|--ipv6]
36
+ npx @trustbot/lists bots [--kind ai|search|social|other]
37
+ npx @trustbot/lists lists
38
+ ```
39
+
40
+ ```bash
41
+ # A Cloudflare WAF expression that matches real Googlebot and bingbot
42
+ npx @trustbot/lists ranges Googlebot bingbot --format cloudflare
43
+
44
+ # Real OpenAI crawlers for an Apache <RequireAny> block, IPv4 only
45
+ npx @trustbot/lists ranges GPTBot OAI-SearchBot ChatGPT-User --format apache --ipv4
46
+ ```
47
+
48
+ ## JavaScript
49
+
50
+ ```js
51
+ import { bots, lists, rangesFor, format, getBot, updated } from "@trustbot/lists";
52
+
53
+ rangesFor("GPTBot"); // ["4.227.36.0/25", …]
54
+ rangesFor(["ClaudeBot", "PerplexityBot"], { ipv6: false });
55
+ format(rangesFor("Googlebot"), "nginx"); // "allow 34.22.85.0/27;\n…"
56
+
57
+ getBot("Amazonbot").verify; // { ipRanges: [], rdns: ["crawl.amazonbot.amazon"], signatureAgent: null }
58
+ lists["openai-gptbot"].downloaded; // "2026-12-01"
59
+ ```
60
+
61
+ | Export | |
62
+ |---|---|
63
+ | `bots` | Every bot: `{ name, operator, kind, userAgent, verify: { ipRanges, rdns, signatureAgent }, docs }` |
64
+ | `lists` | Every IP list by id: `{ id, operator, url, downloaded, ipv4, ipv6 }` |
65
+ | `rangesFor(names, { ipv4?, ipv6? })` | The ranges of one or more bots, deduplicated |
66
+ | `format(ranges, as)` | `txt`, `json`, `nginx`, `apache`, `caddy` or `cloudflare` |
67
+ | `getBot(name)`, `canVerify(bot)` | Look one up; whether it can be verified at all |
68
+ | `updated` | When an IP list last changed |
69
+
70
+ Zero dependencies. Works in Node, Deno, Bun, browsers and edge runtimes.
71
+
72
+ ## Files
73
+
74
+ The same data, without JavaScript:
75
+
76
+ | File | |
77
+ |---|---|
78
+ | `@trustbot/lists/bots.json` | Every bot and how to verify it |
79
+ | `@trustbot/lists/ranges.json` | Every IP list, with its source URL and date |
80
+ | `@trustbot/lists/ranges/<id>.txt` | One list, one range per line, with a comment header |
81
+
82
+ From a CDN, with no install: `https://cdn.jsdelivr.net/npm/@trustbot/lists/data/ranges/openai-gptbot.txt`
83
+
84
+ ## IP lists
85
+
86
+ | Id | Operator | Ranges |
87
+ |---|---|---|
88
+ | `anthropic-claude` | Anthropic | 14 |
89
+ | `apple-applebot` | Apple | 24 |
90
+ | `commoncrawl-ccbot` | Common Crawl | 5 |
91
+ | `duckduckgo-duckassistbot` | DuckDuckGo | 486 |
92
+ | `duckduckgo-duckduckbot` | DuckDuckGo | 486 |
93
+ | `google-common-crawlers` | Google | 317 |
94
+ | `google-special-crawlers` | Google | 272 |
95
+ | `google-user-triggered-fetchers` | Google | 1096 |
96
+ | `google-user-triggered-fetchers-google` | Google | 504 |
97
+ | `microsoft-bingbot` | Microsoft | 29 |
98
+ | `mistral-user` | Mistral AI | 4 |
99
+ | `openai-chatgpt-user` | OpenAI | 367 |
100
+ | `openai-gptbot` | OpenAI | 18 |
101
+ | `openai-searchbot` | OpenAI | 39 |
102
+ | `perplexity-perplexitybot` | Perplexity | 21 |
103
+ | `perplexity-user` | Perplexity | 10 |
104
+
105
+ Ids never change, so file paths stay stable. Every list is downloaded from the operator's own published URL; nothing is collected or guessed.
106
+
107
+ ## Freshness
108
+
109
+ A GitHub Action downloads every list each Monday. When one changes, it opens a pull request, and a patch release follows. IP lists change rarely, but they do change, so update this package regularly, or use [trustbot](https://www.npmjs.com/package/trustbot), which refreshes them at runtime.
110
+
111
+ ## License
112
+
113
+ MIT © CK Giri. The IP ranges are published by their operators.