NAV

Introduction to Website categorization API

Website categorization API is one of the most accurate website categorisation services with large number of categories supported.

You can use our API service with websites, but also on texts. URL classification accepts full-path URLs and returns real-time, live URL based website categorization.

We use two different defintions for categorizations:

- IAB Taxonomy, supporting two Tiers

- Products Taxonomy

Authentication

API requests should be sent to the URL: https://www.websitecategorizationapi.com/api/

A valud API key is needed to obtain results from our API endpoints and are available by purchasing subscription to our plans.

Our API service expects for the API key to be included in all API requests to the server, as parameter:

api_key: b4dade2ce5fb2d0b189b5f0cd

E-commerce categorization of Texts, Tier 1

This API endpoint is especially suitable for E-Commerce related websites, like online stores. For general websites please check our IAB classifier, documented further below.

Tier 1 categorization returns probabilities of text being classified as one of 21 possible categories.

HTTP Request

POST https://www.websitecategorizationapi.com/api/gpt/gpt_category1.php?query=polaroid land camera&api_key=b4dcde2ce5fb2d0b887b5e

Query Parameters

Parameter Type Description
query string text to be categorized
api_key string API key
curl --location --request POST 'https://www.websitecategorizationapi.com/api/gpt/gpt_category1.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'query=polaroid land camera' \
--data-urlencode 'api_key=b4dcde2ce5fb2d0b887b5e'

The above command returns JSON structured like this:

{
  "classification": [
    {
      "category": "Cameras & Optics",
      "value": 0.9987253421912741
    },
    {
      "category": "Electronics",
      "value": 0.000562862622295886
    },
    {
      "category": "Home & Garden",
      "value": 0.0005436545440954681
    },
    {
      "category": "Business & Industrial",
      "value": 0.00007432249947499341
    },
    {
      "category": "Office Supplies",
      "value": 0.000033526685721586356
    },
    {
      "category": "Apparel & Accessories",
      "value": 0.000027410018876003828
    },
    {
      "category": "Arts & Entertainment",
      "value": 0.000007521376738994588
    },
    {
      "category": "Toys & Games",
      "value": 0.000005882323386026919
    },
    {
      "category": "Sporting Goods",
      "value": 0.0000054131118222522225
    },
    {
      "category": "Hardware",
      "value": 0.0000033494618317838667
    },
    {
      "category": "Baby & Toddler",
      "value": 0.000002964992638430485
    },
    {
      "category": "Food, Beverages & Tobacco",
      "value": 0.0000016666852257013246
    },
    {
      "category": "Vehicles & Parts",
      "value": 0.0000011971066840144845
    },
    {
      "category": "Media",
      "value": 0.0000011131512981848846
    },
    {
      "category": "Animals & Pet Supplies",
      "value": 0.0000010786729107985125
    },
    {
      "category": "Furniture",
      "value": 8.600872153899655e-7
    },
    {
      "category": "Luggage & Bags",
      "value": 7.425740758731358e-7
    },
    {
      "category": "Mature",
      "value": 4.101005623841621e-7
    },
    {
      "category": "Health & Beauty",
      "value": 3.4821204250832534e-7
    },
    {
      "category": "Religious & Ceremonial",
      "value": 2.798537689428336e-7
    },
    {
      "category": "Software",
      "value": 5.3728060390120276e-8
    }
  ],
  "language": "en"
}

E-Commerce categorization of Texts, Tier 2

This API endpoint is especially suitable for E-Commerce related websites, like online stores. For general websites please check our IAB classifier, documented further below.

Tier 2 website categorization returns probabilities of text being classified as one of 182 possible categories.

HTTP Request

POST https://www.websitecategorizationapi.com/api/gpt/gpt_category2.php?query=polaroid camera&api_key=b4dcde2ce5fb2d0b887b5e

Query Parameters

Parameter Type Description
query string text to be categorized
api_key string API key
curl --location --request POST 'https://www.websitecategorizationapi.com/api/gpt/gpt_category2.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'query=polaroid land camera' \
--data-urlencode 'api_key=b4dcde2ce5fb2d0b887b5e'

The above command returns JSON structured like this:

