About

An API that takes any live product page URL, fetches the HTML, and returns a clean, structured product card as JSON. Title, description, category, images, price, availability, brand and variant attributes. Built as a technical challenge.

The interesting part is not the fetching but the extraction. Arbitrary, messy e-commerce markup has to become a strict, typed schema without the model inventing anything.

Key Features

  • Any listing URL in, structured JSON out. No per-site scrapers or CSS selectors to maintain.
  • Schema-enforced extraction. A Zod schema constrains the model at the API layer, so the service validates every response rather than hoping.
  • No invented data. Missing fields drop out entirely instead of being guessed, which matters more than completeness downstream.
  • Normalised output. Prices come back as numeric values with a separate currency, and attribute keys stay camelCase.
  • Variant attributes. Size, colour and material options arrive as structured arrays rather than free text.
  • Browser-like fetching. Realistic headers mean more storefronts return usable markup.

Tech Stack

  • TypeScript
  • Hono
  • Node.js
  • OpenAI GPT-4.1
  • Zod
  • Docker

Source Code