> ## 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.

# Find Categories

Search categories by free-text query. Use returned `slug` values with `filters.category` on product search, or pass one to `categories.retrieve` for full details and attributes.

See also [Category](/guides/category.md) and [Attribute search](/guides/advanced-search).

```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
import Channel3 from "@channel3/sdk";

const client = new Channel3();

async function main() {
  const response = await client.categories.search({ query: "sofas" });
  console.log(response.categories.map((c) => c.slug));

  const slug = response.categories[0]?.slug;
  if (slug) {
    const products = await client.products.search({
      query: "sectional",
      filters: { category: slug },
    });
    console.log(products.products[0]?.title);
  }
}

main();
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from channel3_sdk import Channel3

client = Channel3()

def main():
    response = client.categories.search(query="sofas")
    print([c.slug for c in response.categories])

    slug = response.categories[0].slug
    products = client.products.search(
        query="sectional",
        filters={"category": slug},
    )
    print(products.products[0].title)

if __name__ == "__main__":
    main()
```

For full taxonomy traversal, `client.categories.list({ page, page_size, roots_only })` returns a page-numbered listing, and `client.categories.retrieve(slug)` returns one category with its children, attributes, and full path.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.