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

# SDK

Install the Channel3 SDK, authenticate, and make async calls.

## Installation

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  // npm
  npm install @channel3/sdk

  // yarn
  yarn add @channel3/sdk

  // pnpm
  pnpm add @channel3/sdk
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  # pip
  pip install channel3-sdk

  # uv
  uv add channel3-sdk
  ```
</CodeGroup>

## Authentication

Provide your API key via the `CHANNEL3_API_KEY` environment variable, or pass it directly to the client.

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

  // Initialize with environment variable
  const client = new Channel3();

  // Or, initialize with API key directly
  const clientWithKey = new Channel3({
    apiKey: "your_api_key_here",
  });
  ```

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

  # Initialize with environment variable
  client = Channel3()

  # Or, initialize with API key directly
  client_with_key = Channel3(api_key="your_api_key_here")
  ```
</CodeGroup>

## Async usage

<CodeGroup>
  ```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.products.search({
      query: "organic cotton t-shirt",
    });
    console.log(response);
  }

  main();
  ```

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

  client = AsyncChannel3()

  async def main():
      response = await client.products.search(
          query="organic cotton t-shirt"
      )
      print(response)

  if __name__ == "__main__":
      asyncio.run(main())
  ```
</CodeGroup>

## Explore the SDK

<Cards>
  <Card title="Search" icon="search" href="/sdk/keyword-search">
    Keyword, image, similar-product, filtered, and paginated search.
  </Card>

  <Card title="Brands" icon="tag" href="/sdk/find-brands">
    Find a brand, browse the catalog, and use brand filters.
  </Card>

  <Card title="Websites" icon="store" href="/sdk/websites">
    List retailers and limit search to their offers.
  </Card>

  <Card title="Categories" icon="folder-tree" href="/sdk/find-categories">
    Find categories and apply a category filter.
  </Card>

  <Card title="Product lookup" icon="link" href="/sdk/lookup-by-url">
    Resolve a retailer URL to a canonical product.
  </Card>

  <Card title="Error handling" icon="circle-alert" href="/sdk/error-handling">
    Handle SDK request and API errors.
  </Card>
</Cards>


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