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

# Usage

Commands follow a resource-based structure:

```sh theme={null}
channel3 [resource] <command> [flags...]
```

Pass `--help` on any command for full flags. Price and buy links live on `offers[]` — see [Offer](/concepts/offer).

## Search

```sh theme={null}
channel3 products search --query "organic cotton t-shirt"
```

Limit results:

```sh theme={null}
channel3 products search --query "running shoes" --limit 5
```

## Filters

Pass filters as JSON, or nest fields with `--filters.<name>`:

```sh theme={null}
channel3 products search \
  --query "running shoes" \
  --filters '{
    "price": { "min_price": 50, "max_price": 150 },
    "availability": ["InStock"],
    "gender": "male"
  }'
```

```sh theme={null}
channel3 products search \
  --query "sweater" \
  --filters.price '{"min_price":50,"max_price":200}' \
  --filters.availability '["InStock"]'
```

Brand or website filters need IDs (or use domains for websites — see [website search](/guides/website-search)):

```sh theme={null}
# Resolve a brand first
channel3 brands search --query "nike"

# Then filter products
channel3 products search \
  --query "running shoes" \
  --filters.brand_ids '["brand_id_here"]'
```

## Image search

From a public URL:

```sh theme={null}
channel3 products search-by-image \
  --image-url "https://example.com/shoe.jpg"
```

From a local file (`@` sends the file; binary is base64-encoded automatically):

```sh theme={null}
channel3 products search-by-image --base64-image @shoe.jpg
```

You can also pass `--image-url` or `--base64-image` on `products search` alongside `--query`.

## Lookup a store URL

```sh theme={null}
channel3 products lookup \
  --url "https://www.nike.com/t/air-force-1-07-mens-shoes-5QFp5Z/CW2288-111"
```

Returns the canonical product with every merchant offer.

## Product detail and similar

```sh theme={null}
channel3 products retrieve --product-id 2yh8WH5
```

```sh theme={null}
channel3 products find-similar --product-id 2yh8WH5 --limit 10
```

## Brands, categories, websites

```sh theme={null}
channel3 brands search --query "nike"
channel3 brands find --query "Nike"
channel3 brands list --limit 20
```

```sh theme={null}
channel3 categories search --query "sofas"
channel3 categories retrieve --slug sofas
```

```sh theme={null}
channel3 websites retrieve --query "https://www.bestbuy.com"
```

## Locale

Set defaults via env (`CHANNEL3_COUNTRY`, etc.) or per call:

```sh theme={null}
channel3 products search \
  --query "trainers" \
  --config.country=GB \
  --config.language=en \
  --config.currency=GBP
```

## Output formats

```sh theme={null}
# Pretty JSON (good default for humans)
channel3 products search --query "lamp" --format pretty

# Titles only (GJSON)
channel3 products search \
  --query "running shoes" \
  --transform "products.#.title"

# First product's first offer price
channel3 products search \
  --query "merino sweater" \
  --limit 1 \
  --transform "products.0.offers.0.price"

# Domains + prices for comparison
channel3 products search \
  --query "dyson vacuum" \
  --limit 1 \
  --transform "products.0.offers.#.{domain:domain,price:price}"
```

`--format` accepts `json`, `jsonl`, `yaml`, `pretty`, `raw`, `explore`. `--transform` uses [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md).

## Files

Prefix a path with `@` to send a file as an argument:

```sh theme={null}
channel3 products search-by-image --base64-image @shoe.jpg
```

Escape a literal `@` with `\@` if you need the character in a string.

## Full reference

| Resource         | Common commands                                                   |
| ---------------- | ----------------------------------------------------------------- |
| `products`       | `search`, `search-by-image`, `lookup`, `retrieve`, `find-similar` |
| `brands`         | `search`, `find`, `list`, `retrieve`                              |
| `categories`     | `search`, `list`, `retrieve`                                      |
| `websites`       | `retrieve`                                                        |
| `price-tracking` | see `--help`                                                      |

```sh theme={null}
channel3 --help
channel3 products --help
```

API shapes: [What you request](/guides/request-overview) · [API reference](/api-reference/v1/search)
