This guide is for calling the Website Categorization API from PHP through Zyla API Hub. You pass a URL (or an email) and you get category paths plus confidence. Auth is Authorization: Bearer YOUR_API_KEY. Billing is subscription + quota, not pay-per-call. First API: 7-day trial or 50 requests. No Free Plan.
Register for a key at zylalabs.com/register, then subscribe to that listing. The curls below use the Hub gateway — not the origin host.
Categorize a URL
POST the documented example url=https://yahoo.com. That is the only user field on this endpoint.
curl -s -X POST "https://zylalabs.com/api/12/website-categorization-api/48/url" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "url=https://yahoo.com"
Same call in PHP:
$ch = curl_init("https://zylalabs.com/api/12/website-categorization-api/48/url");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_API_KEY"],
CURLOPT_POSTFIELDS => http_build_query(["url" => "https://yahoo.com"]),
]);
echo curl_exec($ch);
curl_close($ch);
Stored Hub example for that request (trimmed to the fields you read first):
{
"domain": {
"categories": [
{"confidence": 0.8140320181846619, "name": "/Internet & Telecom/Other"},
{"confidence": 0.28268808126449585, "name": "/News/Other"},
{"confidence": 0.24724437296390533, "name": "/Internet & Telecom/Search Engines/Other"}
],
"social_media": {
"facebook_url": "https://facebook.com/YahooNews",
"instagram_url": "https://instagram.com/yahoonews",
"youtube_url": "https://www.youtube.com/c/yahoonews"
},
"logo_url": "https://klazify.s3.amazonaws.com/95839267417880239806a9314acc4e7f4.17574915.png"
},
"success": true
}
Read domain.categories[0].name and domain.categories[0].confidence. On this fixture the top path is /Internet & Telecom/Other at 0.814.
Categorize an email
The same listing also categorizes an email address. POST [email protected] — that is the official Hub example.
curl -s -X POST "https://zylalabs.com/api/12/website-categorization-api/1989/email" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "[email protected]"
Same call in PHP:
$ch = curl_init("https://zylalabs.com/api/12/website-categorization-api/1989/email");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_API_KEY"],
CURLOPT_POSTFIELDS => http_build_query(["email" => "[email protected]"]),
]);
echo curl_exec($ch);
curl_close($ch);
Stored Hub example:
{
"domain": {
"categories": [
{"confidence": 0.9019761085510254, "name": "/Internet & Telecom/Email & Messaging/Email"}
],
"social_media": null,
"logo_url": "https://klazify.s3.amazonaws.com/89059216117865465426a7c896e56cf68.19942511.png"
},
"success": true
}
From an agent
MCP for Hub listings sits at https://mcp.zylalabs.com/mcp with your Hub key. The REST paths above stay the source of truth for PHP.
Go live
1. Register — 7-day trial on your first Hub API.
2. Subscribe to the Website Categorization API.
3. POST the URL path with url=https://yahoo.com, then the email path with [email protected].