Skip to main content
Channel3 refreshes tens of millions of products daily and records their price history. With the Price Tracking API, you can subscribe to any product and receive a webhook the moment its price changes — the foundation of a deal finder or “time-to-buy” UX.

Start tracking a product

Subscribe to price change notifications by calling the start-tracking endpoint with a canonical product_id (any ID from a search or lookup result).
import Channel3 from "@channel3/sdk";

const client = new Channel3();

await client.priceTracking.start({
  canonical_product_id: "2yh8WH5",
});

console.log("Now tracking price changes for product 2yh8WH5");

Stop tracking

await client.priceTracking.stop({ canonical_product_id: "2yh8WH5" });

Fetch price history

Once a product is tracked, retrieve its full price history for a “time-to-buy” chart. History accumulates from the moment you start tracking, and also pulls from Channel3’s existing historical data where available.
const history = await client.priceTracking.getHistory({
  canonical_product_id: "2yh8WH5",
});

for (const point of history.price_history) {
  console.log(point.timestamp, point.price, point.currency);
}

List your subscriptions

See all products you’re currently tracking:
const subs = await client.priceTracking.listSubscriptions();
console.log(subs.subscriptions.map(s => s.canonical_product_id));

Webhooks

Configure a webhook endpoint in the Channel3 dashboard to receive real-time notifications whenever a tracked product’s price changes. Channel3 sends a POST request to your endpoint with the product ID and new price.

Webhook event catalog

Full payload schema and event types for price change notifications.

Example webhook handler (Next.js)

TypeScript
// app/api/price-webhook/route.ts
import { NextRequest, NextResponse } from "next/server";

export async function POST(req: NextRequest) {
  const event = await req.json();

  if (event.type === "price.changed") {
    const { canonical_product_id, new_price, currency } = event.data;
    // Notify users who saved this product, update your UI, etc.
    await notifyUsers(canonical_product_id, new_price, currency);
  }

  return NextResponse.json({ received: true });
}

Build a deal finder

The highest-converting shopping experience you can build is a deal finder. Here’s the full pattern:
  1. When a user saves or views a product, call priceTracking.start to subscribe.
  2. Display the price history chart using the price-chart UI component or GET /v0/price-tracking/history/{id}.
  3. When Channel3 fires a webhook, push a notification to your user.
// 1. User saves a product
async function onProductSave(productId: string) {
  await channel3Client.priceTracking.start({ canonical_product_id: productId });
}

// 2. On the product page, load price history
async function loadPriceHistory(productId: string) {
  return channel3Client.priceTracking.getHistory({ canonical_product_id: productId });
}

// 3. Webhook fires → notify the user
// (see webhook handler above)

Price history UI component

Don’t want to build the chart yourself? The Channel3 UI library ships a price-chart component:
npx shadcn@latest add https://ui.trychannel3.com/r/all.json
import { PriceChart } from "@/components/channel3/price-chart";

<PriceChart
  history={priceHistory.price_history}
  currentPrice={product.offers[0].price}
/>

UI + Hooks

The full component library — search, PDP, price charts, and headless hooks.