# 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 | Nome da categoria. |
| `name_en` | string \| null | Nome em inglês, quando informado. |
| `parent_id` | string \| null | A categoria pai; null no nível superior. |
| `level` | integer \| null | Profundidade na árvore, 1 para o topo. |
| `has_children` | boolean \| null | Se tem subcategorias. |
| `products` | integer \| null | Produtos nela, quando a loja os contabiliza. |
| `ext` | object | Extras específicos da plataforma. Retornados apenas com view=full. |

## Endpoints that return a ProductCategory

- [Categorias do TikTok Shop](https://okdata.online/apis/tiktok/shop/categories/list/) (`tiktok.shop.categories.list`): $0.002 per call · about 300 results per page
- [Categorias do 1688](https://okdata.online/apis/alibaba_1688/categories/list/) (`alibaba_1688.categories.list`): $0.022 per call · about 52 results per page
- [Categorias de fornecedor do 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`
