A list of website URLs is difficult to route, filter, or analyze when all you have is the address. By the end of this guide, you can submit a URL or email address to Website Categorization API, read the returned categories, and decide how to use them in a production workflow.
What Website Categorization API returns
Website Categorization API classifies a submitted URL or the domain associated with an email address. Its response can include category names and confidence values, along with additional information such as a logo, social links, and company details.
The URL endpoint accepts a full URL, so it is useful when the path matters as well as the root domain. The Email endpoint accepts an email address and categorizes its domain. These are different inputs: an email-domain result should not be treated as a classification of an individual person.
Applications can use the results to label submitted links, enrich company records, or organize email-domain lists. The API is available through Zyla API Hub, whose catalog includes more than 10,000 public APIs.
Getting started on Zyla API Hub
Open the Website Categorization API listing linked at the end of this article. Create a free Zyla API Hub account if you do not have one, then click Subscribe or Start Free Trial when available and obtain your API key.
The listing offers a 7-day trial or 50 requests for the first API. Access uses a subscription and quota model rather than pay-per-call billing; check the API page for current access options and pricing. Keep the key on your server or in a secret manager rather than embedding it in browser code.
Requests below use Authorization: Bearer YOUR_API_KEY. Replace YOUR_API_KEY with your own key when running them, and avoid writing the completed authorization header to application logs.
Endpoints and a working request
URL: categorize a full URL
Method: POST
Request URL: https://zylalabs.com/api/12/website-categorization-api/48/url
Required parameter: url, a URL such as https://google.com.
Use this endpoint when you have the website address itself. It accepts a full URL path rather than limiting the input to the root domain. Send the URL as a form-encoded parameter, as in the listing’s example:
curl -s -X POST "https://zylalabs.com/api/12/website-categorization-api/48/url" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "url=https://google.com"
Email: categorize an email domain
Method: POST
Request URL: https://zylalabs.com/api/12/website-categorization-api/1989/email
Required parameter: email, an email address such as [email protected].
Use this endpoint when your source record contains an email address rather than a website URL. It is intended for categorizing email databases and identifying organizations that might be relevant to an offer or prospecting workflow. Its example response includes categories and may include company information, domain registration data, and similar domains.
Company fields in the Email example can be null, including the company name. Design the enrichment step to leave missing values unset rather than assuming every email domain maps to a known organization.
Read the URL response
The following is the official listing example for the URL request. The published example is truncated at the end, so this block is an excerpt rather than a complete JSON document; use the response from your own request when testing a JSON parser.
{
"domain": {
"categories": [
{
"confidence": 0.9019761085510254,
"name": "/Internet & Telecom/Email & Messaging/Email",
"IAB19-15": "Email",
"IAB-623-619": "Internet - Email"
}
],
"logo_url": "https://klazify.s3.amazonaws.com/187668924417925096926ad786fcaae866.96410880.png",
"social_media": {
"facebook_url": null,
"twitter_url": null,
"instagram_url": null,
"medium_url": null,
"youtube_url": "https://www.youtube.com/?gl=US&tab=w1",
"pinterest_url": null,
"linkedin_url": null,
"github_url": null
}
},
"success": true,
"objects": {
"company": {
"name": "Google",
"city": "Mountain View",
"stateCode": "CA",
"countryCode": "US",
"employeesRange": "100K+",
"revenue": 257637000000,
"raised": null,
"tags": [
"Internet",
"Publishers",
"Broadcasting",
"Information",
"Publishing",
"Web Search",
"Web & Client Portals",
"Technology",
"Web Services & Apps",
"Information Technology & Services",
"B2C",
"SAAS",
"B2B"
],
"tech": [
"google_apps",
"db2",
"media.net",
"grafana",
"marchex",
"oracle_crm",
"smartsheet",
"sybase",
"apache_kafka",
"sage_50cloud",
"splunk",
"oracle_endeca",
"informatica",
"appnexus",
"apache_http_server",
"apache_spark",
"ibm_infosphere",
"wrike",
"sap_hybris_marketing",
"couchbase",
"atlassian_fisheye",
"gitlab",
"dropbox",
"woo_commerce",
"workamajig",
"workday",
"atlassian_jira",
"sas_enterprise",
"oracle_cash_and_treasury_management",
"qliktech",
"thomson_reuters_eikon",
"flexer…
For categorization, start with domain.categories. Each category in the example has a hierarchical name, a numeric confidence, and two IAB-labeled fields. Treat confidence as a value to evaluate for your application, not as a guarantee that a classification is correct.
The example also has a top-level success flag, a logo_url, and optional social links under social_media. Company data appears under objects.company; values such as raised can be null. Do not assume a currency or reporting period for revenue without confirming it on the API page.
Call the same endpoint from Python
This example uses Python’s standard library, sends the same URL parameter as the curl request, and reads the category names and confidence values. It handles HTTP failures, connection failures, invalid JSON, and a response whose success flag is not true.
import json
from urllib.error import HTTPError, URLError
from urllib.parse import urlencode
from urllib.request import Request, urlopen
api_key = "YOUR_API_KEY"
endpoint = "https://zylalabs.com/api/12/website-categorization-api/48/url"
body = urlencode({"url": "https://google.com"}).encode("utf-8")
request = Request(
endpoint,
data=body,
headers={"Authorization": f"Bearer {api_key}"},
method="POST",
)
try:
with urlopen(request, timeout=30) as response:
result = json.load(response)
except HTTPError as exc:
raise SystemExit(f"HTTP request failed: {exc.code}") from exc
except URLError as exc:
raise SystemExit(f"Connection failed: {exc.reason}") from exc
except (ValueError, UnicodeDecodeError) as exc:
raise SystemExit("The response was not valid JSON") from exc
if result.get("success") is not True:
raise SystemExit("Categorization did not report success")
domain = result.get("domain") or {}
categories = domain.get("categories") or []
if not categories:
print("No categories returned")
else:
for category in categories:
print(category.get("name"), category.get("confidence"))
company = (result.get("objects") or {}).get("company") or {}
if company.get("name"):
print("Company:", company["name"])
Replace the key before running the script. For deployment, load it from your secret store or environment instead of committing it to source control. The timeout in this client is an application setting, not an API service guarantee.
Practical website categorization workflows
Label submitted links
If users submit websites to a directory or review queue, call the URL endpoint after accepting a submission. Store the submitted URL alongside the returned category name and confidence so a reviewer can see the basis for the proposed label.
Keep the full submitted URL when the path is relevant to the workflow. Reducing every input to a root domain before calling the endpoint discards the path that this endpoint is designed to accept.
Enrich a company pipeline
When a company record already has a website, categorize that URL and use the returned category to help route the record to a team or segment. The company name, location, employee range, and tags in the example can add context, but make each field optional in your data model.
For records that start with an email address, use the Email endpoint instead. Treat the result as information about the email domain; a classification alone does not establish that the sender works for a particular organization or is a qualified prospect.
Review categories before automation
Use confidence to prioritize review rather than silently treating every returned category as a fact. Choose any acceptance threshold based on your own evaluation and route uncertain or empty results to a manual queue. The example’s numerical confidence is one response value, not an accuracy benchmark.
If you save results, decide how long they remain useful for your application and when to refresh them. Reuse an existing result where appropriate to conserve subscription quota, but allow for a website or its classification to change. Keep the original input and retrieval time in your own records so operators can identify stale results.
Handle a failed request separately from a successful response with no categories. Avoid an uncontrolled retry loop: inspect the HTTP failure, log enough information to diagnose it without exposing the API key or unnecessary email addresses, and account for your available quota before retrying.
Use categorization from an AI agent
An MCP-compatible client can access Zyla API Hub through MCP. Configure the client with https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY, replacing the placeholder with your key. Claude Code, Cursor, Windsurf, and other MCP-compatible clients can use this connection.
For example, an agent processing a submitted website can request a categorization and present the returned category and confidence for review. Give the agent only the URLs or email addresses needed for the task, and keep the MCP connection URL private because it contains the API key.
FAQ
Can I categorize a full website URL?
Yes. The URL endpoint accepts a full URL, including a path, through its required url parameter.
Can I categorize a list of email addresses?
The Email endpoint accepts an email parameter and categorizes the associated domain. For a list, process each address in your application and plan around your subscription quota.
Will every response contain company and social data?
Do not rely on it. The supplied examples contain null social or company fields, so check for missing values before displaying or storing them.
How do I get an API key and test the endpoint?
Create a free Zyla account, open the listing, and select Subscribe or Start Free Trial when available. Check the listing for current access options and pricing, then use your key in the Bearer authorization header.
Ready to categorize a URL? Start 7-day trial on Website Categorization API and get your API key from Zyla API Hub.