Categorization API
Categorization API enables you to check categories of domains, plus much more information associated with the domain. All you need is an API key to access this end point. The API key is something you will get in your email once you register with Categorizer.net.
Base URL shall be as below:
API Request Example
You can query the API endpoint via a HTTP GET request:
https://api.categorizer.net/d?api_key=YOUR_API_KEY_HERE&domain=amazon.com
Here is a example PHP code snippet
<?php
$api_key = "YOUR_API_KEY_HERE";
$domain = "amazon.com";
$curl = curl_init("https://api.categorizer.net/d?api_key=".$api_key."&domain=".$domain);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($curl);
curl_close($curl);
$json = json_decode($output, true);
print_r($json);
?>
Overwrite YOUR_API_KEY_HERE with your API key which you have recieved in your registered email after registering with categorizer.
REQUIRED GET PARAMETER
Below you can find required GET parameters to query the API:
GET FIELD : api_key Required
FIELD TYPE : string
DEFAULT : null
FIELD DESC : Your API key.
GET FIELD : domain Required
FIELD TYPE : string
DEFAULT : null
FIELD DESC : Domain to submit, i.e amazon.com
API RESPONSE EXAMPLE
The API response is in a clean JSON format:
{"data": {"category":[ { "category:"Electronics & Appliances", "category_id":"13" }, { "category":"E-commerce & Retail \/ Shopping", "category_id":"41" }, { "category":"Business & Management", "category_id":"8" }], "audience":"All", "content_type":"Safe", "domain":"amazon.com", "status":"success" } }
Here you can find important JSON fields explained:
JSON FIELD : data->category
FIELD TYPE : string
FIELD DESC : Shows Category for entered domain.
JSON FIELD : data->content_type
FIELD TYPE : string
FIELD DESC : Shows type of content.
JSON FIELD : data->domain
FIELD TYPE : string
FIELD DESC : entered domain.
JSON FIELD : data->status
FIELD TYPE : string
FIELD DESC : Shows api response status.
API RESPONSE ERROR
In case of an error, the JSON output will contain the status field:
{
"status": "failed"
},
Here you can find JSON response error code explained:
530 - Invalid Api Key
550 - Required fields missing
777 - Invalid Domain Format
700 - Not signed up for Subscription plans
710 - No Active Subscription
712 - Future Subscription Start Date
715 - Subscription Expired
720 - Max Allowed query reached