// 1. Search for products
const search = await client.search({
query: "best wireless mice for gaming 2025",
columns: [
{ key: "name", label: "Name", type: "text" },
{ key: "brand", label: "Brand", type: "text" },
],
max_results: 5,
});
// 2. Enrich with full detail
const enriched = await client.enrich({
items: search.results.map(r => ({ data: r.data })),
columns: [
{ key: "name", label: "Name", type: "text" },
{ key: "brand", label: "Brand", type: "text" },
{ key: "price", label: "Price", type: "number" },
{ key: "dpi", label: "Max DPI", type: "number" },
{ key: "weight", label: "Weight (g)", type: "number" },
{ key: "features", label: "Features", type: "tags" },
{ key: "description", label: "Description", type: "text" },
],
});
for (const item of enriched.items) {
console.log(`${item.data.name} — ${item.data.price}g, ${item.data.dpi} DPI`);
}