Most price-monitoring and e-commerce catalog pipelines either brittle-code CSS selectors for every single storefront or launch headless Playwright/Puppeteer containers that burn 400+ MB of RAM just to extract structured product data that is already sitting in <script type="application/ld+json">, OpenGraph meta tags, or Schema.org Microdata.
We built an open-source TypeScript + Cheerio Apify Actor (GitHub | Apify Store) that normalizes any public product page—across WooCommerce, BigCommerce, Shopify, Magento, and custom stores—into one uniform JSON schema inside a 128 MB RAM container at $1.50 / 1,000 parsed products ($0.0015 / URL, $0 start fee).
Real-World Schema Quirks We Solved in Pure TypeScript
Parsing real e-commerce stores quickly reveals why naive JSON.parse(ldJson).offers.price breaks across platforms:
-
WooCommerce
@graph+UnitPriceSpecification+ HTML in Categories: WooCommerce routinely nestsProductinside@graph, linksbrand/sellervia@idreferences, stores price insideoffers[0].priceSpecification[0].price(UnitPriceSpecification) rather thanoffers[0].price, and embeds raw<a href="...">anchor tags insidecategory. Our normalizer builds a per-page@idlookup map, traversespriceSpecification, resolvesImageObjects, and strips HTML tags + entities cleanly. -
BigCommerce
ProductGroup+hasVariant: Stores running BigCommerce Stencil themes frequently wrap variants under@type: "ProductGroup"withproductGroupIDandhasVariant[]arrays of variantProducts +AggregateOfferranges. Our extractor merges top-levelProductGroupfields with variant offers (InStockpreferred, lowest price fallback) and variant SKUs/images. -
Shopify Multi-Script Blocks +
BreadcrumbListCategory Inference: Many Shopify themes emit separateBreadcrumbList,Product, andWebPageJSON-LD blocks—withProduct.categoryomitted. We reconstruct clean hierarchical categories (Store > Tools > Toolkits) fromBreadcrumbListwhile stripping leading"Home"and trailing product-title items. -
Custom Store Numeric SKUs, Entity-Encoded Descriptions & Fallbacks:
Some stores emit numeric
sku: 4295or HTML entities (',‘,’) inside JSON-LD strings, or omit JSON-LD entirely in favor of OpenGraph (product:price:amount,og:price:currency) or Microdata ([itemscope][itemtype*="schema.org/Product"]). Our pipeline mergesjson-ld->opengraph->metain deterministic priority and explicitly rejects non-product pages (isProduct: false) and 404s at $0.00 PPE charge. -
Zero-Browser
sitemap.xmlDiscovery: EnablediscoverFromSitemap: trueon any store root (robots.txt,/sitemap_products_1.xml,/product-sitemap.xml,/xmlsitemap.php,/sitemap.xml) to auto-discover product URLs capped safely bymaxProducts(default25).
Verified Live Apify Cloud Benchmark (128 MB RAM)
Across 5 real public stores (woocommerce.com/products/woocommerce-subscriptions/, mountaincrestgardens.com/gasteraloe-flow/, ifixit.com/products/pro-tech-toolkit, adafruit.com/product/4295, and prusa3d.com/product/original-prusa-mk4s-3d-printer-kit/):
-
Extracted:
5/5normalized product records (1WooCommerce,1BigCommerceProductGroup,1Shopify,2custom JSON-LD stores) -
Peak Container RAM:
73.1 MB(61.7 MBaverage inside a128 MBcontainer) -
Total Run Duration:
45.81s(39.51sextraction including a 23.9s EU origin retry) -
Compute Units:
0.00159 CU($0.000458total platform cost)
Use as a Hosted Streamable HTTP MCP Server
{
"mcpServers": {
"universal-ecommerce-schema": {
"url": "https://mcp.apify.com/?actors=deliberate_gratitude_shj/universal-ecommerce-schema-api",
"headers": {
"Authorization": "Bearer <YOUR_APIFY_TOKEN>"
}
}
}
}
Run via API / n8n (n8n_workflow.json included)
curl -X POST "https://api.apify.com/v2/acts/deliberate_gratitude_shj~universal-ecommerce-schema-api/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"urls": [
"https://woocommerce.com/products/woocommerce-subscriptions/",
"https://mountaincrestgardens.com/gasteraloe-flow/",
"https://www.ifixit.com/products/pro-tech-toolkit"
],
"maxProducts": 25
}'
Top comments (0)