---
title: "Website Category API"
method: GET
path: "/api/v1/domain/category"
tags: ["Domain"]
---

# Website Category API

`GET /api/v1/domain/category`

## Request

- Base URL: `https://xranks.com`
- URL: `https://xranks.com/api/v1/domain/category`
- Auth: API key in header `Authorization`

Find out what a website is about. The API returns the content categories Xranks assigns to the domain, the same ones shown on its Xranks page. A site can have more than one category.

Use cases: Block or allow sites by category; Segment a list of domains by industry; Enrich CRM records with a website category.

## Query parameters

- `domain` string, required

## Response `200`

Data for the domain. May instead be an Error object (HTTP 200) when the domain is unknown.

- union
  - CategoryResponse
    - `domain` string, required: The domain you asked for.
    - `category` string[], required: Content categories. Empty when the site is not classified yet.
  - Error
    - `error` string, required: Human-readable message.
    - `code` 'missing_api_key' | 'invalid_api_key' | 'inactive_api_key' | 'quota_exceeded' | 'invalid_domain' | 'domain_not_found' | 'no_data' | 'unknown_service' | 'too_many_domains' | 'invalid_request': Stable machine-readable code.

## Other responses

- `401`: Missing, invalid or inactive API key.
- `429`: Quota used up for the rolling 30 days (or the batch needs more lookups than are left).

---

[API](https://skmtc.dev/xranks/apis/xranks-domain-data-api.md) · [All operations](https://skmtc.dev/xranks/apis/xranks-domain-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xranks/apis/xranks-domain-data-api/revisions/c1c3388c4b34?raw)
