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

# Brand

Restrict search results to products from specific brands.

Pass one or more brand IDs to `filters.brand_ids` on `POST /v1/search`. Resolve IDs with `GET /v1/brands/search`.

<Note>
  A **[brand](/concepts/brand)** is the company or label behind a product. A **[website](/concepts/website)** is the online store selling it.
</Note>

<Steps>
  <Step title="Find the ID">
    Search for a brand by name to get its stable ID. [Brand search](/api-reference/v1/search-brands) is free.

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

      const client = new Channel3();

      const brands = await client.brands.search({ query: "Nike" });
      const nikeId = brands.brands[0].id;
      console.log(nikeId); // e.g. "brand_nike_abc123"
      ```

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

      client = Channel3()

      brands = client.brands.search(query="Nike")
      nike_id = brands.brands[0].id
      print(nike_id)  # e.g. "brand_nike_abc123"
      ```

      ```bash cURL theme={null}
      curl "https://api.trychannel3.com/v1/brands/search?query=Nike" \
        -H "x-api-key: $CHANNEL3_API_KEY"
      ```
    </CodeGroup>
  </Step>

  <Step title="Add it to search">
    Pass the ID (or IDs) to `filters.brand_ids`.

    <CodeGroup>
      ```typescript TypeScript theme={null}
      const results = await client.products.search({
        query: "running shoes",
        filters: {
          brand_ids: [nikeId],
        },
      });
      ```

      ```python Python theme={null}
      results = client.products.search(
          query="running shoes",
          filters={"brand_ids": [nike_id]},
      )
      ```

      ```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": "running shoes",
          "filters": { "brand_ids": ["brand_nike_abc123"] }
        }'
      ```
    </CodeGroup>
  </Step>
</Steps>

<Cards>
  <Card title="Search" icon="magnifying-glass" href="/guides/search" arrow="true">
    Full overview of the search endpoint and all available filters.
  </Card>

  <Card title="Brands API" icon="tag" href="/api-reference/v1/list-brands" arrow="true">
    Full API reference for the brands endpoints.
  </Card>
</Cards>
