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

# Websites

Find retailers, then pass their IDs to `filters.website_ids`. Website lookups are free.

## Search by name or domain

`websites.search` matches a retailer name or domain and returns up to `limit` websites (default 5, max 20), best match first.

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

const client = new Channel3();

async function main() {
  const { websites } = await client.websites.search({ query: "Best Buy" });
  const bestBuy = websites[0];

  const results = await client.products.search({
    query: "coffee maker",
    filters: { website_ids: [bestBuy.id] },
  });

  for await (const product of results) {
    console.log(product.title);
    break;
  }
}

main();
```

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

client = Channel3()

best_buy = client.websites.search(query="Best Buy").websites[0]

results = client.products.search(
    query="coffee maker",
    filters={"website_ids": [best_buy.id]},
)

print(next(iter(results)).title)
```

## List websites

`websites.list` pages through supported websites, up to the top 5,000. Pass `category_ids` to list the websites that sell those categories, best first. Iterating the result fetches later pages for you.

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

const client = new Channel3();

async function main() {
  const page = await client.websites.list({ category_ids: ["athletic-shoes"], limit: 50 });

  for (const site of page.data) {
    console.log(site.id, site.name, site.best_commission_rate);
  }

  if (page.hasNextPage()) {
    const next = await page.getNextPage();
    console.log(next.data.length);
  }
}

main();
```

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

client = Channel3()

page = client.websites.list(category_ids=["athletic-shoes"], limit=50)

for site in page.items:
    print(site.id, site.name, site.best_commission_rate)

next_page = page.next_page()
if next_page:
    print(len(next_page.items))
```

## Get a website by ID or domain

[`GET /v1/websites/{website_id}`](/api-reference/v1/website-detail) accepts a website ID or a domain. It is REST-only for now; the SDKs add it in the next major version.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://api.trychannel3.com/v1/websites/bestbuy.com" \
  -H "x-api-key: $CHANNEL3_API_KEY"
```

`websites.retrieve` (`GET /v0/websites`) still resolves a URL to a website, but is deprecated in favor of the endpoints above.

Website filters restrict the retailers whose offers can match. They are different from brands; see [Website](/guides/website.md).


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