
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
The official Python SDK for the Channel3 AI Shopping API.
pip install channel3-sdk
import os
from channel3_sdk import Channel3Client
# Initialize the client
client = Channel3Client(api_key="your_api_key_here")
# Or use environment variable: CHANNEL3_API_KEY
# Search for products
products = client.search(query="blue denim jacket")
for product in products:
print(f"Product: {product.title}")
print(f"Brand: {product.brand_name}")
print(f"Price: {product.price.currency} {product.price.price}")
print(f"Availability: {product.availability}")
print("---")
# Get detailed product information
product_detail = client.get_product("prod_123456")
print(f"Detailed info for: {product_detail.title}")
print(f"Brand: {product_detail.brand_name}")
if product_detail.key_features:
print(f"Key features: {product_detail.key_features}")
# Get all brands
brands = client.get_brands()
for brand in brands:
print(f"Brand: {brand.name}")
if brand.description:
print(f"Description: {brand.description}")
# Get specific brand details
brand = client.get_brand("brand_123")
print(f"Brand: {brand.name}")
import asyncio
from channel3_sdk import AsyncChannel3Client
async def main():
# Initialize the async client
client = AsyncChannel3Client(api_key="your_api_key_here")
# Search for products
products = await client.search(query="running shoes")
for product in products:
print(f"Product: {product.title}")
print(f"Score: {product.score}")
print(f"Price: {product.price.currency} {product.price.price}")
# Get detailed product information
if products:
product_detail = await client.get_product(products[0].id)
print(f"Availability: {product_detail.availability}")
# Get brands
brands = await client.get_brands()
print(f"Found {len(brands)} brands")
# Run the async function
asyncio.run(main())
# Search by image URL
products = client.search(image_url="https://example.com/image.jpg")
# Search by base64 image
with open("image.jpg", "rb") as f:
import base64
base64_image = base64.b64encode(f.read()).decode()
products = client.search(base64_image=base64_image)
# Combine text and image search
products = client.search(
query="blue denim jacket",
image_url="https://example.com/jacket.jpg"
)
from channel3_sdk import SearchFilters, AvailabilityStatus
# Create search filters
filters = SearchFilters(
brand_ids=["brand_123", "brand_456"],
gender="male",
availability=[AvailabilityStatus.IN_STOCK],
price={"min_price": 50.0, "max_price": 200.0}
)
# Search with filters
products = client.search(
query="jacket",
filters=filters,
limit=10
)
# Get all brands with pagination
brands = client.get_brands(page=1, size=50)
# Search for specific brands
nike_brands = client.get_brands(query="nike")
# Get detailed brand information
brand_detail = client.get_brand("brand_123")
print(f"Brand: {brand_detail.name}")
print(f"Logo: {brand_detail.logo_url}")
Channel3Client
Synchronous client for the Channel3 API.
Methods:
search(query=None, image_url=None, base64_image=None, filters=None, limit=20)
→ List[Product]
get_product(product_id)
→ ProductDetail
get_brands(query=None, page=1, size=100)
→ List[Brand]
get_brand(brand_id)
→ Brand
AsyncChannel3Client
Asynchronous client for the Channel3 API.
Methods:
async search(query=None, image_url=None, base64_image=None, filters=None, limit=20)
→ List[Product]
async get_product(product_id)
→ ProductDetail
async get_brands(query=None, page=1, size=100)
→ List[Brand]
async get_brand(brand_id)
→ Brand
Product
id: str
- Unique product identifierscore: float
- Search relevance scoretitle: str
- Product titledescription: Optional[str]
- Product descriptionbrand_name: str
- Brand nameimage_url: str
- Main product image URLprice: Price
- Price informationavailability: AvailabilityStatus
- Availability statusvariants: List[Variant]
- Product variantsProductDetail
title: str
- Product titledescription: Optional[str]
- Product descriptionbrand_id: Optional[str]
- Brand identifierbrand_name: Optional[str]
- Brand nameimage_urls: Optional[List[str]]
- Product image URLsprice: Price
- Price informationavailability: AvailabilityStatus
- Availability statuskey_features: Optional[List[str]]
- Key product featuresvariants: List[Variant]
- Product variantsBrand
id: str
- Unique brand identifiername: str
- Brand namelogo_url: Optional[str]
- Brand logo URLdescription: Optional[str]
- Brand descriptionVariant
product_id: str
- Associated product identifiertitle: str
- Variant titleimage_url: str
- Variant image URLSearchFilters
brand_ids: Optional[List[str]]
- Brand ID filtersgender: Optional[Literal["male", "female", "unisex"]]
- Gender filterprice: Optional[SearchFilterPrice]
- Price range filteravailability: Optional[List[AvailabilityStatus]]
- Availability filtersSearchFilterPrice
min_price: Optional[float]
- Minimum pricemax_price: Optional[float]
- Maximum pricePrice
price: float
- Current pricecompare_at_price: Optional[float]
- Original price (if discounted)currency: str
- Currency codeAvailabilityStatus
Enum with values: IN_STOCK
, OUT_OF_STOCK
, PRE_ORDER
, LIMITED_AVAILABILITY
, BACK_ORDER
, DISCONTINUED
, SOLD_OUT
, UNKNOWN
The SDK provides specific exception types for different error conditions:
from channel3_sdk import (
Channel3AuthenticationError,
Channel3ValidationError,
Channel3NotFoundError,
Channel3ServerError,
Channel3ConnectionError
)
try:
products = client.search(query="shoes")
except Channel3AuthenticationError:
print("Invalid API key")
except Channel3ValidationError as e:
print(f"Invalid request: {e.message}")
except Channel3NotFoundError:
print("Resource not found")
except Channel3ServerError:
print("Server error - please try again later")
except Channel3ConnectionError:
print("Connection error - check your internet connection")
CHANNEL3_API_KEY
- Your Channel3 API keyMIT License
FAQs
The official Python SDK for Channel3 AI Shopping API
We found that channel3-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.