> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trychannel3.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Category

A **category** is a node in Channel3's product taxonomy — for example `running-shoes`, `sofas`, or `laptops`. Every product belongs to a category.

## How to find and filter by category

```typescript theme={null}
const { categories } = await client.categories.search({ query: "sofas" });
const slug = categories[0].slug; // e.g. "sofas"

const results = await client.products.search({
  query: "sectional",
  filters: { category: slug },
});
```

Or read `product.category.slug` from any product you already have.

## Attributes

Each category defines a shared **attribute vocabulary** — the structured feature keys that apply to every product in that node. Every camera, for example, is labeled with the same handles (`sensor_type`, `megapixels`, `lens_mount`, and so on), so you can compare products side by side on the same axes.

[Category detail](/api-reference/v1/category-detail) returns that vocabulary: each attribute has a `handle` (the key you'll use in filters) and a list of known `values`.

```typescript theme={null}
const category = await client.categories.retrieve("digital-cameras");

for (const attr of category.attributes) {
  console.log(`${attr.handle}: ${attr.values.slice(0, 5).join(", ")}`);
}
// sensor_type: CMOS, CCD, ...
// megapixels:  20, 24, 45, ...
// lens_mount:  Sony E, Canon RF, ...
```

Pair those handles with the `attributes` search filter for precise queries — e.g. sofas with USB charging, or cameras with a specific sensor type. Full walkthrough: [Attribute search](/guides/advanced-search).

On product detail, each product's filled-in values appear as `structured_attributes` — same keys as the category vocabulary, with that product's values.