{
  "classification": [
    {
      "category": "Cameras",
      "value": 0.9160965830309336
    },
    {
      "category": "Camera & Optic Accessories",
      "value": 0.014408161930182316
    },
    {
      "category": "Presentation Supplies",
      "value": 0.013201065065928974
    },
    {
      "category": "Video",
      "value": 0.009239226281822454
    },
    {
      "category": "Electronics Accessories",
      "value": 0.00527737163793613
    },
    ,...]
}

E-Commerce categorization of Texts, Tier 3

This API endpoint is especially suitable for E-Commerce related websites, like online stores. For general websites please check our IAB classifier, documented further below.

Tier 1 website categorization returns probabilities of text being classified as one of 1113 possible categories.

HTTP Request

POST https://www.websitecategorizationapi.com/api/gpt/gpt_category3.php?query=polaroid camera&api_key=b4dcde2ce5fb2d0b887b5e

Query Parameters

Parameter Type Description
query string text to be categorized
api_key string API key
curl --location --request POST 'https://www.websitecategorizationapi.com/api/gpt/gpt_category3.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'query=polaroid land camera' \
--data-urlencode 'api_key=b4dcde2ce5fb2d0b887b5e'

The above command returns JSON structured like this:

{
  "classification": [
    {
      "category": "Film Cameras",
      "value": 0.5330920056393742
    },
    {
      "category": "Digital Cameras",
      "value": 0.25333581946019373
    },
    {
      "category": "Disposable Cameras",
      "value": 0.0663910677556255
    },
    {
      "category": "Trail Cameras",
      "value": 0.01740226805363727
    },
    {
      "category": "Document Cameras",
      "value": 0.015069146377420819
    },
    {
      "category": "Surveillance Cameras",
      "value": 0.011664482862068214
    },
    {
      "category": "Borescopes",
      "value": 0.008395065450695205
    },
    {
      "category": "Video Cameras",
      "value": 0.007260418504801398
    },
    {
      "category": "Camera Lens Accessories",
      "value": 0.00650744791929527
    },,...]
}

E-Commerce website categorization of URLs, Tier 1

This API endpoint is especially suitable for E-Commerce related websites, like online stores. For general websites please check our IAB classifier, documented further below.

Tier 1 categorization returns probabilities of text from URL being classified as one of 21 possible categories.

HTTP Request

POST https://www.websitecategorizationapi.com/api/gpt/gpt_category1.php?query=https://eu.polaroid.com/collections/instant-cameras&api_key=b4dcde2ce5fb2d0b887b5e&data_type=url

Query Parameters

Parameter Type Description
query string text to be categorized
api_key string API key
data_type string should be set to 'url'
curl --location --request POST 'https://www.websitecategorizationapi.com/api/gpt/gpt_category1.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'query=https://eu.polaroid.com/collections/instant-cameras' \
--data-urlencode 'data_type=url' \
--data-urlencode 'api_key=b4dcde2ce5fb2d0b887b5e'

The above command returns JSON structured like this:

{
  "classification": [
    {
      "category": "Cameras & Optics",
      "value": 0.9992289896015756
    },
    {
      "category": "Home & Garden",
      "value": 0.0006520692868512297
    },
    {
      "category": "Apparel & Accessories",
      "value": 0.00004644383948321836
    },
    {
      "category": "Electronics",
      "value": 0.00003771973664942523
    },
    {
      "category": "Business & Industrial",
      "value": 0.000008166161487290707
    },
    {
      "category": "Office Supplies",
      "value": 0.000007549115352502271
    },...]
}

E-Commerce categorization of URLs, Tier 2

This API endpoint is especially suitable for E-Commerce related websites, like online stores. For general websites please check our IAB classifier, documented further below.

Tier 1 categorization returns probabilities of text from URL being classified as one of 186 possible categories.

HTTP Request

POST https://www.websitecategorizationapi.com/api/gpt/gpt_category2.php?query=https://eu.polaroid.com/collections/instant-cameras&api_key=b4dcde2ce5fb2d0b887b5e&data_type=url

Query Parameters

Parameter Type Description
query string text to be categorized
api_key string API key
data_type string should be set to 'url'
curl --location --request POST 'https://www.websitecategorizationapi.com/api/gpt/gpt_category2.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'query=https://eu.polaroid.com/collections/instant-cameras' \
--data-urlencode 'data_type=url' \
--data-urlencode 'api_key=b4dcde2ce5fb2d0b887b5e'

