Reading any marketplace product page from a Chrome extension: JSON-LD first, selectors second
If you have ever tried to build a tool that "reads" a product page — an Amazon listing, a Shopify storefront, an eBay item, an Etsy shop page — you already know the problem: every marketplace renders the same conceptual data (title, bullets, description, images, price) in completely different DOM shapes. We ran into this while building AI Product Page Optimization , a Chrome extension that reads…
Building tools to read marketplace product pages, such as Amazon listings or Shopify storefronts, presents a challenge due to the varying DOM structures for the same data (title, bullets, description, images, price). The developers of AI Product Page Optimization, a Chrome extension, focused on creating a solution for this issue.
The core of their approach is to first extract structured data using JSON-LD before applying platform-specific DOM selectors. JSON-LD provides a normalized data shape that is not affected by layout changes or encoding edge cases, unlike regex-over-HTML methods. However, JSON-LD alone is not a complete solution, as marketplaces often include richer or more current data in their DOM.
To address this, the team applies platform-specific DOM selectors as a scoped fallback after JSON-LD extraction. The four platforms they read, Amazon, Shopify, eBay, and Etsy, each have unique characteristics that require tailored approaches. Amazon's DOM is deep and nested with frequent class-name changes, while Shopify offers a more uniform target. eBay's item-specific layouts require different parsing strategies, and Etsy's listing copy requires special attention for downstream generation.
Constraints play a significant role in determining how the extracted data is presented. Each marketplace has specific requirements for the formatted copy, such as character limits on Amazon or length caps on eBay. Additionally, the output language should match the detected page language to ensure better workflow for sellers. The developers also implemented a stateless extension that runs in the page context, allowing for real-time reading of the live page and sending only the necessary data onward.
This approach keeps the extension compatible with platform policies and minimizes the data footprint. The final step in the process is a human review before any optimized copy is sent back to the marketplace. AI Product Page Optimization follows a credit-based system for generated suggestions, with text suggestions earning one credit and AI-enhanced images earning two credits.
The extension provides a web dashboard for review, with features like before/after comparison, history, and optional share links. Users can approve or reject the suggested changes before publishing.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.