Product Categorization
curl --request GET \
--url https://categorization.dev/api/v1/product/categorization \
--header 'x-api-key: <x-api-key>'import requests
url = "https://categorization.dev/api/v1/product/categorization"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://categorization.dev/api/v1/product/categorization', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://categorization.dev/api/v1/product/categorization",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://categorization.dev/api/v1/product/categorization"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://categorization.dev/api/v1/product/categorization")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://categorization.dev/api/v1/product/categorization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"product_taxonomy": [
{
"value": "Apparel & Accessories > Shoes",
"confidence": 0.95
}
]
}
Endpoints
Product Categorization
This endpoint allows for categorizing products based on Google Product Taxonomy.
GET
/
api
/
v1
/
product
/
categorization
Product Categorization
curl --request GET \
--url https://categorization.dev/api/v1/product/categorization \
--header 'x-api-key: <x-api-key>'import requests
url = "https://categorization.dev/api/v1/product/categorization"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://categorization.dev/api/v1/product/categorization', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://categorization.dev/api/v1/product/categorization",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://categorization.dev/api/v1/product/categorization"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://categorization.dev/api/v1/product/categorization")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://categorization.dev/api/v1/product/categorization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"product_taxonomy": [
{
"value": "Apparel & Accessories > Shoes",
"confidence": 0.95
}
]
}
Header
string
required
This parameter specifies the private key you’ll need for Categorization.dev access.
Parameters
string
required
A website url with
http:// or https:// protocol or a product title.string
default:"product_taxonomy"
required
The classification parameter specifies the type of categorization to be used. It can be either
product_taxonomy or product_taxonomy_custom_xxxx, contact us for custom classification.Supported classifications
product_taxonomy: A hierarchical taxonomy that categorizes websites into a set of categories and subcategories : with 5677 categories
{
"product_taxonomy": [
{
"value": "Apparel & Accessories > Shoes",
"confidence": 0.95
}
]
}
Was this page helpful?