The above command returns JSON structured like this:

{
  "classification": [
    {
      "category": "Cameras",
      "value": 0.9245012943174596
    },
    {
      "category": "Presentation Supplies",
      "value": 0.004850704982243057
    },...]
}

E-Commerce categorization of URLs, Tier 3

This API endpoint is especially suitable for E-Commerce related websites, like online stores. For general websites please check our IAB classifier, documented further below.

Tier 1 categorization returns probabilities of text from URL being classified as one of 1113 possible categories.

HTTP Request

POST https://www.websitecategorizationapi.com/api/gpt/gpt_category3.php?query=https://eu.polaroid.com/collections/instant-cameras&api_key=b4dcde2ce5fb2d0b887b5e&data_type=url

Query Parameters

Parameter Type Description
query string text to be categorized
api_key string API key
data_type string should be set to 'url'
curl --location --request POST 'https://www.websitecategorizationapi.com/api/gpt/gpt_category3.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'query=https://eu.polaroid.com/collections/instant-cameras' \
--data-urlencode 'data_type=url' \
--data-urlencode 'api_key=b4dcde2ce5fb2d0b887b5e'

The above command returns JSON structured like this:

{
  "classification": [
    {
      "category": "Film Cameras",
      "value": 0.8221396513265392
    },
    {
      "category": "Digital Cameras",
      "value": 0.03174787172824993
    },
    {
      "category": "Disposable Cameras",
      "value": 0.02434788833270771
    },
    {
      "category": "Picture Frames",
      "value": 0.0020415917541745025
    },
    {
      "category": "Watch Accessories",
      "value": 0.0019267665992148237
    },
    {
      "category": "Video Cameras",
      "value": 0.0018906391929454846
    },
    {
      "category": "Surveillance Cameras",
      "value": 0.001548661227171665
    },...]
}

IAB Categorization of Texts, Tier 1

IAB categorization is based on taxonomy from IAB organization.

Tier 1 categorization returns probabilities of text being classified as one of 29 possible categories.

HTTP Request

POST https://www.websitecategorizationapi.com/api/iab/gpt_category1.php?query=credit card&api_key=b4dcde2ce5fb2d0b887b5e

Query Parameters

Parameter Type Description
query string text to be categorized
api_key string API key
curl --location --request POST 'https://www.websitecategorizationapi.com/api/iab/gpt_category1.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'query=credit card' \
--data-urlencode 'api_key=b4dcde2ce5fb2d0b887b5e'

The above command returns JSON structured like this:

{
  "classification": [
    {
      "category": "Personal Finance",
      "value": 0.9761399141331873
    },
    {
      "category": "Hobbies & Interests",
      "value": 0.012164815580256418
    },
    {
      "category": "Automotive",
      "value": 0.0025196087021092215
    },
    {
      "category": "Music and Audio",
      "value": 0.0008752506600661922
    },
    {
      "category": "Style & Fashion",
      "value": 0.0008616063832503892
    },
    {
      "category": "Fine Art",
      "value": 0.0007356838538989182
    },
    {
      "category": "Events and Attractions",
      "value": 0.0006860379172393203
    },
    {
      "category": "Business and Finance",
      "value": 0.0006617396989540662
    },
    {
      "category": "Shopping",
      "value": 0.0005497554147123015
    },
    {
      "category": "Sports",
      "value": 0.0005244575592904009
    },
    {
      "category": "Food & Drink",
      "value": 0.0005127335219828095
    },
    {
      "category": "Technology & Computing",
      "value": 0.00047175450468135173
    },
    {
      "category": "Medical Health",
      "value": 0.00037166903273757674
    },
    {
      "category": "Pop Culture",
      "value": 0.00033420130176418624
    },
    {
      "category": "Travel",
      "value": 0.00033124861987561744
    },
    {
      "category": "Science",
      "value": 0.0003090364749867773
    },
    {
      "category": "Movies",
      "value": 0.00029288123865858144
    },
    {
      "category": "Education",
      "value": 0.0002908401351480208
    },
    {
      "category": "News and Politics",
      "value": 0.00022847415444144793
    },
    {
      "category": "Home & Garden",
      "value": 0.0002152725238608538
    },
    {
      "category": "Pets",
      "value": 0.00017486261718002182
    },
    {
      "category": "Television",
      "value": 0.000124120100803851
    },
    {
      "category": "Healthy Living",
      "value": 0.00011409833413449834
    },
    {
      "category": "Religion & Spirituality",
      "value": 0.00011219133637975148
    },
    {
      "category": "Family and Relationships",
      "value": 0.00010729327394592739
    },
    {
      "category": "Careers",
      "value": 0.00010286095832155701
    },
    {
      "category": "Books and Literature",
      "value": 0.00009633052630078263
    },
    {
      "category": "Real Estate",
      "value": 0.00008766190043931586
    },
    {
      "category": "Video Gaming",
      "value": 0.000003599541392274362
    }
  ],
  "language": "en"
}

