# 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 | Category name. |
| `name_en` | string \| null | English name, where given. |
| `parent_id` | string \| null | The parent category; null at the top. |
| `level` | integer \| null | Depth in the tree, 1 for the top. |
| `has_children` | boolean \| null | Whether it has sub-categories. |
| `products` | integer \| null | Products in it, where the shop counts them. |
| `ext` | object | Platform-specific extras. Only returned with view=full. |

## Endpoints that return a ProductCategory

- [1688 categories](https://okdata.online/apis/alibaba_1688/categories/list/) (`alibaba_1688.categories.list`): $0.022 per call · about 52 results per page
- [1688 supplier categories](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`
