Sign in Start free
ECOMMERCE

Product schema markup from page data

Use when you need valid Product structured data for a page and want no invented fields.

product-schema-markup.md
Download .md
Generate JSON-LD Product structured data for this page.

Page data:
- Product name: {{PRODUCT_NAME}}
- URL: {{PRODUCT_URL}}
- SKU and MPN: {{SKU_AND_MPN}}
- Brand: {{BRAND}}
- Description: {{DESCRIPTION}}
- Images: {{IMAGE_URLS}}
- Price and currency: {{PRICE_AND_CURRENCY}}
- Availability: {{AVAILABILITY}}
- Shipping and returns: {{SHIPPING_AND_RETURNS}}
- Reviews and rating: {{REVIEW_DATA}}
- Variants: {{VARIANTS}}

Rules:
- Output valid JSON-LD in a single script block, nothing else above it.
- Include only properties backed by the data above. Do not add gtin, aggregateRating, review or shippingDetails if the data is not supplied.
- Aggregate rating must match the number and value visible on the page. If review data is absent, omit the property entirely.
- If variants are supplied, model them correctly rather than flattening them into one offer.
- After the JSON, list: (a) properties omitted and what data would be needed to add them, (b) anything in my input that would fail validation and why.
- Do not invent example.com placeholders in the final markup. If a URL is missing, say so instead.

Fill in before running

Replace each placeholder with your own detail. The more specific you are, the less the model invents.

  • {{PRODUCT_NAME}}
  • {{PRODUCT_URL}}
  • {{SKU_AND_MPN}}
  • {{BRAND}}
  • {{DESCRIPTION}}
  • {{IMAGE_URLS}}
  • {{PRICE_AND_CURRENCY}}
  • {{AVAILABILITY}}
  • {{SHIPPING_AND_RETURNS}}
  • {{REVIEW_DATA}}
  • {{VARIANTS}}

Getting a better result

  1. Never let it fill in a rating. A mismatch between markup and visible reviews is a manual action risk.
  2. Ask for the omitted-properties list every time - it doubles as a data gap audit for the whole catalog.
  3. Validate the output before templating it. One malformed variant block breaks the entire item.

Questions about this prompt

When should I generate this rather than trust the platform output?

When your storefront emits nothing, or emits Product markup that does not match the page. Most platforms generate something automatically, so run this where the automatic output flattens variants or carries fields the page never shows. A page with no price and no reviews needs very little markup and is not worth the pass.

What page data do I have to hand it?

The values as they render on the page: name, URL, SKU and MPN, brand, description, images, price and currency, availability, shipping and returns, review data and variants. The review figures must be the number and rating a visitor can see, not the ones in your admin, because those two drift apart.

What comes back besides the markup?

One JSON-LD block, then a list of properties omitted with the data needed to add them, and anything in your input that would fail validation. The omitted list is what the tips call a data gap audit. Run it across a few templates and it tells you what the whole catalogue is missing.

What is the risky property here?

Letting a rating into the markup that the page does not display. A mismatch between structured data and visible reviews is the classic manual action risk in this area. Validate before templating, too, since one malformed variant block invalidates the entire item rather than just the offer it sits in.