IAB Categorization of Texts, Tier 2

IAB categorization is based on taxonomy from IAB organization.

Tier 1 categorization returns probabilities of text being classified as one of 447 possible categories.

HTTP Request

POST https://www.websitecategorizationapi.com/api/iab/gpt_category2.php?query=credit card&api_key=b4dcde2ce5fb2d0b887b5e

Query Parameters

Parameter Type Description
query string text to be categorized
api_key string API key
curl --location --request POST 'https://www.websitecategorizationapi.com/api/iab/gpt_category2.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'query=credit card' \
--data-urlencode 'api_key=b4dcde2ce5fb2d0b887b5e'

The above command returns JSON structured like this:

{
  "classification": [
    {
      "category": "Personal Debt",
      "value": 0.8993637222986489
    },...]
}

IAB Categorization of URLs, Tier 1

IAB categorization is based on taxonomy from IAB organization.

Tier 1 categorization returns probabilities of text being classified as one of 29 possible categories.

HTTP Request

POST https://www.websitecategorizationapi.com/api/iab/iab_category1_url.php?query=https://www.theverge.com/&api_key=b4dcde2ce5fb2d0b887b5e

Query Parameters

Parameter Type Description
query string text to be categorized
api_key string API key
curl --location --request POST 'https://www.websitecategorizationapi.com/api/iab/iab_category1_url.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'query=https://www.theverge.com/' \
--data-urlencode 'data_type=url' \
--data-urlencode 'api_key=b4dcde2ce5fb2d0b887b5e'

The above command returns JSON structured like this:

{
  "classification": [
    {
      "category": "Technology & Computing",
      "value": 0.4171649489395124
    },
    {
      "category": "Video Gaming",
      "value": 0.18616746555063265
    },
    {
      "category": "Hobbies & Interests",
      "value": 0.08888010984131789
    },
    {
      "category": "Television",
      "value": 0.08364788502170598
    },
    {
      "category": "Personal Finance",
      "value": 0.026911980291179315
    },...]
}

IAAB Categorization of URLs, Tier 2

IAB categorization is based on taxonomy from IAB organization.

Tier 1 categorization returns probabilities of text being classified as one of 447 possible categories.

HTTP Request

POST https://www.websitecategorizationapi.com/api/gpt/gpt_category2.php?query=https://www.theverge.com/&api_key=b4dcde2ce5fb2d0b887b5e&data_type=url

Query Parameters

Parameter Type Description
query string text to be categorized
api_key string API key
data_type string should be set to 'url'
curl --location --request POST 'https://www.websitecategorizationapi.com/api/iab/iab_category2_url.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'query=https://www.theverge.com/' \
--data-urlencode 'data_type=url' \
--data-urlencode 'api_key=b4dcde2ce5fb2d0b887b5e'

The above command returns JSON structured like this:

{
  "classification": [
    {
      "category": "Consumer Electronics",
      "value": 0.09432289580458242
    },
    {
      "category": "Video Game Genres",
      "value": 0.08423966799607889
    },
    {
      "category": "Home Utilities",
      "value": 0.03011371130949797
    },
    {
      "category": "Astrology",
      "value": 0.021293901078053422
    },
    {
      "category": "Business",
      "value": 0.01665557793073325
    },
    {
      "category": "Feature",
      "value": 0.016627965249943578
    },
    {
      "category": "Console Games",
      "value": 0.015979094081886563
    },...]
}

Errors

The BittsAnalytics API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
406 Not Acceptable -- You requested a format that isn't json.
429 Too Many Requests
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.