shopify-jsonld-parser

Parse JSON-LD structured data from Shopify product pages to extract commerce details like product info, offers (price, currency, availability), and inventory status from schema.org/Product and Offer. Use when: (1) analyzing Shopify HTML for product offers/pricing/stock, (2) extracting structured commerce data from web pages or local files, (3) querying JSON-LD for availability (InStock/OutOfStock/PreOrder), prices across variants, or offer counts. Handles @graph arrays and multiple scripts.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "shopify-jsonld-parser" with this command: npx skills add igorganapolsky/shopify-jsonld-parser

Shopify JSON-LD Parser

Parse JSON-LD from Shopify product pages (or any schema.org/Product JSON-LD) to extract structured commerce data reliably.

Quick Start

  1. Fetch HTML: web_fetch a product page URL.
  2. Parse: Run scripts/parse_shopify_jsonld.py input.html (outputs JSON).
  3. Query output for offers, availability, etc.

Example:

exec command="python3 skills/shopify-jsonld-parser/scripts/parse_shopify_jsonld.py page.html"

Workflow

  1. Input: HTML file/path with JSON-LD (from web_fetch, read, or local).
  2. Find JSON-LD: Script extracts all <script type="application/ld+json"> contents.
  3. Parse Product: Traverse @graph or root for @type: Product, extract:
    • name, description, image, sku, brand
    • offers: array of Offer objects → price, priceCurrency, availability, url, itemCondition
    • availability (product-level or per-offer): http://schema.org/InStock, OutOfStock, PreOrder, etc.
    • Variants: Infer from multiple offers or hasVariant.
  4. Output: Clean JSON: {product: {...}, offers: [...], inventory_status: "InStock|OutOfStock|Limited|Unknown"}

Inventory is typically availability enum, not exact quantity (use Shopify API for levels). Map:

  • InStock → available
  • OutOfStock → unavailable
  • PreOrder/BackOrder → preorder

Usage Examples

Extract offers from page:

read path="shopify-page.html" → html
write path="tmp.html" content=html
exec command="python3 skills/shopify-jsonld-parser/scripts/parse_shopify_jsonld.py tmp.html" → parsed.json
read path="parsed.json"

Query CLI-style: Add --query price or --field offers[0].availability flags to script.

Script Reference

scripts/parse_shopify_jsonld.py [input.html] [--query FIELD] [--output json|yaml]

  • Handles malformed JSON-LD gracefully.
  • Supports multiple @graph items.
  • Validates schema.org types.

Schema Reference

See references/schema.md for schema.org/Product + Offer properties.

Troubleshooting

  • No JSON-LD: Returns {error: "No product JSON-LD found"}
  • Multiple products: Takes first @type:Product.
  • Dynamic Liquid: Static HTML only (no JS-rendered).

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Img2img

Generate images from text descriptions using DALL-E 3 while adhering to usage policies and avoiding realistic human faces.

Registry SourceRecently Updated
General

Habitat-GS-Navigator

Navigate and interact with photo-realistic 3DGS environments via the Habitat-GS Bridge. Use when: user asks to explore a 3D scene, perform embodied navigatio...

Registry SourceRecently Updated
General

Memory Palace

持久化记忆管理。Use when: 用户告诉你个人信息/偏好/习惯、需要记住项目状态/技术决策、完成任务后有可复用经验、用户说"记住""别忘了""下次注意"、需要回忆之前的对话内容。支持语义搜索和时间推理。

Registry SourceRecently Updated
General

Podcast Transcript Mining Authority Positioning

Extract guest appearances, speaking topics, and soundbites from podcast transcripts to build authority portfolios and generate podcast pitch templates. Use w...

Registry SourceRecently Updated