Skip to main content

langchain-channel3

Channel3 product search tools for LangChain. Give your agent search across 100M+ products from thousands of retailers, with every retailer's offer and live price.

Installation

pip install -U langchain-channel3

Set CHANNEL3_API_KEY in your environment. Create a free API key: every account gets 1,000 free credits a month. A search uses one credit; product details by ID are free, and each retailer URL lookup uses one credit.

Usage

from langchain.agents import create_agent
from langchain_channel3 import channel3_tools

agent = create_agent(
    model="anthropic:claude-sonnet-5-5",
    tools=channel3_tools(),
)

result = agent.invoke(
    {
        "messages": [
            {
                "role": "user",
                "content": "Find me a leather golf glove under $40 and tell me which retailer has it cheapest.",
            }
        ]
    }
)
print(result["messages"][-1].content)

Tools

Channel3SearchProducts (search_products)

Searches for one product type and returns in-stock products, each with up to two images and every retailer's offer.

  • query: one product type and its constraints in natural language, such as "red leather jacket under $200".
  • image_url: a public image URL for visual search. Combine it with query for text plus image.

At least one is required.

Channel3GetProducts (get_products)

Gets full product data (description, attributes, variants, images and offers) for up to 40 products in parallel.

  • product_ids: product IDs from search_products, or retailer product URLs.

Inputs that can't be resolved are listed in unresolved. The call fails only when none resolve.

Both tools use response_format="content_and_artifact". For search_products the model sees one line per product with title, brand, best price and ID; for get_products it sees JSON. The full structured result is on the ToolMessage as artifact, so your UI can render product cards from it.

Offer URLs are Channel3 buy links, so purchases earn affiliate commission for the API key's account.

Options

from langchain_channel3 import Channel3Toolkit

tools = Channel3Toolkit(api_key="...", conversation_id=chat_id, limit=12).get_tools()

The tool classes take the same options individually, for example Channel3SearchProducts(limit=12).

Option Description
api_key Channel3 API key. Defaults to CHANNEL3_API_KEY.
conversation_id Groups one chat's calls together in your Channel3 analytics.
limit Products per search, from 1 to 30. Defaults to 8. Search tool only.
base_url Overrides the API base URL.

channel3_tools(**options) is shorthand for Channel3Toolkit(**options).get_tools().

Errors

API errors go back to the model as the tool result, for example "Channel3 rejected the API key" or "The Channel3 account is out of credits", so the agent can explain the problem instead of crashing the run. Pass handle_tool_error=False to a tool to raise them as ToolException instead.

License

MIT

Metadata

Release files for langchain-channel3 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-channel3 0.1.0
File Size Uploaded Provenance Actions
langchain_channel3-0.1.0.tar.gz 160.1 kB Without provenance Details for langchain_channel3-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-channel3 0.1.0
File Interpreter ABI Platform Actions
langchain_channel3-0.1.0-py3-none-any.whl Python 3 none any Details for langchain_channel3-0.1.0-py3-none-any.whl

Total release size: 170.2 kB

Release files / langchain_channel3-0.1.0.tar.gz

Download URL langchain_channel3-0.1.0.tar.gz
Size 160.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2074b60326ad99cc62dcd6db7fe9acb2909127a6036d2d53a6925dd4e0d65ab1
BLAKE2b-256 checksum
How to use checksums
e75b6a4c561d24b75e1cef2f6db7e7dcaf49f0893676cc0887c584a90f2aadbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / langchain_channel3-0.1.0-py3-none-any.whl

Download URL langchain_channel3-0.1.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1f9dd52ac6346869d1c297948dcfc2bcb9a41950750629f66e18a1ad259a456
BLAKE2b-256 checksum
How to use checksums
a4db1ad8da36036ac297d3088e79660796bd3833a551a4daef23c93d19c3f673
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Security for langchain-channel3 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page