Référence Développeur

Catégorisation du site Web

Consultez la documentation de l'API Catégorisation du site Web, ses paramètres de requête, les champs de réponse, les exemples de code et la gestion des erreurs pour les intégrations DomScan.

Catégorisation du site Web

Classez les sites web dans les catégories DomScan inspirées de l’IAB grâce à une analyse multi-signal : correspondance pondérée des mots-clés, schema.org, Open Graph, détection de meta generator, heuristiques TLD, modèles d’URL et structure HTML. Utilisez /v1/categorize/taxonomy pour lister les ID de catégories et les sous-catégories prises en charge.

GET /v1/categorize

Paramètres de Requête

Paramètre Type requis
url string optionnel
domain string optionnel
skip_cache string optionnel
min_confidence integer optionnel

Champs de Réponse

Champ Type
url string
primary_category string | null
primary_category_id string | null
categories[] object[]
categories[] object
categories[].category_id string
categories[].category string
categories[].subcategory_id string | null
categories[].subcategory string | null
categories[].confidence integer
categories[].keywords_found[] string[]
categories[].signals[] object[]
categories[].signals[] object
categories[].signals[].source string
categories[].signals[].evidence string
primary_category_confidence string
title string | null
description string | null
language string | null
language_confidence string
adult_content boolean
signals_used integer
cached boolean
total_time_ms integer
checked_at string

Exemple de Requête

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/categorize?url=https%3A%2F%2Fexample.com&domain=example.com&skip_cache=example.com&min_confidence=example.com"

Exemple de Réponse

{
  "url": "https://example.com",
  "primary_category": "SaaS & Cloud",
  "primary_category_id": "IAB25",
  "categories": [
    {
      "category_id": "IAB25",
      "category": "SaaS & Cloud",
      "subcategory_id": null,
      "subcategory": null,
      "confidence": 84,
      "keywords_found": [
        "platform",
        "dashboard",
        "enterprise"
      ],
      "signals": [
        {
          "source": "keyword_title",
          "evidence": "Matched platform and dashboard in the page title."
        }
      ]
    },
    {
      "category_id": "IAB19",
      "category": "Technology & Computing",
      "subcategory_id": null,
      "subcategory": null,
      "confidence": 72,
      "keywords_found": [
        "api",
        "developer",
        "automation"
      ],
      "signals": [
        {
          "source": "keyword_body",
          "evidence": "Developer-focused terms appear repeatedly in page copy."
        }
      ]
    }
  ],
  "primary_category_confidence": "high",
  "title": "Developer platform for AI apps",
  "description": "Build with APIs, models, and cloud workflows",
  "language": "en",
  "language_confidence": "high",
  "adult_content": false,
  "signals_used": 12,
  "cached": false,
  "total_time_ms": 412,
  "checked_at": "2026-04-18T21:00:00Z"
}
GET /v1/categorize/taxonomy

Champs de Réponse

Champ Type
taxonomy string
version string
official_iab_taxonomy boolean
inspired_by string
category_count integer
subcategory_count integer
notes[] string[]
categories[] object[]
categories[] object
categories[].category_id string
categories[].category string
categories[].taxonomy_name string
categories[].ranked_category boolean
categories[].subcategories[] object[]
categories[].subcategories[] object
categories[].subcategories[].subcategory_id string
categories[].subcategories[].subcategory string
meta object

Exemple de Requête

curl "https://domscan.net/v1/categorize/taxonomy"

Exemple de Réponse

{
  "taxonomy": "domscan-iab-inspired",
  "version": "v1",
  "official_iab_taxonomy": false,
  "inspired_by": "IAB Tech Lab Content Taxonomy 3.x",
  "category_count": 35,
  "subcategory_count": 134,
  "notes": [
    "DomScan returns IAB-style IDs from its own IAB-inspired taxonomy.",
    "The category field matches the value returned by /v1/categorize for backward compatibility.",
    "IAB29 Adult is primarily exposed through the adult_content boolean in categorization responses."
  ],
  "categories": [
    {
      "category_id": "IAB22",
      "category": "E-commerce",
      "taxonomy_name": "Shopping & E-commerce",
      "ranked_category": true,
      "subcategories": [
        {
          "subcategory_id": "IAB22-1",
          "subcategory": "Online Retail"
        },
        {
          "subcategory_id": "IAB22-2",
          "subcategory": "Deals & Coupons"
        }
      ]
    },
    {
      "category_id": "IAB25",
      "category": "SaaS & Cloud",
      "taxonomy_name": "SaaS & Cloud",
      "ranked_category": true,
      "subcategories": [
        {
          "subcategory_id": "IAB25-3",
          "subcategory": "Developer Tools"
        }
      ]
    }
  ]
}
POST /v1/categorize/bulk

Paramètres du Corps

Paramètre Type requis
urls string[] requis

Champs de Réponse

Champ Type
results[] object[]
results[] object
results[].url string
results[].primary_category string | null
results[].primary_category_id string | null
results[].categories[] object[]
results[].categories[] object
results[].categories[].category_id string
results[].categories[].category string
results[].categories[].subcategory_id string | null
results[].categories[].subcategory string | null
results[].categories[].confidence integer
results[].categories[].keywords_found[] string[]
results[].categories[].signals[] object[]
results[].categories[].signals[] object
results[].categories[].signals[].source string
results[].categories[].signals[].evidence string
results[].primary_category_confidence string
results[].title string | null
results[].description string | null
results[].language string | null
results[].language_confidence string
results[].adult_content boolean
results[].signals_used integer
results[].cached boolean
results[].total_time_ms integer
results[].checked_at string
meta object
meta.total integer
meta.duration_ms integer

Exemple de Requête

curl -X POST "https://domscan.net/v1/categorize/bulk" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "urls": [
    "github.com",
    "amazon.com",
    "bbc.com"
  ]
}'

Exemple de Réponse

{
  "results": [
    {
      "url": "https://example.com",
      "primary_category": "string",
      "primary_category_id": "string",
      "categories": [
        {
          "category_id": "string",
          "category": "string",
          "subcategory_id": "string",
          "subcategory": "string",
          "confidence": 1,
          "keywords_found": [
            "string"
          ],
          "signals": [
            {
              "source": "string",
              "evidence": "string"
            }
          ]
        }
      ],
      "primary_category_confidence": "high",
      "title": "string",
      "description": "198.51.100.10",
      "language": "string",
      "language_confidence": "high",
      "adult_content": true,
      "signals_used": 1,
      "cached": true,
      "total_time_ms": "2026-04-15T12:00:00Z",
      "checked_at": "2026-04-15T12:00:00Z"
    }
  ],
  "meta": {
    "total": 1,
    "duration_ms": 1
  }
}