npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

channel3-sdk

v1.0.1

Published

The official TypeScript/JavaScript SDK for Channel3 AI Shopping API

Downloads

204

Readme

Channel3 TypeScript/JavaScript SDK

npm version TypeScript License: MIT Node.js

The official TypeScript/JavaScript SDK for the Channel3 AI Shopping API. Search for products using text, images, and advanced filters with AI-powered semantic search.

🚀 Features

  • 🔍 Text Search: Natural language product search
  • 🖼️ Visual Search: Search by image URL or base64 data
  • 🎯 Advanced Filters: Filter by brand, price, gender, availability
  • ⚙️ Search Configuration: Control query enrichment and semantic search
  • 🔧 TypeScript First: Full type safety with auto-generated types from OpenAPI
  • 🛡️ Robust Error Handling: Detailed error types for different scenarios

📦 Installation

npm install channel3-sdk
# or
yarn add channel3-sdk
# or
pnpm add channel3-sdk

🏃‍♂️ Quick Start

Basic Usage

import { Channel3Client } from 'channel3-sdk';

const client = new Channel3Client({
  apiKey: process.env.CHANNEL3_API_KEY!,
});

// Search for products
const products = await client.search({
  query: 'blue denim jacket',
});

console.log(`Found ${products.length} products`);
products.forEach((product) => {
  console.log(`${product.title} - $${product.price.price} ${product.price.currency}`);
});

Advanced Search with Configuration

// Search with custom configuration and context
const results = await client.search({
  query: 'running shoes',
  config: {
    enrich_query: true, // Enable query enrichment
    semantic_search: true, // Enable semantic search
  },
  context: 'Looking for athletic footwear for marathon training',
  filters: {
    price: { min_price: 50, max_price: 200 },
    gender: 'male',
    brand_ids: ['nike-id', 'adidas-id'],
  },
  limit: 10,
});

Visual Search

// Search by image URL
const imageResults = await client.search({
  image_url: 'https://example.com/product-image.jpg',
});

// Search by base64 image
const base64Results = await client.search({
  base64_image: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...',
});

📚 API Reference

Client Configuration

interface Channel3ClientConfig {
  apiKey: string; // Your Channel3 API key
}

Methods

search(options: SearchRequest): Promise<Product[]>

Search for products with various options.

Parameters:

  • query?: string - Text search query
  • image_url?: string - URL of image for visual search
  • base64_image?: string - Base64-encoded image for visual search
  • config?: SearchConfig - Search configuration options
  • context?: string - Additional context for the search
  • filters?: SearchFilters - Advanced filtering options
  • limit?: number - Maximum results to return (default: 20)

getProduct(productId: string): Promise<ProductDetail>

Get detailed information about a specific product.

getBrands(options?: GetBrandsV0BrandsGetRequest): Promise<PaginatedResponseBrand>

Get list of available brands with pagination.

getBrand(brandId: string): Promise<Brand>

Get detailed information about a specific brand.

🔧 Configuration Options

Search Configuration

interface SearchConfig {
  enrich_query?: boolean; // Enable AI query enrichment (default: true)
  semantic_search?: boolean; // Enable semantic search (default: true)
}

Search Filters

interface SearchFilters {
  brand_ids?: string[]; // Filter by specific brand IDs
  gender?: 'male' | 'female' | 'unisex'; // Gender filter
  price?: {
    // Price range filter
    min_price?: number;
    max_price?: number;
  };
  availability?: AvailabilityStatus[]; // Availability filter
}

🌍 Environment Variables

  • CHANNEL3_API_KEY - Your Channel3 API key (required)

🚨 Error Handling

The SDK provides specific error types for different scenarios:

import {
  Channel3AuthenticationError, // 401 - Invalid API key
  Channel3ValidationError, // 422 - Invalid request data
  Channel3NotFoundError, // 404 - Resource not found
  Channel3ServerError, // 500 - Server error
  Channel3ConnectionError, // Network/timeout errors
} from 'channel3-sdk';

try {
  const products = await client.search({ query: 'shoes' });
} catch (error) {
  if (error instanceof Channel3AuthenticationError) {
    console.error('Invalid API key');
  } else if (error instanceof Channel3ValidationError) {
    console.error('Invalid request:', error.message);
  } else if (error instanceof Channel3ConnectionError) {
    console.error('Network error:', error.message);
  }
}

📝 License

MIT License - see LICENSE file for details.

🤝 Support


Made with ❤️ by Channel3