API Quickstart Guide

Get up and running with the Website Categorization API in under 5 minutes. Follow these simple steps to make your first API call.

Getting Started

The Website Categorization API provides real-time website classification into over 800 IAB taxonomy categories. This quickstart guide walks you through the essential steps to integrate our API into your application, from obtaining credentials to making your first successful API call.

1

Create Your Account

Sign up for a free account at our registration page. You'll receive immediate access to our API with a generous free tier for testing and development. No credit card required to get started.

2

Get Your API Key

After registration, access your API key from the dashboard. Your API key authenticates all requests and tracks your usage against plan limits.

Security Note

Keep your API key secure. Never expose it in client-side code or public repositories. Use environment variables or secure key management systems. See our authentication guide for best practices.

3

Make Your First API Call

The simplest way to test the API is with a curl command. Replace YOUR_API_KEY with your actual API key:

# Categorize a single domain
curl -X GET "https://api.websitecategorizationapi.com/v1/categorize?domain=example.com" \
  -H "Authorization: Bearer YOUR_API_KEY"
4

Understand the Response

A successful API response includes the domain's categorization with confidence scores:

{
  "domain": "example.com",
  "categories": [
    {
      "id": "IAB19-1",
      "name": "Technology & Computing",
      "tier": 1,
      "confidence": 0.94
    },
    {
      "id": "IAB19-6",
      "name": "Software",
      "tier": 2,
      "confidence": 0.89
    }
  ],
  "meta": {
    "request_id": "req_abc123",
    "credits_used": 1,
    "processing_time_ms": 45
  }
}

Code Examples

Here are examples in popular programming languages to help you integrate quickly:

Python

import requests

api_key = "YOUR_API_KEY"
domain = "example.com"

response = requests.get(
  f"https://api.websitecategorizationapi.com/v1/categorize?domain={domain}",
  headers={"Authorization": f"Bearer {api_key}"}
)

data = response.json()
print(data["categories"])

JavaScript (Node.js)

const fetch = require('node-fetch');

const apiKey = 'YOUR_API_KEY';
const domain = 'example.com';

fetch(`https://api.websitecategorizationapi.com/v1/categorize?domain=${domain}`, {
  headers: { 'Authorization': `Bearer ${apiKey}` }
})
.then(res => res.json())
.then(data => console.log(data.categories));

PHP

<?php
$apiKey = 'YOUR_API_KEY';
$domain = 'example.com';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.websitecategorizationapi.com/v1/categorize?domain=$domain");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer $apiKey"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
$data = json_decode($response, true);
print_r($data['categories']);
?>

Ready to Get Started?

Create your free account and start categorizing domains in minutes.

Sign Up Free