You have a list of domains, full URLs, and email addresses, and you need to auto-tag them into marketing-friendly or IAB-style categories by the end of the week. By the end of this guide, you’ll be able to send a URL or an email domain to the Website Categorization API on Zyla API Hub and get back structured categories, confidence scores, and useful metadata you can use immediately in lead scoring, content moderation, routing, or analytics.
What this API delivers
The Website Categorization API classifies web properties and email domains into categories and returns additional context like a logo URL, social links when available, and optional company attributes. It works on:
- Full URLs (e.g., https://example.com/path) for page-level categorization.
- Email domains (e.g., gmail.com from [email protected]) for mailbox/provider recognition and related info.
Typical applications include lead enrichment, ad targeting alignment, content filtering, and analytics segmentation. You’ll interact with two POST endpoints that accept a single parameter and return JSON.
Getting started on Zyla API Hub
Open the API listing and subscribe to get an API key. Zyla API Hub uses a subscription + quota model (not pay-per-call). This API offers a 7-day trial on its listing page so you can prototype quickly without committing.
- Go to the Website Categorization API listing: Start 7-day trial on Website Categorization API.
- Click Subscribe (or Start Free Trial when available), then copy your API key.
- Use the header Authorization: Bearer YOUR_API_KEY in every request.
One account, one API key, and a consistent subscription model apply across the Zyla Hub catalog of more than 10,000 public APIs. Explore the marketplace at zylalabs.com when you’re ready to add enrichment or utilities to your stack.
Endpoints overview
1) URL categorization
Use this to categorize a full URL path, not just the root domain.
- Method: POST
- Request URL: https://zylalabs.com/api/12/website-categorization-api/48/url
- Required param: url (e.g., https://google.com)
What you get back: categories with confidence, a logo_url, and when available, social media links and company objects. Use this when page-level context matters or when you don’t want to normalize down to a bare domain.
2) Email domain categorization
Submit an email address to categorize and retrieve domain-level information for that email’s provider/domain.
- Method: POST
- Request URL: https://zylalabs.com/api/12/website-categorization-api/1989/email
- Required param: email (e.g., [email protected])
What you get back: categories, logo_url, and when available, domain registration data and a list of similar domains. Use this to segment leads or users by mailbox provider or to enrich CRM records.
Minimal, copy-paste cURL for URL categorization
Send a full URL and receive category data with confidence values and related metadata.
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"
Official sample response:
{
"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…
Fields you’ll typically use:
- domain.categories: array of categories with confidence. name gives a readable taxonomy path; other fields map to IAB codes.
- domain.logo_url: provider or company logo URL.
- domain.social_media: known social links when available (may be nulls).
- success: check this before trusting the payload.
- objects.company: optional company metadata like name, location, tags, and tech stack entries when available.
Python example: categorize a URL and read key fields
This example posts a URL, checks the success flag, and prints the top category with its confidence and the logo URL. It uses only the documented endpoint and parameters.
import requests
API_KEY = "YOUR_API_KEY"
ENDPOINT = "https://zylalabs.com/api/12/website-categorization-api/48/url"
def categorize_url(target_url: str):
headers = {
"Authorization": f"Bearer {API_KEY}",
}
# Use form encoding to mirror --data-urlencode behavior
data = {
"url": target_url
}
resp = requests.post(ENDPOINT, headers=headers, data=data, timeout=20)
resp.raise_for_status()
payload = resp.json()
if not payload.get("success"):
raise RuntimeError("API returned success=false")
domain = payload.get("domain", {})
categories = domain.get("categories", []) or []
logo_url = domain.get("logo_url")
top = categories[0] if categories else None
if top:
print("Top category:", top.get("name"))
print("Confidence:", top.get("confidence"))
else:
print("No categories found")
print("Logo URL:", logo_url)
return payload
if __name__ == "__main__":
categorize_url("https://google.com")
Email endpoint: quick categorization by email domain
Submit an email address; the API infers the domain and returns categorization and related info.
- Method: POST
- Request URL: https://zylalabs.com/api/12/website-categorization-api/1989/email
- Param: email (required)
Example response:
From this payload you can extract:
- domain.categories: categorize the mailbox provider’s domain.
- logo_url: render a logo next to user emails in your UI.
- domain_registration_data and similar_domains when available: helpful for heuristics or fuzzy matching.
Implementation patterns that ship
- Lead scoring: call the Email endpoint on signup to tag the domain and adjust scores (e.g., “Email” category → consumer mailbox provider).
- Content routing: for a list of URLs, send each to the URL endpoint and route to a relevant moderation or processing queue based on top category.
- Ad alignment: map returned categories to your internal taxonomy or directly use the IAB mapping fields present in the categories array.
- UI enrichment: display a logo_url and known social links for recognized domains to add helpful context in dashboards.
Request details that save time
- Authorization: set the HTTP header Authorization: Bearer YOUR_API_KEY.
- Form encoding: the Hub examples use --data-urlencode. In your code, send form fields (application/x-www-form-urlencoded) or a typical form body to mirror this.
- Null handling: social links and some company fields can be null. Guard your JSON parsing accordingly.
- Caching: categories for the same URL/domain don’t change frequently. Cache results per canonical URL or per domain where appropriate.
- Batching: if you’re categorizing lists, parallelize at your client level and respect your subscription quota. Check the API listing for your current access options and pricing.
Calling from AI agents via MCP
If you’re orchestrating with Claude Code, Cursor, Windsurf, or any MCP-compatible client, you can route calls through Zyla’s MCP endpoint. Provide your API key in the MCP URL and have your agent call the documented endpoints on your behalf.
- MCP endpoint: MCP
- Usage: configure your tool with the MCP endpoint and your key. From the agent, call the same Website Categorization API endpoints shown above with the required parameters (url or email) and the Authorization header.
This lets you keep categorization steps inside an autonomous workflow while maintaining a single API key across tools in the Zyla ecosystem. Explore more APIs for your agents at zylalabs.com.
Troubleshooting and production checklist
- Validate inputs: ensure url is a properly formatted absolute URL and email is syntactically valid before sending.
- Check success: verify the success field is true before reading category arrays.
- Fallbacks: when categories is empty or null, decide on a default route (e.g., “Uncategorized”).
- Timeouts/retries: set client timeouts and retry idempotently on transient network errors. Avoid retry loops that could quickly consume quota.
- Logging: log the category name and confidence to aid future tuning and debugging.
FAQ
What auth method is required?
Use the HTTP header Authorization: Bearer YOUR_API_KEY on every request.
Can I categorize a full path (not just a root domain)?
Yes, use the URL endpoint (POST to https://zylalabs.com/api/12/website-categorization-api/48/url) with the url parameter.
How do I categorize users by their email providers?
Use the Email endpoint (POST to https://zylalabs.com/api/12/website-categorization-api/1989/email) with the email parameter. Parse domain.categories for the primary category and confidence.
What plan model does Zyla use?
Subscription + quota. This API offers a 7-day trial on its listing page so you can evaluate quickly. Check the API page for current access options and pricing.
Which fields are safe to assume present?
Always check success. The domain.categories array, logo_url, social_media, and objects.company fields may be present, but some values can be null. Guard against missing fields.
Ship it
You now have working cURL and Python examples for the Website Categorization API. Subscribe, grab your key, and start classifying URLs and email domains today: Start 7-day trial on Website Categorization API.