aiblocklist 1.0.0__tar.gz
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.
- aiblocklist-1.0.0/LICENSE +21 -0
- aiblocklist-1.0.0/MANIFEST.in +2 -0
- aiblocklist-1.0.0/PKG-INFO +401 -0
- aiblocklist-1.0.0/README.md +365 -0
- aiblocklist-1.0.0/aiblocklist/__init__.py +42 -0
- aiblocklist-1.0.0/aiblocklist/__main__.py +36 -0
- aiblocklist-1.0.0/aiblocklist/client.py +330 -0
- aiblocklist-1.0.0/aiblocklist.egg-info/PKG-INFO +401 -0
- aiblocklist-1.0.0/aiblocklist.egg-info/SOURCES.txt +12 -0
- aiblocklist-1.0.0/aiblocklist.egg-info/dependency_links.txt +1 -0
- aiblocklist-1.0.0/aiblocklist.egg-info/requires.txt +1 -0
- aiblocklist-1.0.0/aiblocklist.egg-info/top_level.txt +1 -0
- aiblocklist-1.0.0/setup.cfg +4 -0
- aiblocklist-1.0.0/setup.py +52 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alpha Quantum
|
|
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.
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aiblocklist
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: AI blocklist client: classify any domain as an AI tool (20,000+ domains, 18 categories, daily refresh, vendor training-on-your-data verdicts) and download the feed database for DNS sinkholes, proxies, firewalls and SOAR playbooks.
|
|
5
|
+
Home-page: https://www.aitoolsblocklist.com
|
|
6
|
+
Author: Alpha Quantum
|
|
7
|
+
Author-email: info@alpha-quantum.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Homepage, https://www.aitoolsblocklist.com
|
|
10
|
+
Project-URL: Documentation, https://www.aitoolsblocklist.com/ai-blocklist-api.php
|
|
11
|
+
Project-URL: Source, https://github.com/explainableaixai/aiblocklist
|
|
12
|
+
Project-URL: Tracker, https://www.aitoolsblocklist.com/contact.php
|
|
13
|
+
Project-URL: AI Tools Blocklist, https://www.aitoolsblocklist.com
|
|
14
|
+
Project-URL: AI Agent Allow List, https://www.aiagentallowlist.com
|
|
15
|
+
Project-URL: Shadow AI Tools, https://www.shadowaitools.com
|
|
16
|
+
Keywords: ai blocklist,ai tools blocklist,block ai tools,shadow ai,dns sinkhole,external dynamic list,web filtering,secure web gateway,dlp,acceptable use policy,generative ai,ai governance,domain classification,training on your data
|
|
17
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
18
|
+
Classifier: Intended Audience :: Developers
|
|
19
|
+
Classifier: Intended Audience :: Information Technology
|
|
20
|
+
Classifier: Intended Audience :: System Administrators
|
|
21
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
22
|
+
Classifier: Programming Language :: Python :: 3
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
29
|
+
Classifier: Topic :: Internet :: Proxy Servers
|
|
30
|
+
Classifier: Topic :: Security
|
|
31
|
+
Classifier: Topic :: System :: Networking :: Firewalls
|
|
32
|
+
Requires-Python: >=3.7
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
License-File: LICENSE
|
|
35
|
+
Requires-Dist: requests>=2.20.0
|
|
36
|
+
|
|
37
|
+
# aiblocklist
|
|
38
|
+
|
|
39
|
+
Python client for the AI Tools Blocklist API, a database of [classified AI tool domains](https://www.aitoolsblocklist.com) built for the teams that run proxies, DNS resolvers, DLP pipelines and security automation. One call classifies a domain; one download gives you the whole list for local matching.
|
|
40
|
+
|
|
41
|
+
What each record carries:
|
|
42
|
+
|
|
43
|
+
- 20,000+ AI-tool domains in 18 functional categories with subcategories, multi-label, rebuilt daily
|
|
44
|
+
- an AI type: `ai_native` for tools that are the AI, `ai_enabled` for products with an AI feature inside
|
|
45
|
+
- the vendor's data-use position: trains on input, opt-out available, enterprise tier exempt, API tier exempt, and the date the terms were checked
|
|
46
|
+
- for feed and database plans, the full CSV plus hosted EDL, PAC, hosts and DNS feeds
|
|
47
|
+
|
|
48
|
+
Only `requests` is required. Python 3.7 and newer.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install aiblocklist
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Quick start
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
from aiblocklist import AIBlocklistClient
|
|
62
|
+
|
|
63
|
+
client = AIBlocklistClient("YOUR_API_KEY")
|
|
64
|
+
|
|
65
|
+
r = client.check("chatgpt.com")
|
|
66
|
+
r.blocked # True
|
|
67
|
+
r.primary_category # "Text & Language"
|
|
68
|
+
r.ai_type # "ai_native"
|
|
69
|
+
r.category_names # ["Text & Language"]
|
|
70
|
+
r.subcategory_names # ["General assistants & chatbots"]
|
|
71
|
+
r.trains_on_data # "opt_out_default"
|
|
72
|
+
r.terms_checked # "2026-09-17"
|
|
73
|
+
r.quota_remaining # lookups left in the current 30-day cycle
|
|
74
|
+
|
|
75
|
+
client.check("example.com").blocked # False
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`check()` returns a `Lookup`, a `dict` subclass with the raw JSON and convenience properties, so `r["blocked"]` and `r.blocked` are the same value. The key comes from the account area at aitoolsblocklist.com and is sent as `X-API-Key`. Public methods (`stats()`, `categories()`, `clause()`) work without a key.
|
|
79
|
+
|
|
80
|
+
From the command line:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
export ATB_API_KEY=YOUR_API_KEY
|
|
84
|
+
python -m aiblocklist chatgpt.com midjourney.com example.com
|
|
85
|
+
python -m aiblocklist --stats
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Methods
|
|
89
|
+
|
|
90
|
+
| Method | Endpoint | Key | Returns |
|
|
91
|
+
|---|---|---|---|
|
|
92
|
+
| `check(domain)` | `GET /api/check?domain=` | yes | `Lookup` |
|
|
93
|
+
| `is_blocked(domain)` | same | yes | `bool` |
|
|
94
|
+
| `check_many(domains, pause=0)` | same, sequential, deduplicated | yes | `list[Lookup]` |
|
|
95
|
+
| `data_use(domain)` | same | yes | dict of the five data-use fields |
|
|
96
|
+
| `feeds.status()` | `GET /api/database/?action=status` | feed or database plan | plan and file state |
|
|
97
|
+
| `feeds.database_info()` | `GET /api/database/?action=database_info` | feed or database plan | file name, timestamp, size |
|
|
98
|
+
| `feeds.download_database(path)` | `GET /api/database/?action=download_database` | feed or database plan | `{"file", "bytes"}` |
|
|
99
|
+
| `feeds.download_categories(path)` | `GET /api/database/?action=download_categories` | feed or database plan | `{"file", "bytes"}` |
|
|
100
|
+
| `stats()` | `GET /api/stats.php` | no | totals and 18 categories with counts |
|
|
101
|
+
| `categories()` | same | no | the category list |
|
|
102
|
+
| `clause(domain, field)` | `GET /api/data-use-clause.php` | no | `{"clause", "url"}` or `None` |
|
|
103
|
+
|
|
104
|
+
Pass a bare domain or any URL; `clean_domain()` strips scheme, path, port, credentials and a leading `www.`. Subdomains resolve to the registrable domain on the server.
|
|
105
|
+
|
|
106
|
+
## The response, field by field
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"domain": "chatgpt.com",
|
|
111
|
+
"blocked": true,
|
|
112
|
+
"primary_category": "Text & Language",
|
|
113
|
+
"ai_type": "ai_native",
|
|
114
|
+
"categories": [{"category": "Text & Language", "subcategory": "General assistants & chatbots"}],
|
|
115
|
+
"trains_on_data": "opt_out_default",
|
|
116
|
+
"opt_out_available": "yes",
|
|
117
|
+
"enterprise_no_training": "yes",
|
|
118
|
+
"api_no_training": "yes",
|
|
119
|
+
"terms_checked": "2026-09-17",
|
|
120
|
+
"quota_remaining": 9999986
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
| Field | Values |
|
|
125
|
+
|---|---|
|
|
126
|
+
| `blocked` | `true` when the domain is a known AI tool, otherwise `false` with an empty `categories` list |
|
|
127
|
+
| `primary_category` | one of the 18 categories |
|
|
128
|
+
| `ai_type` | `ai_native` or `ai_enabled` |
|
|
129
|
+
| `categories` | every category and subcategory the tool belongs to |
|
|
130
|
+
| `trains_on_data` | `yes`, `no`, `opt_out_default`, `unstated` |
|
|
131
|
+
| `opt_out_available` | `yes`, `no`, `unstated` |
|
|
132
|
+
| `enterprise_no_training` | `yes`, `no`, `unstated` |
|
|
133
|
+
| `api_no_training` | `yes`, `no`, `unstated` |
|
|
134
|
+
| `terms_checked` | ISO date the vendor terms were last read |
|
|
135
|
+
| `quota_remaining` | lookups left on the plan |
|
|
136
|
+
|
|
137
|
+
Both found and not-found are HTTP 200. Errors are raised as exceptions (see below).
|
|
138
|
+
|
|
139
|
+
## Worked examples
|
|
140
|
+
|
|
141
|
+
### 1. FastAPI middleware for an internal egress service
|
|
142
|
+
|
|
143
|
+
An internal HTTP egress service (or any FastAPI app that proxies outbound requests) checks the destination host once, keeps the verdict for a day, and enforces a category policy. Assistants that train on input by default are allowed only with a header that the DLP layer downstream can key on.
|
|
144
|
+
|
|
145
|
+
```python
|
|
146
|
+
import time
|
|
147
|
+
from fastapi import FastAPI, Request
|
|
148
|
+
from fastapi.responses import JSONResponse
|
|
149
|
+
from aiblocklist import AIBlocklistClient, AIBlocklistError
|
|
150
|
+
|
|
151
|
+
app = FastAPI()
|
|
152
|
+
client = AIBlocklistClient("YOUR_API_KEY")
|
|
153
|
+
cache = {} # host -> (verdict, expires)
|
|
154
|
+
TTL = 86400
|
|
155
|
+
BLOCK = {"Image & Visual", "Audio & Voice", "Companions & Social"}
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def verdict_for(host: str) -> str:
|
|
159
|
+
now = time.time()
|
|
160
|
+
hit = cache.get(host)
|
|
161
|
+
if hit and hit[1] > now:
|
|
162
|
+
return hit[0]
|
|
163
|
+
try:
|
|
164
|
+
r = client.check(host)
|
|
165
|
+
except AIBlocklistError:
|
|
166
|
+
return "allow" # fail open on API trouble, log it
|
|
167
|
+
verdict = "allow"
|
|
168
|
+
if r.blocked:
|
|
169
|
+
if BLOCK & set(r.category_names):
|
|
170
|
+
verdict = "block"
|
|
171
|
+
elif r.trains_on_data in ("yes", "opt_out_default"):
|
|
172
|
+
verdict = "warn"
|
|
173
|
+
cache[host] = (verdict, now + TTL)
|
|
174
|
+
return verdict
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
@app.middleware("http")
|
|
178
|
+
async def ai_policy(request: Request, call_next):
|
|
179
|
+
host = request.headers.get("x-target-host", "")
|
|
180
|
+
v = verdict_for(host) if host else "allow"
|
|
181
|
+
if v == "block":
|
|
182
|
+
return JSONResponse({"error": "AI tool blocked by policy", "host": host}, status_code=403)
|
|
183
|
+
response = await call_next(request)
|
|
184
|
+
if v == "warn":
|
|
185
|
+
response.headers["X-AI-Policy"] = "trains-on-input"
|
|
186
|
+
return response
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
The same shape works as a Flask `before_request` hook. With a one-day cache, a gateway that sees a few thousand distinct hosts uses a few thousand lookups a month.
|
|
190
|
+
|
|
191
|
+
### 2. Classifying a proxy export with pandas
|
|
192
|
+
|
|
193
|
+
Take the unique hosts from a proxy or DNS export, classify them, and produce a table of AI tools with their categories and training terms. `check_many()` deduplicates, so the cost is one lookup per unique host.
|
|
194
|
+
|
|
195
|
+
```python
|
|
196
|
+
import pandas as pd
|
|
197
|
+
from aiblocklist import AIBlocklistClient
|
|
198
|
+
|
|
199
|
+
client = AIBlocklistClient("YOUR_API_KEY")
|
|
200
|
+
|
|
201
|
+
log = pd.read_csv("proxy_export.csv") # columns: timestamp, user, host, bytes
|
|
202
|
+
hosts = log["host"].dropna().unique().tolist()
|
|
203
|
+
|
|
204
|
+
results = client.check_many(hosts, pause=0.05)
|
|
205
|
+
found = pd.DataFrame([
|
|
206
|
+
{
|
|
207
|
+
"domain": r.domain,
|
|
208
|
+
"primary_category": r.primary_category,
|
|
209
|
+
"subcategories": "; ".join(r.subcategory_names),
|
|
210
|
+
"ai_type": r.ai_type,
|
|
211
|
+
"trains_on_data": r.trains_on_data,
|
|
212
|
+
"enterprise_no_training": r["enterprise_no_training"],
|
|
213
|
+
"terms_checked": r.terms_checked,
|
|
214
|
+
}
|
|
215
|
+
for r in results if r.blocked
|
|
216
|
+
])
|
|
217
|
+
|
|
218
|
+
# join back to users so the report says who reached what
|
|
219
|
+
usage = log.merge(found, left_on="host", right_on="domain")
|
|
220
|
+
summary = usage.groupby(["domain", "primary_category", "trains_on_data"])["user"].nunique()
|
|
221
|
+
print(summary.sort_values(ascending=False).head(25))
|
|
222
|
+
found.to_csv("ai_tools_found.csv", index=False)
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
For exports with hundreds of thousands of lines, the hosted [shadow AI inventory](https://www.shadowaitools.com) service does this with per-user breakdowns, sanctioned lists and a PDF evidence pack, without writing the join yourself.
|
|
226
|
+
|
|
227
|
+
### 3. A nightly feed refresh for a DNS resolver
|
|
228
|
+
|
|
229
|
+
Feed and database plans download the full CSV. This cron job fetches it, keeps only the categories the organisation blocks, and writes an Unbound local-zone file. Swap the output format for dnsmasq, a hosts file or a firewall EDL as needed.
|
|
230
|
+
|
|
231
|
+
```python
|
|
232
|
+
#!/usr/bin/env python3
|
|
233
|
+
import csv, os, subprocess
|
|
234
|
+
from aiblocklist import AIBlocklistClient, PlanError
|
|
235
|
+
|
|
236
|
+
client = AIBlocklistClient(os.environ["ATB_API_KEY"])
|
|
237
|
+
BLOCK = {"Image & Visual", "Audio & Voice", "Companions & Social", "Agents & Automation"}
|
|
238
|
+
CSV_PATH = "/var/lib/aiblocklist/ai_tools_full.csv"
|
|
239
|
+
ZONE_TMP = "/etc/unbound/unbound.conf.d/ai-block.conf.tmp"
|
|
240
|
+
ZONE = "/etc/unbound/unbound.conf.d/ai-block.conf"
|
|
241
|
+
|
|
242
|
+
try:
|
|
243
|
+
info = client.feeds.database_info()
|
|
244
|
+
except PlanError as exc:
|
|
245
|
+
raise SystemExit("this key is lookup-only: %s" % exc.body.get("plan"))
|
|
246
|
+
|
|
247
|
+
print("database %s updated %s (%s)" % (info["database_file"], info["last_updated"], info["file_size_human"]))
|
|
248
|
+
client.feeds.download_database(CSV_PATH)
|
|
249
|
+
|
|
250
|
+
n = 0
|
|
251
|
+
with open(CSV_PATH, newline="", encoding="utf-8") as src, open(ZONE_TMP, "w") as out:
|
|
252
|
+
out.write("server:\n")
|
|
253
|
+
for row in csv.DictReader(src):
|
|
254
|
+
if row.get("primary_category") in BLOCK:
|
|
255
|
+
out.write(' local-zone: "%s." always_nxdomain\n' % row["domain"])
|
|
256
|
+
n += 1
|
|
257
|
+
os.replace(ZONE_TMP, ZONE)
|
|
258
|
+
subprocess.run(["unbound-control", "reload"], check=False)
|
|
259
|
+
print("%d domains sinkholed" % n)
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
30 5 * * * /usr/bin/python3 /opt/aiblocklist/refresh_zone.py >> /var/log/aiblocklist.log 2>&1
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### 4. Citing the vendor's own terms
|
|
267
|
+
|
|
268
|
+
`clause()` returns the verbatim sentence behind a public data-use field with the URL it came from, which is what an approval ticket or a policy exception needs.
|
|
269
|
+
|
|
270
|
+
```python
|
|
271
|
+
c = client.clause("chatgpt.com", "trains_consumer_default")
|
|
272
|
+
if c:
|
|
273
|
+
print(c["clause"])
|
|
274
|
+
print(c["url"])
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Fields: `trains_consumer_default`, `optout_available`, `enterprise_no_training`, `api_no_training`.
|
|
278
|
+
|
|
279
|
+
## Error handling
|
|
280
|
+
|
|
281
|
+
```python
|
|
282
|
+
from aiblocklist import (
|
|
283
|
+
AIBlocklistError, AuthenticationError, QuotaError, PlanError,
|
|
284
|
+
BadRequestError, NotFoundError, ServiceUnavailableError,
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
try:
|
|
288
|
+
r = client.check("notion.so")
|
|
289
|
+
except AuthenticationError: # 401: no key or unknown key
|
|
290
|
+
...
|
|
291
|
+
except QuotaError as exc: # 403: inactive account or quota exhausted
|
|
292
|
+
print(exc.status, exc.body)
|
|
293
|
+
except ServiceUnavailableError: # 503 after retries
|
|
294
|
+
...
|
|
295
|
+
except AIBlocklistError: # anything else, including network failures
|
|
296
|
+
...
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
| Exception | HTTP | Meaning |
|
|
300
|
+
|---|---|---|
|
|
301
|
+
| `BadRequestError` | 400 | empty domain, or an unknown clause field |
|
|
302
|
+
| `AuthenticationError` | 401 | no key, or a key that matches no account |
|
|
303
|
+
| `QuotaError` | 403 | inactive account or monthly quota exhausted |
|
|
304
|
+
| `PlanError` | 403 | database endpoints on a lookup-only plan; `body["plan"]` names it |
|
|
305
|
+
| `NotFoundError` | 404 | database file not available for the account |
|
|
306
|
+
| `ServiceUnavailableError` | 503 | lookup service busy; retried `max_retries` times first |
|
|
307
|
+
|
|
308
|
+
The client is a context manager, so the HTTP session closes cleanly:
|
|
309
|
+
|
|
310
|
+
```python
|
|
311
|
+
with AIBlocklistClient("YOUR_API_KEY") as client:
|
|
312
|
+
print(client.stats()["total_tools"])
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## Configuration
|
|
316
|
+
|
|
317
|
+
```python
|
|
318
|
+
client = AIBlocklistClient(
|
|
319
|
+
api_key="YOUR_API_KEY",
|
|
320
|
+
base_url="https://www.aitoolsblocklist.com", # default
|
|
321
|
+
timeout=30, # seconds; downloads use at least 300
|
|
322
|
+
max_retries=2, # on 503 and network errors
|
|
323
|
+
)
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Keep the key out of source: read it from an environment variable or a secrets manager and pass it to the constructor. The command line entry reads `ATB_API_KEY` for that reason. Lookups are metered per call, so cache verdicts in your own process or datastore for a day; the list is rebuilt daily and a shorter cache buys nothing. Downloads are streamed to disk in 64 KB chunks, so a full database file never sits in memory.
|
|
327
|
+
|
|
328
|
+
## Why a classified AI tool list belongs in the security stack
|
|
329
|
+
|
|
330
|
+
The risk in AI tool usage is not the tool, it is the input. A contract pasted into a summariser, a customer list dropped into a spreadsheet assistant, a repository fed to a code explainer: each is an outbound request to a hostname, and the hostname is the only thing every control point on the network can see without an agent or TLS inspection. Classifying that hostname is the step that turns a policy into an enforceable rule.
|
|
331
|
+
|
|
332
|
+
### Data loss prevention needs the destination, not just the content
|
|
333
|
+
|
|
334
|
+
[Data loss prevention](https://en.wikipedia.org/wiki/Data_loss_prevention_software) systems inspect what leaves. They cannot decide whether leaving is acceptable without knowing where it is going and what the recipient does with it. The [AI tool classification database](https://www.aitoolsblocklist.com) supplies both: the functional category of the destination and the vendor's own position on training, opt-out and enterprise exemptions. A DLP rule that says "block source code to AI assistants that train on input" is expressible only with that data.
|
|
335
|
+
|
|
336
|
+
### Frameworks ask for an inventory first
|
|
337
|
+
|
|
338
|
+
The [NIST AI Risk Management Framework](https://www.nist.gov/itl/ai-risk-management-framework) starts its Map function with knowing which AI systems are in use and which third parties receive data. The [ENISA](https://www.enisa.europa.eu/) guidance on AI cybersecurity takes the same order: identify, then govern. Under the [EU AI Act](https://eur-lex.europa.eu/eli/reg/2024/1689/oj), deployers carry obligations that depend on knowing which systems staff use. None of this is possible from a survey; it is possible from network evidence joined to a classified list.
|
|
339
|
+
|
|
340
|
+
### Prompt-borne exposure is a recognised risk class
|
|
341
|
+
|
|
342
|
+
The [OWASP Top 10 for LLM Applications](https://owasp.org/www-project-top-10-for-large-language-model-applications/) lists sensitive information disclosure among its leading risks. For an organisation that does not build LLM applications but whose staff use hundreds of them, the mitigation is at the network edge: know which destinations are AI tools, permit the ones whose terms are acceptable, and block or warn on the rest. Categories and subcategories make that policy fine-grained; the daily rebuild keeps it current as tools launch.
|
|
343
|
+
|
|
344
|
+
## Neighbouring products
|
|
345
|
+
|
|
346
|
+
This package governs what people reach. What an organisation's own AI agents may open on the web is the reverse question, answered by the [AI agent allow list](https://www.aiagentallowlist.com): verified page-type URLs for 40 million+ domains, up to 28 types per domain, and a per-URL allow or deny verdict so a browsing agent can read documentation and pricing while staying off login, checkout and upload pages. Its client is `aiagentallowlist`. Together the two give a [per-URL policy for browsing agents](https://www.aiagentallowlist.com) and a per-domain policy for staff.
|
|
347
|
+
|
|
348
|
+
Before either policy is written, most teams want to [find the AI tools employees use](https://www.shadowaitools.com) today. That service takes a DNS, proxy or firewall export, matches it against this same list, and returns the tools found with categories, risk flags, training verdicts, a per-user breakdown and a dated CSV and PDF.
|
|
349
|
+
|
|
350
|
+
## Frequently asked questions
|
|
351
|
+
|
|
352
|
+
**What is the AI Tools Blocklist?**
|
|
353
|
+
A daily-refreshed database of 20,000+ AI-tool domains classified into 18 functional categories with subcategories, with the vendor's data-use terms attached to each record. It is delivered as a lookup API, as downloadable CSV and JSON, and as hosted feeds in EDL, PAC, hosts and DNS formats from [aitoolsblocklist.com](https://www.aitoolsblocklist.com).
|
|
354
|
+
|
|
355
|
+
**How do I check whether a domain is an AI tool in Python?**
|
|
356
|
+
`pip install aiblocklist`, then `AIBlocklistClient("YOUR_API_KEY").check("domain.com").blocked`. The same `Lookup` object carries the category, subcategories, AI type and the five data-use fields.
|
|
357
|
+
|
|
358
|
+
**How do I find out whether an AI vendor trains on my data?**
|
|
359
|
+
`client.data_use("domain.com")` returns `trains_on_data`, `opt_out_available`, `enterprise_no_training`, `api_no_training` and `terms_checked`. `client.clause("domain.com", "trains_consumer_default")` returns the verbatim clause with its URL.
|
|
360
|
+
|
|
361
|
+
**Can I download the whole list?**
|
|
362
|
+
Feed and database plans can: `client.feeds.download_database(path)` streams the CSV, `download_categories(path)` the category tree. The Lookup API plan is lookup-only and receives a `PlanError` on those calls.
|
|
363
|
+
|
|
364
|
+
**Is there a bulk endpoint?**
|
|
365
|
+
No. `check_many()` runs sequential lookups, deduplicated, with an optional pause. For large lists, download the database once and match locally.
|
|
366
|
+
|
|
367
|
+
**How current is the list?**
|
|
368
|
+
Rebuilt daily. `client.stats()` shows the live totals; `client.feeds.database_info()` shows the timestamp of your file.
|
|
369
|
+
|
|
370
|
+
**Does the list work with schools and CIPA filtering?**
|
|
371
|
+
Yes. Districts use the categories to allow approved tutors while blocking essay generators, deepfake tools and companion chatbots, alongside the general filtering database at [cipawebfiltering.com](https://www.cipawebfiltering.com).
|
|
372
|
+
|
|
373
|
+
**Who builds it?**
|
|
374
|
+
Alpha Quantum, also behind the [website categorization API](https://www.websitecategorizationapi.com), the [web filtering database](https://www.webfilteringdatabase.com), the [AI agent allow list](https://www.aiagentallowlist.com) and the [shadow AI inventory](https://www.shadowaitools.com) service.
|
|
375
|
+
|
|
376
|
+
## Related packages
|
|
377
|
+
|
|
378
|
+
- [`aiblocklist` on npm](https://www.npmjs.com/package/aiblocklist), the Node.js version of this client
|
|
379
|
+
- [`aitoolsblocklist`](https://pypi.org/project/aitoolsblocklist/) on PyPI and [on npm](https://www.npmjs.com/package/aitoolsblocklist), the original AI Tools Blocklist client
|
|
380
|
+
- [`shadowaitools`](https://pypi.org/project/shadowaitools/) on PyPI and [on npm](https://www.npmjs.com/package/shadowaitools), local log scanner for shadow AI tools
|
|
381
|
+
- [`aiagentallowlist`](https://pypi.org/project/aiagentallowlist/) on PyPI and [on npm](https://www.npmjs.com/package/aiagentallowlist), client for the AI agent allow list
|
|
382
|
+
- [`phishingdetectionapi`](https://pypi.org/project/phishingdetectionapi/) on PyPI and [on npm](https://www.npmjs.com/package/phishingdetectionapi), from [phishingdetectionapi.com](https://www.phishingdetectionapi.com)
|
|
383
|
+
- [`webfilteringdatabase`](https://www.npmjs.com/package/webfilteringdatabase) on npm, from [webfilteringdatabase.com](https://www.webfilteringdatabase.com)
|
|
384
|
+
- [`websiteclassificationapi`](https://pypi.org/project/websiteclassificationapi/) on PyPI and [`websitecategorization`](https://www.npmjs.com/package/websitecategorization) on npm, from [websitecategorizationapi.com](https://www.websitecategorizationapi.com)
|
|
385
|
+
- [`cipawebfiltering`](https://pypi.org/project/cipawebfiltering/) on PyPI and [on npm](https://www.npmjs.com/package/cipawebfiltering)
|
|
386
|
+
- [PII detection API](https://www.piidetectionapi.com) for prompts and DLP logs
|
|
387
|
+
|
|
388
|
+
Source: [github.com/explainableaixai/aiblocklist](https://github.com/explainableaixai/aiblocklist), mirror at [gitlab.com/url-classifications/aiblocklist](https://gitlab.com/url-classifications/aiblocklist).
|
|
389
|
+
|
|
390
|
+
## Links
|
|
391
|
+
|
|
392
|
+
- Product, plans and feeds: [https://www.aitoolsblocklist.com](https://www.aitoolsblocklist.com)
|
|
393
|
+
- NIST AI Risk Management Framework: [https://www.nist.gov/itl/ai-risk-management-framework](https://www.nist.gov/itl/ai-risk-management-framework)
|
|
394
|
+
- OWASP Top 10 for LLM Applications: [https://owasp.org/www-project-top-10-for-large-language-model-applications/](https://owasp.org/www-project-top-10-for-large-language-model-applications/)
|
|
395
|
+
- ENISA: [https://www.enisa.europa.eu/](https://www.enisa.europa.eu/)
|
|
396
|
+
- EU AI Act, Regulation (EU) 2024/1689: [https://eur-lex.europa.eu/eli/reg/2024/1689/oj](https://eur-lex.europa.eu/eli/reg/2024/1689/oj)
|
|
397
|
+
- Data loss prevention software: [https://en.wikipedia.org/wiki/Data_loss_prevention_software](https://en.wikipedia.org/wiki/Data_loss_prevention_software)
|
|
398
|
+
|
|
399
|
+
## License
|
|
400
|
+
|
|
401
|
+
MIT
|