Retrieve official product records and source image URLs from the site's public Shopify catalog JSON. This is useful when a task needs product models, packaging references, high-resolution catalog imagery, product categorization, or product metadata for content creation.
Use Cases
Use when the task asks to locate one or more products by name or keywords and return their official Shopify handles and image assets. Use the query input as a case-insensitive literal substring match against product titles, handles, or product types. For content work, also return the matching products' variants, tags, product types, and cleaned description text.
Automation Flow
- Navigate directly to
https://asyaeparis.com/products.json?limit=250. - In the same browser call, run this page-local extractor after replacing
{query}with the caller's search text as a JSON string literal, including its quotes, such as"lipstick":
(() => {
const data = JSON.parse(document.body.innerText);
if (!Array.isArray(data.products)) {
throw new Error('Expected a Shopify products array');
}
const query = String({query} ?? '').trim();
const escaped = query.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
const pattern = escaped ? new RegExp(escaped, 'i') : null;
const clean = value => String(value || '')
.replace(/<[^>]*>/g, ' ')
.replace(/ /gi, ' ')
.replace(/&/gi, '&')
.replace(/"/gi, '"')
.replace(/'/gi, "'")
.replace(/\s+/g, ' ')
.trim();
const products = data.products
.filter(p => !pattern || pattern.test(`${p.title || ''} ${p.handle || ''} ${p.product_type || ''}`))
.map(p => ({
id: p.id ?? null,
title: p.title ?? '',
handle: p.handle ?? '',
productType: p.product_type ?? '',
productUrl: p.handle ? `/products/${p.handle}` : null,
images: (Array.isArray(p.images) ? p.images : [])
.map(image => image && image.src)
.filter(Boolean),
variants: (Array.isArray(p.variants) ? p.variants : []).map(v => ({
title: v.title ?? '',
sku: v.sku ?? null,
id: v.id ?? null
})),
tags: Array.isArray(p.tags) ? p.tags : [],
description: clean(p.body_html)
}));
return { query, count: products.length, products };
})()- Use
handleorproductUrlto identify the Shopify product,imagesfor official visual references, andproductType,description,tags, andvariantsas source metadata for product-related content.
Possible Friction Points
- The storefront exposes products through the public
/products.jsonendpoint;limit=250retrieves up to 250 products in one navigation. - The response is JSON rendered as the document body, so parse
document.body.innerTextrather than looking for storefront product cards. - If the response contains exactly 250 products, add
&page=2,&page=3, and so on to the endpoint and rerun the extractor on each page until a page returns fewer than 250 products. Use the unfiltereddata.products.lengthto decide when to stop, not the number of query matches; merge matches by productidacross pages. - Product titles, handles,
product_type, image arrays, variants, tags, andbody_htmlare the catalog fields available for matching and content reference; do not infer product identity from visual labels alone. - The query is applied locally as a case-insensitive literal match across title, handle, and product type. An empty query returns all products.
body_htmlis cleaned into plain text by the extractor, but the result remains merchant-provided source copy and should be fact-checked before making health or safety claims.