websiteclassificationapi 2.15__tar.gz → 2.15.2__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.
- {websiteclassificationapi-2.15 → websiteclassificationapi-2.15.2}/PKG-INFO +27 -6
- websiteclassificationapi-2.15/websiteclassificationapi.egg-info/PKG-INFO → websiteclassificationapi-2.15.2/README.md +21 -23
- {websiteclassificationapi-2.15 → websiteclassificationapi-2.15.2}/setup.py +6 -2
- {websiteclassificationapi-2.15 → websiteclassificationapi-2.15.2}/test/__init__.py +61 -61
- {websiteclassificationapi-2.15 → websiteclassificationapi-2.15.2}/websiteclassificationapi/__init__.py +61 -61
- websiteclassificationapi-2.15/README.md → websiteclassificationapi-2.15.2/websiteclassificationapi.egg-info/PKG-INFO +44 -4
- {websiteclassificationapi-2.15 → websiteclassificationapi-2.15.2}/LICENSE +0 -0
- {websiteclassificationapi-2.15 → websiteclassificationapi-2.15.2}/setup.cfg +0 -0
- {websiteclassificationapi-2.15 → websiteclassificationapi-2.15.2}/websiteclassificationapi.egg-info/SOURCES.txt +0 -0
- {websiteclassificationapi-2.15 → websiteclassificationapi-2.15.2}/websiteclassificationapi.egg-info/dependency_links.txt +0 -0
- {websiteclassificationapi-2.15 → websiteclassificationapi-2.15.2}/websiteclassificationapi.egg-info/top_level.txt +0 -0
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: websiteclassificationapi
|
|
3
|
-
Version: 2.15
|
|
3
|
+
Version: 2.15.2
|
|
4
4
|
Summary: Website classification API
|
|
5
|
-
Home-page: https://
|
|
5
|
+
Home-page: https://www.websitecategorizationapi.com
|
|
6
6
|
Author-email: info@websitecategorizationapi.com
|
|
7
7
|
Project-URL: Homepage, https://www.websitecategorizationapi.com
|
|
8
|
+
Project-URL: Source, https://github.com/explainableaixai/websitecategorizationapi
|
|
9
|
+
Project-URL: AI Agent Allow List, https://www.aiagentallowlist.com
|
|
10
|
+
Project-URL: Shadow AI Tools, https://www.shadowaitools.com
|
|
8
11
|
Project-URL: AI Tools Blocklist, https://www.aitoolsblocklist.com
|
|
12
|
+
Project-URL: Resume Reader API, http://resumereaderapi.com
|
|
9
13
|
Keywords: website categorization,classification,categorization
|
|
10
14
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
15
|
Classifier: Environment :: GPU :: NVIDIA CUDA :: 11.3
|
|
@@ -120,13 +124,13 @@ Having verticals set up may also mean better filtering and lead to higher conver
|
|
|
120
124
|
|
|
121
125
|
## Our other services
|
|
122
126
|
|
|
123
|
-
Companies that manage internet access often start with a [web filtering database](https://webfilteringdatabase.com) to review how domains are categorized. This supports better decisions around policy cr
|
|
124
|
-
eation, reporting, and risk visibility. Many of those teams also evaluate a [web filtering service](https://webfilteringservice.com) to apply those controls in production.
|
|
127
|
+
Companies that manage internet access often start with a [web filtering database](https://www.webfilteringdatabase.com) to review how domains are categorized. This supports better decisions around policy cr
|
|
128
|
+
eation, reporting, and risk visibility. Many of those teams also evaluate a [web filtering service](https://www.webfilteringservice.com) to apply those controls in production.
|
|
125
129
|
|
|
126
130
|
|
|
127
131
|
We also provide an [Anonymization API](https://www.anonymizationapi.com) for privacy-preserving media and data workflows.
|
|
128
132
|
|
|
129
|
-
Schools and libraries subject to the Children's Internet Protection Act need more than generic web categories
|
|
133
|
+
Schools and libraries subject to the Children's Internet Protection Act need more than generic web categories, they need a purpose-built [CIPA web filtering](https://www.cipawebfiltering.com) database with 120 million domains organized into 57+ content categories aligned to federal compliance requirements. Pairing categorization with threat intelligence strengthens any filtering deployment, and our [phishing detection API](https://www.phishingdetectionapi.com) delivers real-time lookups against 390,000+ DNS-verified active phishing domains so that malicious URLs are blocked before they reach end users. Together, these services give IT teams the classification depth and security coverage needed to protect students, staff, and network infrastructure.
|
|
130
134
|
|
|
131
135
|
## AI explainability
|
|
132
136
|
|
|
@@ -183,7 +187,7 @@ Our digital solutions are trusted by organizations seeking reliable, secure, and
|
|
|
183
187
|
|
|
184
188
|
Business growth is supported through our [corporate enrichment data](https://www.companydataapi.com), delivering actionable intelligence much like the work at [Cambridge](https://www.cam.ac.uk). For cybersecurity and research teams, our [domain dataset](https://www.urlcategorizationdatabase.com) offers extensive categorization, paralleling the data-centric methods at [Berkeley](https://www.berkeley.edu).
|
|
185
189
|
|
|
186
|
-
By aligning our solutions with the excellence demonstrated at [Yale](https://www.yale.edu) and [Cornell](https://www.cornell.edu), we ensure that your organization stays at the cutting edge
|
|
190
|
+
By aligning our solutions with the excellence demonstrated at [Yale](https://www.yale.edu) and [Cornell](https://www.cornell.edu), we ensure that your organization stays at the cutting edge, combining technology, research, and practical results for every challenge.
|
|
187
191
|
|
|
188
192
|
|
|
189
193
|
## Example classifications
|
|
@@ -318,6 +322,10 @@ Example classification for website www.github.com:
|
|
|
318
322
|
|
|
319
323
|
For teams building acceptable-use or data-loss-prevention policies around generative AI, the [AI Tools Blocklist](https://www.aitoolsblocklist.com) complements this classifier with a purpose-built feed of AI-tool domains grouped into functional categories (chatbots, code assistants, media generators, voice cloning, and more). It answers a question generic categorization cannot: not just "is this site AI-related," but "which kind of AI tool is it," which is what granular blocking policies require.
|
|
320
324
|
|
|
325
|
+
Website classification at massive scale also applies to discovering acquisition candidates across the full web. Our [web-scale deal origination platform](https://www.acquisitionuniverse.com) screens over 100 million classified domains against buyer acquisition theses, extracting 15 operational signals per company from their public web presence. Private equity firms, search funds, and corporate development teams use the pipeline to surface non-obvious targets whose websites reveal strong fit signals, leadership depth, recurring revenue indicators, compliance readiness, that conventional company databases never capture.
|
|
326
|
+
|
|
327
|
+
The same classification engine powers contextual audience segments for programmatic advertising without cookies. Our [cookieless advertising data platform](https://www.cookielessaudiences.com) delivers domain datasets pre-categorized under the IAB content taxonomy, enabling DSPs and publishers to target audiences based on page context rather than user-level tracking. With Chrome, Safari, and Firefox deprecating third-party cookies, domain-level contextual classification is becoming the primary signal for brand-safe, regulation-compliant ad placement at scale.
|
|
328
|
+
|
|
321
329
|
## Useful resources used in development of website categorization
|
|
322
330
|
|
|
323
331
|
- [Tensorflow](https://www.tensorflow.org/)
|
|
@@ -332,3 +340,16 @@ For teams building acceptable-use or data-loss-prevention policies around genera
|
|
|
332
340
|
|
|
333
341
|
- [Top shopify stores](https://www.leadsquantum.com)
|
|
334
342
|
- [AI Tools Blocklist](https://www.aitoolsblocklist.com)
|
|
343
|
+
- [CV parser](http://resumereaderapi.com), AI resume parsing API that turns PDF/DOCX resumes into structured JSON
|
|
344
|
+
|
|
345
|
+
Classifying scraped or user-submitted pages means ingesting text you don't control, and that text regularly contains names, emails, and phone numbers. A [PII detection API](https://www.piidetectionapi.com) can flag and mask personal data in each document before classification results and source text are persisted. Teams subject to GDPR use automated [PII masking](https://www.piidetectionapi.com) as the standard pre-processing step for any external text pipeline.
|
|
346
|
+
|
|
347
|
+
Classifying a website answers what it is; agent deployments also need to know where its sensitive surfaces live. An [AI agent allowlist](https://www.aiagentallowlist.com) enriches every domain with verified URLs for 28 page types, letting policy engines allow research pages while denying credential and transaction surfaces. Classification plus [page-level agent policy](https://www.aiagentallowlist.com) is becoming the standard pairing for safe autonomous browsing.
|
|
348
|
+
|
|
349
|
+
## Related packages on PyPI and npm
|
|
350
|
+
|
|
351
|
+
- [aiblocklist](https://pypi.org/project/aiblocklist/) (also on [npm](https://www.npmjs.com/package/aiblocklist)): Python client for the [AI tools blocklist](https://www.aitoolsblocklist.com), 20,000+ AI-tool domains in 18 functional categories, daily refresh, feed downloads for DNS and firewall enforcement.
|
|
352
|
+
- [shadowaitools](https://pypi.org/project/shadowaitools/) (also on [npm](https://www.npmjs.com/package/shadowaitools)): a command-line tool that reads a DNS, proxy or firewall export and lists the AI tools in it; the hosted audit at [shadowaitools.com](https://www.shadowaitools.com) adds the per-user view, training verdicts and the PDF evidence pack.
|
|
353
|
+
- [aiagentallowlist](https://pypi.org/project/aiagentallowlist/) (also on [npm](https://www.npmjs.com/package/aiagentallowlist)): the [AI agent allow list](https://www.aiagentallowlist.com) client, verified page-type URLs and per-URL verdicts across 40 million+ domains for web-browsing agents.
|
|
354
|
+
- [phishingdetectionapi](https://pypi.org/project/phishingdetectionapi/), [cipawebfiltering](https://pypi.org/project/cipawebfiltering/), [productcategorizationapi](https://pypi.org/project/productcategorizationapi/) on PyPI; [webfilteringdatabase](https://www.npmjs.com/package/webfilteringdatabase) and [websitecategorization](https://www.npmjs.com/package/websitecategorization) on npm.
|
|
355
|
+
- Repositories: [github.com/explainableaixai](https://github.com/explainableaixai), [gitlab.com/url-classifications](https://gitlab.com/url-classifications).
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: websiteclassificationapi
|
|
3
|
-
Version: 2.15
|
|
4
|
-
Summary: Website classification API
|
|
5
|
-
Home-page: https://github.com/websitecategorization/websiteclassificationnapi
|
|
6
|
-
Author-email: info@websitecategorizationapi.com
|
|
7
|
-
Project-URL: Homepage, https://www.websitecategorizationapi.com
|
|
8
|
-
Project-URL: AI Tools Blocklist, https://www.aitoolsblocklist.com
|
|
9
|
-
Keywords: website categorization,classification,categorization
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Environment :: GPU :: NVIDIA CUDA :: 11.3
|
|
12
|
-
Classifier: Environment :: GPU :: NVIDIA CUDA :: 11.0
|
|
13
|
-
Classifier: Environment :: GPU :: NVIDIA CUDA
|
|
14
|
-
Classifier: Environment :: GPU :: NVIDIA CUDA :: 11.2
|
|
15
|
-
Classifier: Environment :: GPU :: NVIDIA CUDA :: 10.1
|
|
16
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
-
Description-Content-Type: text/markdown
|
|
18
|
-
License-File: LICENSE
|
|
19
|
-
|
|
20
1
|
# Website Classification API
|
|
21
2
|
|
|
22
3
|
This is the Python3 client library for [URL Classification](https://www.websitecategorizationapi.com) service.
|
|
@@ -120,13 +101,13 @@ Having verticals set up may also mean better filtering and lead to higher conver
|
|
|
120
101
|
|
|
121
102
|
## Our other services
|
|
122
103
|
|
|
123
|
-
Companies that manage internet access often start with a [web filtering database](https://webfilteringdatabase.com) to review how domains are categorized. This supports better decisions around policy cr
|
|
124
|
-
eation, reporting, and risk visibility. Many of those teams also evaluate a [web filtering service](https://webfilteringservice.com) to apply those controls in production.
|
|
104
|
+
Companies that manage internet access often start with a [web filtering database](https://www.webfilteringdatabase.com) to review how domains are categorized. This supports better decisions around policy cr
|
|
105
|
+
eation, reporting, and risk visibility. Many of those teams also evaluate a [web filtering service](https://www.webfilteringservice.com) to apply those controls in production.
|
|
125
106
|
|
|
126
107
|
|
|
127
108
|
We also provide an [Anonymization API](https://www.anonymizationapi.com) for privacy-preserving media and data workflows.
|
|
128
109
|
|
|
129
|
-
Schools and libraries subject to the Children's Internet Protection Act need more than generic web categories
|
|
110
|
+
Schools and libraries subject to the Children's Internet Protection Act need more than generic web categories, they need a purpose-built [CIPA web filtering](https://www.cipawebfiltering.com) database with 120 million domains organized into 57+ content categories aligned to federal compliance requirements. Pairing categorization with threat intelligence strengthens any filtering deployment, and our [phishing detection API](https://www.phishingdetectionapi.com) delivers real-time lookups against 390,000+ DNS-verified active phishing domains so that malicious URLs are blocked before they reach end users. Together, these services give IT teams the classification depth and security coverage needed to protect students, staff, and network infrastructure.
|
|
130
111
|
|
|
131
112
|
## AI explainability
|
|
132
113
|
|
|
@@ -183,7 +164,7 @@ Our digital solutions are trusted by organizations seeking reliable, secure, and
|
|
|
183
164
|
|
|
184
165
|
Business growth is supported through our [corporate enrichment data](https://www.companydataapi.com), delivering actionable intelligence much like the work at [Cambridge](https://www.cam.ac.uk). For cybersecurity and research teams, our [domain dataset](https://www.urlcategorizationdatabase.com) offers extensive categorization, paralleling the data-centric methods at [Berkeley](https://www.berkeley.edu).
|
|
185
166
|
|
|
186
|
-
By aligning our solutions with the excellence demonstrated at [Yale](https://www.yale.edu) and [Cornell](https://www.cornell.edu), we ensure that your organization stays at the cutting edge
|
|
167
|
+
By aligning our solutions with the excellence demonstrated at [Yale](https://www.yale.edu) and [Cornell](https://www.cornell.edu), we ensure that your organization stays at the cutting edge, combining technology, research, and practical results for every challenge.
|
|
187
168
|
|
|
188
169
|
|
|
189
170
|
## Example classifications
|
|
@@ -318,6 +299,10 @@ Example classification for website www.github.com:
|
|
|
318
299
|
|
|
319
300
|
For teams building acceptable-use or data-loss-prevention policies around generative AI, the [AI Tools Blocklist](https://www.aitoolsblocklist.com) complements this classifier with a purpose-built feed of AI-tool domains grouped into functional categories (chatbots, code assistants, media generators, voice cloning, and more). It answers a question generic categorization cannot: not just "is this site AI-related," but "which kind of AI tool is it," which is what granular blocking policies require.
|
|
320
301
|
|
|
302
|
+
Website classification at massive scale also applies to discovering acquisition candidates across the full web. Our [web-scale deal origination platform](https://www.acquisitionuniverse.com) screens over 100 million classified domains against buyer acquisition theses, extracting 15 operational signals per company from their public web presence. Private equity firms, search funds, and corporate development teams use the pipeline to surface non-obvious targets whose websites reveal strong fit signals, leadership depth, recurring revenue indicators, compliance readiness, that conventional company databases never capture.
|
|
303
|
+
|
|
304
|
+
The same classification engine powers contextual audience segments for programmatic advertising without cookies. Our [cookieless advertising data platform](https://www.cookielessaudiences.com) delivers domain datasets pre-categorized under the IAB content taxonomy, enabling DSPs and publishers to target audiences based on page context rather than user-level tracking. With Chrome, Safari, and Firefox deprecating third-party cookies, domain-level contextual classification is becoming the primary signal for brand-safe, regulation-compliant ad placement at scale.
|
|
305
|
+
|
|
321
306
|
## Useful resources used in development of website categorization
|
|
322
307
|
|
|
323
308
|
- [Tensorflow](https://www.tensorflow.org/)
|
|
@@ -332,3 +317,16 @@ For teams building acceptable-use or data-loss-prevention policies around genera
|
|
|
332
317
|
|
|
333
318
|
- [Top shopify stores](https://www.leadsquantum.com)
|
|
334
319
|
- [AI Tools Blocklist](https://www.aitoolsblocklist.com)
|
|
320
|
+
- [CV parser](http://resumereaderapi.com), AI resume parsing API that turns PDF/DOCX resumes into structured JSON
|
|
321
|
+
|
|
322
|
+
Classifying scraped or user-submitted pages means ingesting text you don't control, and that text regularly contains names, emails, and phone numbers. A [PII detection API](https://www.piidetectionapi.com) can flag and mask personal data in each document before classification results and source text are persisted. Teams subject to GDPR use automated [PII masking](https://www.piidetectionapi.com) as the standard pre-processing step for any external text pipeline.
|
|
323
|
+
|
|
324
|
+
Classifying a website answers what it is; agent deployments also need to know where its sensitive surfaces live. An [AI agent allowlist](https://www.aiagentallowlist.com) enriches every domain with verified URLs for 28 page types, letting policy engines allow research pages while denying credential and transaction surfaces. Classification plus [page-level agent policy](https://www.aiagentallowlist.com) is becoming the standard pairing for safe autonomous browsing.
|
|
325
|
+
|
|
326
|
+
## Related packages on PyPI and npm
|
|
327
|
+
|
|
328
|
+
- [aiblocklist](https://pypi.org/project/aiblocklist/) (also on [npm](https://www.npmjs.com/package/aiblocklist)): Python client for the [AI tools blocklist](https://www.aitoolsblocklist.com), 20,000+ AI-tool domains in 18 functional categories, daily refresh, feed downloads for DNS and firewall enforcement.
|
|
329
|
+
- [shadowaitools](https://pypi.org/project/shadowaitools/) (also on [npm](https://www.npmjs.com/package/shadowaitools)): a command-line tool that reads a DNS, proxy or firewall export and lists the AI tools in it; the hosted audit at [shadowaitools.com](https://www.shadowaitools.com) adds the per-user view, training verdicts and the PDF evidence pack.
|
|
330
|
+
- [aiagentallowlist](https://pypi.org/project/aiagentallowlist/) (also on [npm](https://www.npmjs.com/package/aiagentallowlist)): the [AI agent allow list](https://www.aiagentallowlist.com) client, verified page-type URLs and per-URL verdicts across 40 million+ domains for web-browsing agents.
|
|
331
|
+
- [phishingdetectionapi](https://pypi.org/project/phishingdetectionapi/), [cipawebfiltering](https://pypi.org/project/cipawebfiltering/), [productcategorizationapi](https://pypi.org/project/productcategorizationapi/) on PyPI; [webfilteringdatabase](https://www.npmjs.com/package/webfilteringdatabase) and [websitecategorization](https://www.npmjs.com/package/websitecategorization) on npm.
|
|
332
|
+
- Repositories: [github.com/explainableaixai](https://github.com/explainableaixai), [gitlab.com/url-classifications](https://gitlab.com/url-classifications).
|
|
@@ -11,7 +11,7 @@ setup(
|
|
|
11
11
|
name="websiteclassificationapi",
|
|
12
12
|
|
|
13
13
|
# The version of your project.
|
|
14
|
-
version="2.15",
|
|
14
|
+
version="2.15.2",
|
|
15
15
|
|
|
16
16
|
packages=find_packages(exclude="tests"),
|
|
17
17
|
|
|
@@ -21,11 +21,15 @@ setup(
|
|
|
21
21
|
|
|
22
22
|
long_description_content_type="text/markdown",
|
|
23
23
|
|
|
24
|
-
url="https://
|
|
24
|
+
url="https://www.websitecategorizationapi.com",
|
|
25
25
|
|
|
26
26
|
project_urls={
|
|
27
27
|
"Homepage": "https://www.websitecategorizationapi.com",
|
|
28
|
+
"Source": "https://github.com/explainableaixai/websitecategorizationapi",
|
|
29
|
+
"AI Agent Allow List": "https://www.aiagentallowlist.com",
|
|
30
|
+
"Shadow AI Tools": "https://www.shadowaitools.com",
|
|
28
31
|
"AI Tools Blocklist": "https://www.aitoolsblocklist.com",
|
|
32
|
+
"Resume Reader API": "http://resumereaderapi.com",
|
|
29
33
|
},
|
|
30
34
|
|
|
31
35
|
author_name="Samo",
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Python wrapper for website categorization API (service of www.websitecategorizationapi.com)
|
|
3
|
-
|
|
4
|
-
Explanation of available classifiers:
|
|
5
|
-
|
|
6
|
-
Classifier_type should be set to either iab1 (Tier 1 categorization) or iab2 (Tier 2 categorization) for general websites or ecommerce1, ecommerce2 and ecommerce3 for E-commerce or product websites.
|
|
7
|
-
|
|
8
|
-
IAB Tier 1 categorization returns probabilities of text being classified as one of 29 possible categories.
|
|
9
|
-
|
|
10
|
-
IAB Tier 2 categorization returns probabilities of text being classified as one of 447 possible categories.
|
|
11
|
-
|
|
12
|
-
Ecommerce Tier 1 categorization returns probabilities of text being classified as one of 21 possible categories.
|
|
13
|
-
|
|
14
|
-
Ecommerce Tier 2 website categorization returns probabilities of text being classified as one of 182 possible categories.
|
|
15
|
-
|
|
16
|
-
Ecommerce Tier 3 website categorization returns probabilities of text being classified as one of 1113 possible categories.
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
import requests
|
|
20
|
-
import json
|
|
21
|
-
|
|
22
|
-
class websiteclassificationapi:
|
|
23
|
-
def __init__(self):
|
|
24
|
-
pass
|
|
25
|
-
|
|
26
|
-
@staticmethod
|
|
27
|
-
def get_categorization(url,api_key,category_type):
|
|
28
|
-
"""
|
|
29
|
-
url = URL of website
|
|
30
|
-
api_key = api key
|
|
31
|
-
category_type = iab1 or iab2 for general websites, ecommerce1, ecommerce2 and ecommerce3 for E-commerce or product websites
|
|
32
|
-
"""
|
|
33
|
-
if category_type=='iab1':
|
|
34
|
-
url_api = "https://www.websitecategorizationapi.com/api/iab/iab_category1_url.php"
|
|
35
|
-
elif category_type=='iab2':
|
|
36
|
-
url_api = "https://www.websitecategorizationapi.com/api/iab/iab_category2_url.php"
|
|
37
|
-
elif category_type=='ecommerce1':
|
|
38
|
-
url_api = "https://www.websitecategorizationapi.com/api/iab/
|
|
39
|
-
elif category_type=='ecommerce2':
|
|
40
|
-
url_api = "https://www.websitecategorizationapi.com/api/iab/
|
|
41
|
-
elif category_type=='ecommerce3':
|
|
42
|
-
url_api = "https://www.websitecategorizationapi.com/api/
|
|
43
|
-
|
|
44
|
-
if (('http://' not in url) or ('https://' not in url)):
|
|
45
|
-
url = 'http://'+url
|
|
46
|
-
try:
|
|
47
|
-
url = requests.utils.quote(url)
|
|
48
|
-
print("URL:", url)
|
|
49
|
-
payload='query='+url+'&api_key='+api_key+'&data_type=url'
|
|
50
|
-
headers = {
|
|
51
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
52
|
-
}
|
|
53
|
-
response = requests.request("POST", url_api, headers=headers, data=payload)
|
|
54
|
-
data = json.loads(response.text)
|
|
55
|
-
try:
|
|
56
|
-
category = data['classification'][0]['category']
|
|
57
|
-
except:
|
|
58
|
-
category = 'url could not be loaded'
|
|
59
|
-
return category
|
|
60
|
-
except Exception as e:
|
|
61
|
-
print(e)
|
|
1
|
+
"""
|
|
2
|
+
Python wrapper for website categorization API (service of www.websitecategorizationapi.com)
|
|
3
|
+
|
|
4
|
+
Explanation of available classifiers:
|
|
5
|
+
|
|
6
|
+
Classifier_type should be set to either iab1 (Tier 1 categorization) or iab2 (Tier 2 categorization) for general websites or ecommerce1, ecommerce2 and ecommerce3 for E-commerce or product websites.
|
|
7
|
+
|
|
8
|
+
IAB Tier 1 categorization returns probabilities of text being classified as one of 29 possible categories.
|
|
9
|
+
|
|
10
|
+
IAB Tier 2 categorization returns probabilities of text being classified as one of 447 possible categories.
|
|
11
|
+
|
|
12
|
+
Ecommerce Tier 1 categorization returns probabilities of text being classified as one of 21 possible categories.
|
|
13
|
+
|
|
14
|
+
Ecommerce Tier 2 website categorization returns probabilities of text being classified as one of 182 possible categories.
|
|
15
|
+
|
|
16
|
+
Ecommerce Tier 3 website categorization returns probabilities of text being classified as one of 1113 possible categories.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
import requests
|
|
20
|
+
import json
|
|
21
|
+
|
|
22
|
+
class websiteclassificationapi:
|
|
23
|
+
def __init__(self):
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
@staticmethod
|
|
27
|
+
def get_categorization(url,api_key,category_type):
|
|
28
|
+
"""
|
|
29
|
+
url = URL of website
|
|
30
|
+
api_key = api key
|
|
31
|
+
category_type = iab1 or iab2 for general websites, ecommerce1, ecommerce2 and ecommerce3 for E-commerce or product websites
|
|
32
|
+
"""
|
|
33
|
+
if category_type=='iab1':
|
|
34
|
+
url_api = "https://www.websitecategorizationapi.com/api/iab/iab_category1_url.php"
|
|
35
|
+
elif category_type=='iab2':
|
|
36
|
+
url_api = "https://www.websitecategorizationapi.com/api/iab/iab_category2_url.php"
|
|
37
|
+
elif category_type=='ecommerce1':
|
|
38
|
+
url_api = "https://www.websitecategorizationapi.com/api/iab/gpt_category1.php"
|
|
39
|
+
elif category_type=='ecommerce2':
|
|
40
|
+
url_api = "https://www.websitecategorizationapi.com/api/iab/gpt_category2.php"
|
|
41
|
+
elif category_type=='ecommerce3':
|
|
42
|
+
url_api = "https://www.websitecategorizationapi.com/api/gpt_new1/gpt_category3.php"
|
|
43
|
+
|
|
44
|
+
if (('http://' not in url) or ('https://' not in url)):
|
|
45
|
+
url = 'http://'+url
|
|
46
|
+
try:
|
|
47
|
+
url = requests.utils.quote(url)
|
|
48
|
+
print("URL:", url)
|
|
49
|
+
payload='query='+url+'&api_key='+api_key+'&data_type=url'
|
|
50
|
+
headers = {
|
|
51
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
52
|
+
}
|
|
53
|
+
response = requests.request("POST", url_api, headers=headers, data=payload)
|
|
54
|
+
data = json.loads(response.text)
|
|
55
|
+
try:
|
|
56
|
+
category = data['classification'][0]['category']
|
|
57
|
+
except:
|
|
58
|
+
category = 'url could not be loaded'
|
|
59
|
+
return category
|
|
60
|
+
except Exception as e:
|
|
61
|
+
print(e)
|
|
62
62
|
pass
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Python wrapper for website categorization API (service of www.websitecategorizationapi.com)
|
|
3
|
-
|
|
4
|
-
Explanation of available classifiers:
|
|
5
|
-
|
|
6
|
-
Classifier_type should be set to either iab1 (Tier 1 categorization) or iab2 (Tier 2 categorization) for general websites or ecommerce1, ecommerce2 and ecommerce3 for E-commerce or product websites.
|
|
7
|
-
|
|
8
|
-
IAB Tier 1 categorization returns probabilities of text being classified as one of 29 possible categories.
|
|
9
|
-
|
|
10
|
-
IAB Tier 2 categorization returns probabilities of text being classified as one of 447 possible categories.
|
|
11
|
-
|
|
12
|
-
Ecommerce Tier 1 categorization returns probabilities of text being classified as one of 21 possible categories.
|
|
13
|
-
|
|
14
|
-
Ecommerce Tier 2 website categorization returns probabilities of text being classified as one of 182 possible categories.
|
|
15
|
-
|
|
16
|
-
Ecommerce Tier 3 website categorization returns probabilities of text being classified as one of 1113 possible categories.
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
import requests
|
|
20
|
-
import json
|
|
21
|
-
|
|
22
|
-
class websiteclassificationapi:
|
|
23
|
-
def __init__(self):
|
|
24
|
-
pass
|
|
25
|
-
|
|
26
|
-
@staticmethod
|
|
27
|
-
def get_categorization(url,api_key,category_type):
|
|
28
|
-
"""
|
|
29
|
-
url = URL of website
|
|
30
|
-
api_key = api key
|
|
31
|
-
category_type = iab1 or iab2 for general websites, ecommerce1, ecommerce2 and ecommerce3 for E-commerce or product websites
|
|
32
|
-
"""
|
|
33
|
-
if category_type=='iab1':
|
|
34
|
-
url_api = "https://www.websitecategorizationapi.com/api/iab/iab_category1_url.php"
|
|
35
|
-
elif category_type=='iab2':
|
|
36
|
-
url_api = "https://www.websitecategorizationapi.com/api/iab/iab_category2_url.php"
|
|
37
|
-
elif category_type=='ecommerce1':
|
|
38
|
-
url_api = "https://www.websitecategorizationapi.com/api/iab/
|
|
39
|
-
elif category_type=='ecommerce2':
|
|
40
|
-
url_api = "https://www.websitecategorizationapi.com/api/iab/
|
|
41
|
-
elif category_type=='ecommerce3':
|
|
42
|
-
url_api = "https://www.websitecategorizationapi.com/api/
|
|
43
|
-
|
|
44
|
-
if (('http://' not in url) or ('https://' not in url)):
|
|
45
|
-
url = 'http://'+url
|
|
46
|
-
try:
|
|
47
|
-
url = requests.utils.quote(url)
|
|
48
|
-
print("URL:", url)
|
|
49
|
-
payload='query='+url+'&api_key='+api_key+'&data_type=url'
|
|
50
|
-
headers = {
|
|
51
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
52
|
-
}
|
|
53
|
-
response = requests.request("POST", url_api, headers=headers, data=payload)
|
|
54
|
-
data = json.loads(response.text)
|
|
55
|
-
try:
|
|
56
|
-
category = data['classification'][0]['category']
|
|
57
|
-
except:
|
|
58
|
-
category = 'url could not be loaded'
|
|
59
|
-
return category
|
|
60
|
-
except Exception as e:
|
|
61
|
-
print(e)
|
|
1
|
+
"""
|
|
2
|
+
Python wrapper for website categorization API (service of www.websitecategorizationapi.com)
|
|
3
|
+
|
|
4
|
+
Explanation of available classifiers:
|
|
5
|
+
|
|
6
|
+
Classifier_type should be set to either iab1 (Tier 1 categorization) or iab2 (Tier 2 categorization) for general websites or ecommerce1, ecommerce2 and ecommerce3 for E-commerce or product websites.
|
|
7
|
+
|
|
8
|
+
IAB Tier 1 categorization returns probabilities of text being classified as one of 29 possible categories.
|
|
9
|
+
|
|
10
|
+
IAB Tier 2 categorization returns probabilities of text being classified as one of 447 possible categories.
|
|
11
|
+
|
|
12
|
+
Ecommerce Tier 1 categorization returns probabilities of text being classified as one of 21 possible categories.
|
|
13
|
+
|
|
14
|
+
Ecommerce Tier 2 website categorization returns probabilities of text being classified as one of 182 possible categories.
|
|
15
|
+
|
|
16
|
+
Ecommerce Tier 3 website categorization returns probabilities of text being classified as one of 1113 possible categories.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
import requests
|
|
20
|
+
import json
|
|
21
|
+
|
|
22
|
+
class websiteclassificationapi:
|
|
23
|
+
def __init__(self):
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
@staticmethod
|
|
27
|
+
def get_categorization(url,api_key,category_type):
|
|
28
|
+
"""
|
|
29
|
+
url = URL of website
|
|
30
|
+
api_key = api key
|
|
31
|
+
category_type = iab1 or iab2 for general websites, ecommerce1, ecommerce2 and ecommerce3 for E-commerce or product websites
|
|
32
|
+
"""
|
|
33
|
+
if category_type=='iab1':
|
|
34
|
+
url_api = "https://www.websitecategorizationapi.com/api/iab/iab_category1_url.php"
|
|
35
|
+
elif category_type=='iab2':
|
|
36
|
+
url_api = "https://www.websitecategorizationapi.com/api/iab/iab_category2_url.php"
|
|
37
|
+
elif category_type=='ecommerce1':
|
|
38
|
+
url_api = "https://www.websitecategorizationapi.com/api/iab/gpt_category1.php"
|
|
39
|
+
elif category_type=='ecommerce2':
|
|
40
|
+
url_api = "https://www.websitecategorizationapi.com/api/iab/gpt_category2.php"
|
|
41
|
+
elif category_type=='ecommerce3':
|
|
42
|
+
url_api = "https://www.websitecategorizationapi.com/api/gpt_new1/gpt_category3.php"
|
|
43
|
+
|
|
44
|
+
if (('http://' not in url) or ('https://' not in url)):
|
|
45
|
+
url = 'http://'+url
|
|
46
|
+
try:
|
|
47
|
+
url = requests.utils.quote(url)
|
|
48
|
+
print("URL:", url)
|
|
49
|
+
payload='query='+url+'&api_key='+api_key+'&data_type=url'
|
|
50
|
+
headers = {
|
|
51
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
52
|
+
}
|
|
53
|
+
response = requests.request("POST", url_api, headers=headers, data=payload)
|
|
54
|
+
data = json.loads(response.text)
|
|
55
|
+
try:
|
|
56
|
+
category = data['classification'][0]['category']
|
|
57
|
+
except:
|
|
58
|
+
category = 'url could not be loaded'
|
|
59
|
+
return category
|
|
60
|
+
except Exception as e:
|
|
61
|
+
print(e)
|
|
62
62
|
pass
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: websiteclassificationapi
|
|
3
|
+
Version: 2.15.2
|
|
4
|
+
Summary: Website classification API
|
|
5
|
+
Home-page: https://www.websitecategorizationapi.com
|
|
6
|
+
Author-email: info@websitecategorizationapi.com
|
|
7
|
+
Project-URL: Homepage, https://www.websitecategorizationapi.com
|
|
8
|
+
Project-URL: Source, https://github.com/explainableaixai/websitecategorizationapi
|
|
9
|
+
Project-URL: AI Agent Allow List, https://www.aiagentallowlist.com
|
|
10
|
+
Project-URL: Shadow AI Tools, https://www.shadowaitools.com
|
|
11
|
+
Project-URL: AI Tools Blocklist, https://www.aitoolsblocklist.com
|
|
12
|
+
Project-URL: Resume Reader API, http://resumereaderapi.com
|
|
13
|
+
Keywords: website categorization,classification,categorization
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Environment :: GPU :: NVIDIA CUDA :: 11.3
|
|
16
|
+
Classifier: Environment :: GPU :: NVIDIA CUDA :: 11.0
|
|
17
|
+
Classifier: Environment :: GPU :: NVIDIA CUDA
|
|
18
|
+
Classifier: Environment :: GPU :: NVIDIA CUDA :: 11.2
|
|
19
|
+
Classifier: Environment :: GPU :: NVIDIA CUDA :: 10.1
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
|
|
1
24
|
# Website Classification API
|
|
2
25
|
|
|
3
26
|
This is the Python3 client library for [URL Classification](https://www.websitecategorizationapi.com) service.
|
|
@@ -101,13 +124,13 @@ Having verticals set up may also mean better filtering and lead to higher conver
|
|
|
101
124
|
|
|
102
125
|
## Our other services
|
|
103
126
|
|
|
104
|
-
Companies that manage internet access often start with a [web filtering database](https://webfilteringdatabase.com) to review how domains are categorized. This supports better decisions around policy cr
|
|
105
|
-
eation, reporting, and risk visibility. Many of those teams also evaluate a [web filtering service](https://webfilteringservice.com) to apply those controls in production.
|
|
127
|
+
Companies that manage internet access often start with a [web filtering database](https://www.webfilteringdatabase.com) to review how domains are categorized. This supports better decisions around policy cr
|
|
128
|
+
eation, reporting, and risk visibility. Many of those teams also evaluate a [web filtering service](https://www.webfilteringservice.com) to apply those controls in production.
|
|
106
129
|
|
|
107
130
|
|
|
108
131
|
We also provide an [Anonymization API](https://www.anonymizationapi.com) for privacy-preserving media and data workflows.
|
|
109
132
|
|
|
110
|
-
Schools and libraries subject to the Children's Internet Protection Act need more than generic web categories
|
|
133
|
+
Schools and libraries subject to the Children's Internet Protection Act need more than generic web categories, they need a purpose-built [CIPA web filtering](https://www.cipawebfiltering.com) database with 120 million domains organized into 57+ content categories aligned to federal compliance requirements. Pairing categorization with threat intelligence strengthens any filtering deployment, and our [phishing detection API](https://www.phishingdetectionapi.com) delivers real-time lookups against 390,000+ DNS-verified active phishing domains so that malicious URLs are blocked before they reach end users. Together, these services give IT teams the classification depth and security coverage needed to protect students, staff, and network infrastructure.
|
|
111
134
|
|
|
112
135
|
## AI explainability
|
|
113
136
|
|
|
@@ -164,7 +187,7 @@ Our digital solutions are trusted by organizations seeking reliable, secure, and
|
|
|
164
187
|
|
|
165
188
|
Business growth is supported through our [corporate enrichment data](https://www.companydataapi.com), delivering actionable intelligence much like the work at [Cambridge](https://www.cam.ac.uk). For cybersecurity and research teams, our [domain dataset](https://www.urlcategorizationdatabase.com) offers extensive categorization, paralleling the data-centric methods at [Berkeley](https://www.berkeley.edu).
|
|
166
189
|
|
|
167
|
-
By aligning our solutions with the excellence demonstrated at [Yale](https://www.yale.edu) and [Cornell](https://www.cornell.edu), we ensure that your organization stays at the cutting edge
|
|
190
|
+
By aligning our solutions with the excellence demonstrated at [Yale](https://www.yale.edu) and [Cornell](https://www.cornell.edu), we ensure that your organization stays at the cutting edge, combining technology, research, and practical results for every challenge.
|
|
168
191
|
|
|
169
192
|
|
|
170
193
|
## Example classifications
|
|
@@ -299,6 +322,10 @@ Example classification for website www.github.com:
|
|
|
299
322
|
|
|
300
323
|
For teams building acceptable-use or data-loss-prevention policies around generative AI, the [AI Tools Blocklist](https://www.aitoolsblocklist.com) complements this classifier with a purpose-built feed of AI-tool domains grouped into functional categories (chatbots, code assistants, media generators, voice cloning, and more). It answers a question generic categorization cannot: not just "is this site AI-related," but "which kind of AI tool is it," which is what granular blocking policies require.
|
|
301
324
|
|
|
325
|
+
Website classification at massive scale also applies to discovering acquisition candidates across the full web. Our [web-scale deal origination platform](https://www.acquisitionuniverse.com) screens over 100 million classified domains against buyer acquisition theses, extracting 15 operational signals per company from their public web presence. Private equity firms, search funds, and corporate development teams use the pipeline to surface non-obvious targets whose websites reveal strong fit signals, leadership depth, recurring revenue indicators, compliance readiness, that conventional company databases never capture.
|
|
326
|
+
|
|
327
|
+
The same classification engine powers contextual audience segments for programmatic advertising without cookies. Our [cookieless advertising data platform](https://www.cookielessaudiences.com) delivers domain datasets pre-categorized under the IAB content taxonomy, enabling DSPs and publishers to target audiences based on page context rather than user-level tracking. With Chrome, Safari, and Firefox deprecating third-party cookies, domain-level contextual classification is becoming the primary signal for brand-safe, regulation-compliant ad placement at scale.
|
|
328
|
+
|
|
302
329
|
## Useful resources used in development of website categorization
|
|
303
330
|
|
|
304
331
|
- [Tensorflow](https://www.tensorflow.org/)
|
|
@@ -313,3 +340,16 @@ For teams building acceptable-use or data-loss-prevention policies around genera
|
|
|
313
340
|
|
|
314
341
|
- [Top shopify stores](https://www.leadsquantum.com)
|
|
315
342
|
- [AI Tools Blocklist](https://www.aitoolsblocklist.com)
|
|
343
|
+
- [CV parser](http://resumereaderapi.com), AI resume parsing API that turns PDF/DOCX resumes into structured JSON
|
|
344
|
+
|
|
345
|
+
Classifying scraped or user-submitted pages means ingesting text you don't control, and that text regularly contains names, emails, and phone numbers. A [PII detection API](https://www.piidetectionapi.com) can flag and mask personal data in each document before classification results and source text are persisted. Teams subject to GDPR use automated [PII masking](https://www.piidetectionapi.com) as the standard pre-processing step for any external text pipeline.
|
|
346
|
+
|
|
347
|
+
Classifying a website answers what it is; agent deployments also need to know where its sensitive surfaces live. An [AI agent allowlist](https://www.aiagentallowlist.com) enriches every domain with verified URLs for 28 page types, letting policy engines allow research pages while denying credential and transaction surfaces. Classification plus [page-level agent policy](https://www.aiagentallowlist.com) is becoming the standard pairing for safe autonomous browsing.
|
|
348
|
+
|
|
349
|
+
## Related packages on PyPI and npm
|
|
350
|
+
|
|
351
|
+
- [aiblocklist](https://pypi.org/project/aiblocklist/) (also on [npm](https://www.npmjs.com/package/aiblocklist)): Python client for the [AI tools blocklist](https://www.aitoolsblocklist.com), 20,000+ AI-tool domains in 18 functional categories, daily refresh, feed downloads for DNS and firewall enforcement.
|
|
352
|
+
- [shadowaitools](https://pypi.org/project/shadowaitools/) (also on [npm](https://www.npmjs.com/package/shadowaitools)): a command-line tool that reads a DNS, proxy or firewall export and lists the AI tools in it; the hosted audit at [shadowaitools.com](https://www.shadowaitools.com) adds the per-user view, training verdicts and the PDF evidence pack.
|
|
353
|
+
- [aiagentallowlist](https://pypi.org/project/aiagentallowlist/) (also on [npm](https://www.npmjs.com/package/aiagentallowlist)): the [AI agent allow list](https://www.aiagentallowlist.com) client, verified page-type URLs and per-URL verdicts across 40 million+ domains for web-browsing agents.
|
|
354
|
+
- [phishingdetectionapi](https://pypi.org/project/phishingdetectionapi/), [cipawebfiltering](https://pypi.org/project/cipawebfiltering/), [productcategorizationapi](https://pypi.org/project/productcategorizationapi/) on PyPI; [webfilteringdatabase](https://www.npmjs.com/package/webfilteringdatabase) and [websitecategorization](https://www.npmjs.com/package/websitecategorization) on npm.
|
|
355
|
+
- Repositories: [github.com/explainableaixai](https://github.com/explainableaixai), [gitlab.com/url-classifications](https://gitlab.com/url-classifications).
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|