DEV Community

Алексей Спинов
Алексей Спинов

Posted on

How to Scrape Shopify Store Data (Products, Prices, Collections)

Shopify stores have a built-in JSON API. No scraping needed — just add .json to URLs.

The Secret: /products.json

Every Shopify store exposes product data:

curl 'https://any-shopify-store.com/products.json?limit=250'
Enter fullscreen mode Exit fullscreen mode

Returns: product title, description, price, images, variants, inventory status.

Node.js Example

async function getShopifyProducts(storeUrl) {
  const url = `${storeUrl}/products.json?limit=250`;
  const res = await fetch(url, {
    headers: { 'User-Agent': 'ProductResearch/1.0' }
  });
  const data = await res.json();

  return data.products.map(p => ({
    title: p.title,
    vendor: p.vendor,
    type: p.product_type,
    price: p.variants[0]?.price,
    comparePrice: p.variants[0]?.compare_at_price,
    available: p.variants[0]?.available,
    images: p.images.length,
    tags: p.tags,
    url: `${storeUrl}/products/${p.handle}`
  }));
}
Enter fullscreen mode Exit fullscreen mode

Other Shopify Endpoints

/collections.json          — all collections
/collections/all/products.json  — all products
/cart.json                 — current cart
/search/suggest.json?q=term — search suggestions
Enter fullscreen mode Exit fullscreen mode

Pagination

Shopify limits to 250 products per page:

async function getAllProducts(storeUrl) {
  let page = 1;
  const all = [];
  while (true) {
    const url = `${storeUrl}/products.json?limit=250&page=${page}`;
    const res = await fetch(url);
    const data = await res.json();
    if (!data.products.length) break;
    all.push(...data.products);
    page++;
  }
  return all;
}
Enter fullscreen mode Exit fullscreen mode

Use Cases

  1. Price monitoring — track competitor Shopify store prices
  2. Product research — what's selling in a niche?
  3. Inventory tracking — monitor stock levels
  4. Market analysis — how many SKUs do competitors have?
  5. Data migration — export product catalog

Resources


Need Shopify store data extracted? Products, prices, collections — $20. Email: Spinov001@gmail.com | Hire me

Top comments (0)