Retrieve the most recently published products from Glamorique's live Shopify catalog or a named collection, including fields needed for promotional use. The default result is the three newest products; when a collection is specified, restrict the result to products currently returned by that collection's Shopify JSON endpoint.
Use Cases
Use when a caller needs current products from Glamorique's catalog or collections, especially when promotional output must contain only products presently exposed by the site.
Automation Flow
- Build the direct Shopify JSON URL, without visiting the homepage or collection grid:
- Entire catalog:
https://glamorique.shop/collections/all/products.json?limit=250 - Named collection:
https://glamorique.shop/collections/{collection-handle}/products.json?limit=250 - Newly listed collection:
https://glamorique.shop/collections/new-and-necessary/products.json?limit=250
- Entire catalog:
- Optional collection handles confirmed on the site include
accessories,new-and-necessary,sale,mystery-boxes,under-30, andbest-sellers. - In the same browser call, navigate to the selected URL and run this
evaluate()function on the loaded JSON document:
(() => {
try {
const data = JSON.parse(document.body.innerText);
const products = Array.isArray(data.products) ? data.products : [];
const timestamp = p => p.published_at || p.created_at || '';
const newest = products
.slice()
.sort((a, b) => timestamp(b).localeCompare(timestamp(a)));
return {
count: products.length,
products: newest.map(p => ({
id: p.id ?? null,
title: p.title ?? null,
handle: p.handle ?? null,
created: p.created_at ?? null,
published: p.published_at ?? null,
price: p.variants?.[0]?.price ?? null,
image: p.images?.[0]?.src ?? null,
url: p.handle ? `https://glamorique.shop/products/${p.handle}` : null
}))
};
} catch (e) {
return { error: String(e), sample: document.body.innerText.slice(0, 300) };
}
})()- If the response can exceed 250 products, request additional Shopify-supported pages, combine their
productsarrays, then sort the combined set before selecting the newest three.
Possible Friction Points
- Glamorique exposes live Shopify collection contents through
/collections/{handle}/products.json; this avoids collection-grid markup and duplicate product links. - The JSON response is rendered as raw JSON in
document.body.innerText, not as a normal product-grid page. - Sort descending by
published_at, falling back tocreated_atwhen publication time is absent. - The
new-and-necessarycollection page is at/collections/new-and-necessary; use its JSON counterpart when the request refers to newly listed products. - Use each product's
handlefor its canonical URL; do not infer URLs from titles. - Collection-grid pages may require delays and expose mixed navigation/content text; prefer the JSON endpoint for reliable product-only extraction.
- The collection endpoint is the source of truth for ensuring promotional products are currently present on the site.