ecom-intel-engine
v0.1.1
Published
Category-agnostic e-commerce product intelligence: trend detection, price volatility, and opportunity/sourcing scores. Data-source agnostic — feed it product records from any scraper or API.
Maintainers
Readme
ecom-intel-engine
Category-agnostic e-commerce product intelligence. Trend detection, price-volatility, and opportunity/sourcing scores — for any product category.
It does not scrape. You feed it product records from any source (XCrawl, Keepa, Rainforest, Amazon PA-API, a CSV…) and it returns scores. Scrapers break and proxies get blocked; the scoring logic is the durable asset.
Why decoupled?
Real-time scraping is fragile (Amazon CAPTCHAs, proxy bans, layout changes). By separating data acquisition from analysis, the same engine keeps working no matter where the data comes from — and you can sell the analysis as data, an API, or an SDK.
Install
npm install ecom-intel-engineQuick start
const { analyzeDataset } = require('ecom-intel-engine');
const products = [
{ asin: 'B01', title: 'Vitamin C Serum', price: 24.99, rating: 4.6, reviews: 8200, category: 'Skincare',
reviewsHistory: [{ count: 6000, at: '2026-05-01' }, { count: 8200, at: '2026-06-01' }] },
{ asin: 'B02', title: 'Jade Roller', price: 9.99, rating: 4.3, reviews: 120, category: 'BeautyTools' },
];
const { products: analyzed, summary } = analyzeDataset(products);
console.log(summary.topOpportunities);
// [{ id: 'B01', title: 'Vitamin C Serum', score: 81.4, category: 'Skincare' }, ...]What it computes
| Output | Meaning |
|--------|---------|
| trendingScore | Relative review growth over the available history window |
| isTrending | True when baseline ≥ 100 reviews and growth ≥ 50% (noise-filtered) |
| reviewVelocityPerDay | Reviews gained per day (needs timestamped history) |
| priceVolatility | Coefficient of variation of price history |
| opportunityScore | 0–100 sourcing/private-label viability (demand · margin · quality · competition) |
| opportunityRank | Rank within the dataset |
Opportunity score dimensions
- demand — log-scaled review count (proven sales)
- margin — price headroom (sweet spot ~$20–60)
- quality — rating fit (4.0–4.8 ideal; suspiciously perfect penalized)
- competition — reviews vs. category median (below median = opening)
Weights are tunable:
analyzeDataset(products, { weights: { demand: 0.4, margin: 0.2, quality: 0.2, competition: 0.2 } });API
analyzeDataset(products, opts?)→{ products, summary }(computes category medians for competition scoring)analyzeProduct(product, ctx?)→ single product reportdetectTrend(product, opts?)→ trend blockpriceStability(product)→ price volatility blockopportunityScore(product, ctx?)→{ score, breakdown }
Input shape
{
id | asin: string,
title: string,
price: number,
rating: number, // 0-5
reviews: number,
category?: string,
reviewsHistory?: [{ count: number, at: string }],
priceHistory?: [{ price: number, at: string }],
isBestSeller?: boolean,
isAmazonChoice?: boolean
}Want the data, not the code?
A ready-made dataset of 829 real Amazon products scored with this engine (CSV + JSON + market report) is available here: 👉 Amazon Product Opportunity Scores
License
MIT
