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

# Attributes

Attributes are a powerful way to find exactly what you're looking for.

Here's how it works — every product belongs to a category. Every category defines an attribute schema: keys and allowed values. You can search against those values via `filters.attributes`.

For example, products in **Digital Cameras** can be labeled with attributes like:

* `connectivity-technology`: Wi-Fi, Bluetooth, USB, …
* `camera-sensor-type`: CMOS, BSI CMOS, CCD, …
* `camera-features`: Image stabilization, Waterproof, Touchscreen, …

This lets you find "all waterproof cameras with Wi-Fi or Bluetooh connectivity and a CCD sensor" — and get back only products that match.

<Steps>
  <Step title="Find attribute handles">
    Search for a category, or retrieve one directly by slug, to see available
    handles and values. [Category search](/api-reference/v1/search-categories) is
    free.

    <CodeGroup>
      ```typescript TypeScript theme={null}
      import Channel3 from "@channel3/sdk";

      const client = new Channel3();

      const { categories } = await client.categories.search({ query: "cameras" });
      const slug = categories[0].slug; // e.g. "digital-cameras"

      const category = await client.categories.retrieve(slug);
      // category.attributes → [{ slug, name, values }, ...]
      for (const attr of category.attributes) {
        console.log(`${attr.slug}: ${attr.values.slice(0, 5).join(", ")}`);
      }
      // connectivity-technology: Wi-Fi, Bluetooth, USB, ...
      // camera-sensor-type: CMOS, BSI CMOS, CCD, ...
      // camera-features: Image stabilization, Waterproof, ...
      ```

      ```python Python theme={null}
      from channel3_sdk import Channel3

      client = Channel3()

      category_results = client.categories.search(query="cameras")
      slug = category_results.categories[0].slug  # e.g. "digital-cameras"

      category = client.categories.retrieve(slug)
      # category.attributes → [{ slug, name, values }, ...]
      for attr in category.attributes:
          print(f"{attr.slug}: {', '.join(attr.values[:5])}")
      # connectivity-technology: Wi-Fi, Bluetooth, USB, ...
      # camera-sensor-type: CMOS, BSI CMOS, CCD, ...
      ```

      ```bash cURL theme={null}
      curl "https://api.trychannel3.com/v1/categories/search?query=cameras" \
        -H "x-api-key: $CHANNEL3_API_KEY"

      curl "https://api.trychannel3.com/v1/categories/digital-cameras" \
        -H "x-api-key: $CHANNEL3_API_KEY"
      ```
    </CodeGroup>
  </Step>

  <Step title="Add it to search">
    Pass attribute handles and canonical values to `filters.attributes`. Pair with
    `category_ids` using the same category slug.

    Multiple values for the same handle match **any** of them (OR); multiple handles are combined with **AND**.

    <CodeGroup>
      ```typescript TypeScript theme={null}
      const results = await client.products.search({
        query: "mirrorless camera",
        filters: {
          category_ids: [slug],
          attributes: {
            "connectivity-technology": ["Wi-Fi", "Bluetooth"],
            "camera-features": ["Image stabilization", "Waterproof"],
            "camera-sensor-type": ["CMOS"],
          },
        },
      });
      ```

      ```python Python theme={null}
      results = client.products.search(
          query="mirrorless camera",
          filters={
              "category_ids": [slug],
              "attributes": {
                  "connectivity-technology": ["Wi-Fi", "Bluetooth"],
                  "camera-features": ["Image stabilization", "Waterproof"],
                  "camera-sensor-type": ["CMOS"],
              },
          },
      )
      ```

      ```bash cURL theme={null}
      curl -X POST https://api.trychannel3.com/v1/search \
        -H "x-api-key: $CHANNEL3_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "query": "mirrorless camera",
          "filters": {
            "category_ids": ["digital-cameras"],
            "attributes": {
              "connectivity-technology": ["Wi-Fi", "Bluetooth"],
              "camera-features": ["Image stabilization", "Waterproof"],
              "camera-sensor-type": ["CMOS"]
            }
          }
        }'
      ```
    </CodeGroup>
  </Step>
</Steps>
