Barcode Lookup API

One barcode, 8 marketplaces, results on screen as they arrive.

A REST API that fetches barcode-based price comparisons and product info from 8 Turkish e-commerce platforms.

Role
Backend, data collection
Year
2025
Status
Live
Stack
Node.js · Puppeteer · Cheerio · Redis · SSE
Links

Architecture

Architecture

Live demo · Prototype illustration, not a real screenshot
  1. 01

    REST + SSE

    Express. Price comparisons stream over Server-Sent Events, the cheapest price is marked automatically and exports to CSV.

  2. 02

    8 scrapers

    Plain HTTP + Cheerio for server-rendered sites; Chrome only where it is needed.

  3. 03

    Redis cache

    Each barcode:platform pair for 24 hours. Without Redis the API keeps working, uncached.

Screens

01 / 02

Price comparison, a real query

Prices from 8 marketplaces for two barcodes; missing ones in grey, the cheapest marked.

Real screenshots, matched to language and theme

How it works

Two services, one API

Price comparison and product info started as two separate services. I merged and restructured them into one service with a shared browser and cache layer. Supported: Trendyol, Hepsiburada, Pazarama, CarrefourSA, Mopaş, Afta Market, Şok Market and Market Karşılaştır.

Parallel scraping, streaming results

In price mode all 8 platforms are scraped at once, each in its own tab. Nobody waits for the slowest marketplace: every result reaches the screen over SSE the moment it is found.

Opening Chrome only when needed

Server-rendered sites return the same HTML to a plain HTTP request, so they are fetched with axios instead of Chrome, using far less CPU and RAM. Where a browser is needed, Puppeteer (stealth) runs with image, style, font and media requests blocked up front.

First found wins

In product info mode every platform is searched in parallel and the first to find the product wins; the category path is then read from the product page. Found products are stored and served instantly next time, and barcodes that were not found are skipped in later runs.

In real use

The API is integrated into the pre-accounting software of the company I work for. It is used inside that program to fetch product prices by barcode and compare them across platforms.