# ProductCategory

> A product category of a marketplace or a shop.

Canonical page: https://okdata.online/docs/objects/product_category/

The same shape on every platform. A field a platform does not have is null, and meta.unavailable says why. Use fields= to keep only what you need.

| Field | Type | Description |
|---|---|---|
| `id` | string | Category ID; give it to the endpoints that list a category. |
| `name` | string | Tên danh mục. |
| `name_en` | string \| null | Tên tiếng Anh, nếu có. |
| `parent_id` | string \| null | Danh mục cha; null ở cấp cao nhất. |
| `level` | integer \| null | Độ sâu trong cây, 1 cho cấp cao nhất. |
| `has_children` | boolean \| null | Có danh mục con hay không. |
| `products` | integer \| null | Số sản phẩm trong đó, nếu shop có đếm. |
| `ext` | object | Dữ liệu bổ sung riêng của nền tảng. Chỉ trả về khi view=full. |

## Endpoints that return a ProductCategory

- [Danh mục TikTok Shop](https://okdata.online/apis/tiktok/shop/categories/list/) (`tiktok.shop.categories.list`): $0.002 per call · about 300 results per page
- [Danh mục 1688](https://okdata.online/apis/alibaba_1688/categories/list/) (`alibaba_1688.categories.list`): $0.022 per call · about 52 results per page
- [Danh mục của nhà cung cấp 1688](https://okdata.online/apis/alibaba_1688/shops/categories/list/) (`alibaba_1688.shops.categories.list`): $0.022 per call · about 10 results per page

## Fields by view

Each view includes the fields of the views above it. `view=compact` is the smallest; `full` adds platform extras under `ext`.

- compact: `id`, `name`, `name_en`, `parent_id`, `level`, `has_children`, `products`
- standard: —
- full: `ext`
