Skip to content

flocom/AliLens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AliLens — AliExpress Review Analyzer by Variant

Chrome extension that scrapes and analyzes all reviews from any AliExpress product, breaking them down by variant (color, size, model) so you can instantly see which option buyers love most.

Chrome Extension Manifest V3 Vanilla JS License: MIT


The Problem

AliExpress shows reviews for an entire product listing — but a single listing can have dozens of variants (colors, sizes, materials). You have no way to know:

  • Which color actually looks good in real life?
  • Which size runs true?
  • Is that specific model the one with quality issues?

AliLens solves this. One click, and you get a full breakdown of every variant with ratings, review counts, and real buyer comments.


Features

  • Full review scraping — Fetches every single review via AliExpress's internal API, not just the first page
  • Variant breakdown — Groups reviews by SKU variant (color, size, model, material) with automatic multilingual normalization
  • Smart rating table — Sortable columns: review count, average rating, star distribution (1-5), photo count
  • In-page widget — Injects an "Analyze" button directly into the AliExpress review section with a live progress bar
  • CSV export — One-click download of the full analysis, UTF-8 with BOM for Excel compatibility
  • 1-hour cache — Results are cached locally so you don't re-scrape the same product
  • Auto-pagination — Handles products with thousands of reviews, fetching 50 per request with rate-limit backoff
  • Zero dependencies — Pure vanilla JavaScript, no frameworks, no build step, no npm

Screenshots

In-page analysis button with progress bar

The widget appears directly in the AliExpress review section:

┌─────────────────────────────────────────────────┐
│  [████████████████░░░░]  850 / 1200 reviews (71%)│
│  Fetching reviews...                             │
└─────────────────────────────────────────────────┘

Popup results table

┌──────────────┬─────────┬────────┬──★5─┬──★4─┬──★3─┬──★2─┬──★1─┬──📷──┐
│ Variant      │ Reviews │ Rating │     │     │     │     │     │      │
├──────────────┼─────────┼────────┼─────┼─────┼─────┼─────┼─────┼──────┤
│ Black / XL   │   47    │  4.6   │  32 │  10 │  3  │  1  │  1  │  12  │
│ White / M    │   23    │  4.2   │  15 │   4 │  2  │  1  │  1  │   5  │
│ Red / S      │   12    │  3.8   │   6 │   3 │  1  │  1  │  1  │   3  │
└──────────────┴─────────┴────────┴─────┴─────┴─────┴─────┴─────┴──────┘

Installation

  1. Download — Clone or download this repository
    git clone https://github.com/flocom/AliLens.git
  2. Load in Chrome — Go to chrome://extensions/, enable Developer mode, click Load unpacked, select the AliLens folder
  3. Use it — Navigate to any AliExpress product page, click the AliLens button in the review section or the extension icon

How It Works

AliExpress Product Page
        │
        ▼
┌─ Content Script ──────────────┐
│ • Detects product page        │
│ • Extracts product ID         │
│ • Injects analysis widget     │
│ • Sends product info to SW    │
└───────────────┬───────────────┘
                │
                ▼
┌─ Service Worker ──────────────┐
│ • Fetches reviews via API     │──► feedback.aliexpress.com/pc/searchEvaluation.do
│ • Paginates automatically     │
│ • Parses & aggregates data    │
│ • Caches results (1h TTL)     │
│ • Broadcasts progress updates │
└───────────────┬───────────────┘
                │
                ▼
┌─ Popup UI ────────────────────┐
│ • Sortable variant table      │
│ • Star distribution breakdown │
│ • Recent comments per variant │
│ • CSV export                  │
└───────────────────────────────┘

API Details

AliLens uses the confirmed public endpoint:

GET https://feedback.aliexpress.com/pc/searchEvaluation.do
    ?productId={id}
    &page={n}
    &pageSize=50
    &filter=all
    &sort=complex_default

Key response fields:

  • data.evaViewList[] — Array of review objects
  • data.totalNum — Total review count
  • data.totalPage — Total pages
  • buyerEval — Rating on 0-100 scale (100=5★, 80=4★, 60=3★, 40=2★, 20=1★)
  • skuInfo — Variant string (e.g. "Color:Purple Material:ABS")

Variant Normalization

Reviews come in many languages. AliLens normalizes variant keys across languages:

Input Normalized
color, colour, couleur, farbe, colore Color
size, taille, tamaño, größe Size
model, modèle Model
material, matériau Material

Project Structure

AliLens/
├── manifest.json              # Chrome Extension Manifest V3
├── background/
│   └── service-worker.js      # API orchestration, caching, progress broadcasting
├── content/
│   └── content.js             # Product detection, widget injection
├── popup/
│   ├── popup.html             # Extension popup UI
│   ├── popup.css              # Styles (600×700px popup)
│   └── popup.js               # Table rendering, sorting, CSV trigger
├── utils/
│   ├── api.js                 # AliExpress feedback API client with retry & pagination
│   ├── parser.js              # Review normalization, variant aggregation
│   └── csv.js                 # CSV generation with UTF-8 BOM
└── icons/
    ├── icon16.png
    ├── icon48.png
    └── icon128.png

Technical Details

Aspect Detail
Manifest V3 (service worker, no background pages)
Permissions activeTab, scripting, storage
Host permissions *://*.aliexpress.com/*
Page size 50 reviews/request (API supports up to 100)
Rate limiting 400ms delay between requests, exponential backoff on failure
Retry 3 attempts per request
Cache chrome.storage.local, 1-hour TTL per product
Dependencies None — vanilla JavaScript only
Build step None — load directly into Chrome

Supported AliExpress URL Formats

  • https://www.aliexpress.com/item/1234567890.html
  • https://fr.aliexpress.com/item/1234567890.html
  • https://*.aliexpress.com/i/1234567890.html
  • Any locale variant (es., de., ru., etc.)

Edge Cases Handled

  • No reviews — Shows "No reviews found" message
  • No variant info — Categorized as "Unknown variant"
  • Single variant — Table still displays with full breakdown
  • Network errors mid-scrape — Retries 3 times, then returns partial results with a warning
  • Rate limiting / CAPTCHA — Detects 403/429 responses, returns partial results and notifies the user
  • Dynamic page loading — MutationObserver waits for the review section to render before injecting the widget

Contributing

This is a personal-use extension, but contributions are welcome. Feel free to open issues or PRs.


Privacy

AliLens respects your privacy. Here is exactly what the extension does and does not do with your data:

Data collected: None. AliLens does not collect, store, transmit, or share any personal data.

Network requests: The extension only makes requests to feedback.aliexpress.com to fetch publicly available product reviews. No data is sent to any other server, analytics service, or third party.

Local storage: Analysis results are cached locally in your browser (chrome.storage.local) for 1 hour per product to avoid redundant API calls. This data never leaves your device and is automatically cleared.

No tracking: AliLens contains no analytics, no telemetry, no ads, no fingerprinting, and no third-party scripts.

No account required: The extension works without any login or registration.

Permissions used:

Permission Why
activeTab Detect AliExpress product pages and inject the analysis widget
scripting Inject the content script that reads the product ID and renders results
storage Cache results locally for 1 hour to avoid re-fetching
tabs Send progress updates from the service worker to the content script
*://*.aliexpress.com/* Run the content script on AliExpress and fetch reviews from their public API

Open source: The entire source code is available in this repository for audit.


Disclaimer

This extension is for personal use only. It accesses AliExpress's public feedback API endpoints. Use responsibly and respect AliExpress's terms of service. The author is not responsible for any misuse.


License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages