E-commerce

Product Review

/extract/json

Schema for individual product reviews from e-commerce platforms.

Download the schemae-commerce/product-review.json

product-review.schema

// names marked ? are optional

product_id?:string// Platform product identifier (ASIN, SKU, etc.). Commonly found in: URL parameter, product ID field, review page metadata.
product_name:string// Name of the reviewed product. Commonly found in: product review page title, reviewed product link, review header.
platform:string// Platform where the review was posted. Commonly found in: site domain, platform branding, page footer.
review_id?:string// Platform-specific review identifier. Commonly found in: review URL anchor, review ID in page data, HTML element ID.
reviewer_name?:string// Display name of the reviewer. Commonly found in: reviewer name label, reviewer profile link, review header.
reviewer_verified_purchase?:boolean// Whether the reviewer made a verified purchase. Commonly found in: verified purchase badge, review metadata, reviewer status label.
rating:number// Numeric star rating given by the reviewer. Commonly found in: star rating display, review rating number, JSON-LD ratingValue.
title?:string// Title or headline of the review. Commonly found in: review title heading, review headline, h3/h4 tag in review.
body:string// Full text body of the review. Commonly found in: review body text, review content area, review paragraph.
review_date:string// Date the review was posted. Commonly found in: review date label, review metadata, article:published_time tag.
helpful_votes?:number// Number of helpful votes for this review. Commonly found in: helpful vote count, found helpful label, review voting section.
sentiment?:string// Overall sentiment of the review. Commonly found in: NLP sentiment analysis, rating-derived classification, star count. One of: positive, neutral, negative, other.
topics_mentioned?:string[]// Key topics or aspects mentioned in the review. Commonly found in: NLP topic extraction, platform review topics, review aspect labels.
pros?:string[]// List of positives mentioned in the review. Commonly found in: pros section, positive highlights, NLP extracted pros.
cons?:string[]// List of negatives mentioned in the review. Commonly found in: cons section, negative highlights, NLP extracted cons.
seller_response?:string// Seller or brand response to the review, if any. Commonly found in: seller response section, brand reply, review reply block.
country?:string// Country where the review was submitted from. Commonly found in: review location metadata, country flag in review, reviewer location.
language?:string// Language of the review text (BCP 47 code). Commonly found in: lang attribute, review language metadata, detected language.
page_title?:string// Title of the source page. Tabstack auto-fills this from page metadata when left empty.
favicon?:string// Favicon URL of the source page. Tabstack auto-fills this from page metadata when left empty.

Try it live

A sample Product Review document, generated from the schema. Edit it, or paste a real response, and see it checked against the schema instantly. It runs in your browser, nothing is sent anywhere.

your-output.json
validation

Valid, matches Product Review

Every required field is present and each value matches its type. Extra fields are allowed. A field the page does not carry is not guaranteed to come back as null, so check values rather than only checking for null.

/extract/json

Copy-paste usage

The same call in TypeScript, Python, and curl. Point it at your own URL and go. The schema drives the response, so you get back the fields you asked for instead of a page to parse.

Features

  • Typed TypeScript and Python SDKs
  • One call, no parsing code and no second LLM pass
  • The same field names on every request, even when the page layout changes
product-review.ts
// curl -sfLO https://raw.githubusercontent.com/Mozilla-Ocho/tabstack-schemas/main/e-commerce/product-review.json
import Tabstack from '@tabstack/sdk'
import schema from './product-review.json' with { type: 'json' }

const client = new Tabstack() // reads TABSTACK_API_KEY from the environment

try {
  const data = await client.extract.json({
    url: 'https://example.com/products/item',
    json_schema: schema,
    effort: 'standard', // 'min' | 'standard' | 'max'
  })

  console.log(data)
} catch (err) {
  console.error('Extraction failed:', err)
}

Ship this schema in one call.

Pass a URL, get matching JSON back. Free to start, no extraction layer to maintain.