Helenis API
Start for free

Web data & toolsShopify

Shopify Scraper API: Products, Prices, Variants and Stock from Any Store

Shopify scraper API guide: pull any store's products, prices, discounts, variants and real stock as JSON with Python, and track price drops day by day.

Shopify Scraper API cover: a shopping cart sticker, an arrow and a JSON response with price_min 73.5, compare_at_price_max 105.0, discount_percent 30, total_inventory 241 and currency USD.
One Allbirds product: 30% off, 241 pairs in stock across 13 sizes, in the store's own currency.

Millions of online shops run on Shopify, and every storefront publishes its catalogue as JSON. That is why so many price-monitoring scripts, and many a Shopify scraper API, start with requests.get("https://some-store.com/products.json"), and why so many of them quietly return wrong numbers a few weeks later.

The JSON is public, but it has traps. Prices come in the visitor's currency, so the same script gives different numbers depending on where it runs. One endpoint writes prices as strings, another in cents. Stock quantities appear on one endpoint only, and only when the merchant allows it. Pagination stops at 250 products per page. And some "Shopify" sites serve no Shopify JSON at all.

This article shows how a Shopify scraper API handles those traps, with real responses from the Shopify Store Scraper on a live store: store details, a whole collection with discounts computed, one product with its real stock and barcodes, and a daily price and stock monitor you can run from cron.

How Shopify exposes its catalogue, and where scripts go wrong

Every Shopify Online Store serves a handful of public endpoints. No key, no login: they are what the store's own theme uses.

Endpoint What it gives Catch
/meta.json Store name, description, currency, country, myshopify domain, published product and collection counts Not every field is filled
/products.json?limit=250&page=N The catalogue: products, variants, options, images, tags, HTML description Prices as strings; 250 per page at most
/collections.json Collections with handles and product counts Includes the merchant's internal collections
/collections/<handle>/products.json The products of one collection Same format as /products.json
/products/<handle>.js One product as the theme sees it Prices in cents; stock and barcode only when exposed

The traps that break home-made scrapers:

  • Currency follows the visitor. With Shopify Markets, a store shows prices in the currency of the visitor's country. During development, Kith's catalogue fetched from Taiwan returned 42,138 for a shirt priced at 1,250 USD: the same shirt, in Taiwan dollars. Run the same script from two clouds and your price history jumps for no reason.
  • Two price formats. /products.json writes "98.00"; /products/<handle>.js writes 9800. Mix them and a price is off by a factor of 100.
  • Discounts are implicit. Shopify gives price and compare_at_price per variant. "On sale" and "how much off" are yours to compute, per variant.
  • Stock is hidden by default. /products.json only says whether each variant is available. Quantities live on the .js endpoint, and only if the store exposes them.
  • Headless stores. A store with a custom front end on top of Shopify (a "headless" storefront) does not serve these files on its domain.

The API reads the same public files and fixes each trap: it always asks for prices in the store's own currency (read from meta.json) and returns the currency confirmed by Shopify, converts both price formats to plain numbers, computes on_sale and discount_percent, maps option values to their names, and turns HTML descriptions into plain text.

Check a store first

GET /v1/shopify/store takes any URL of the store, or just its domain. It tells you whether the site is a readable Shopify store and which currency its prices are in.

Python
import requests

HOST = "shopify-store-scraper-products-prices-stock.p.rapidapi.com"
API = f"https://{HOST}"
HEADERS = {"x-rapidapi-key": "YOUR_API_KEY", "x-rapidapi-host": HOST}

store = requests.get(
    f"{API}/v1/shopify/store",
    headers=HEADERS,
    params={"url": "allbirds.com"},
    timeout=30,
).json()
print(store["name"], store["currency"], store["published_products"])
Terminal
curl "https://shopify-store-scraper-products-prices-stock.p.rapidapi.com/v1/shopify/store?url=allbirds.com" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: shopify-store-scraper-products-prices-stock.p.rapidapi.com"

The real response:

JSON
{
  "url": "https://allbirds.com",
  "name": "Allbirds",
  "description": "The world’s most comfortable shoes, made with natural materials like merino wool, eucalyptus tree fiber, and sugar cane, Allbirds has created the comfiest shoes on the planet.",
  "domain": "www.allbirds.com",
  "myshopify_domain": "weareallbirds.myshopify.com",
  "currency": "USD",
  "country": "US",
  "province": "California",
  "city": "Beverly Hills",
  "published_products": 352,
  "published_collections": 1354
}

One second, 1 credit. published_products tells you how many catalogue pages to expect (352 products: two calls at 250 per page). The myshopify_domain is the store's permanent Shopify identifier, a stable key when a brand runs several domains.

Scrape Shopify products with prices and discounts

GET /v1/shopify/products returns up to 250 products per call, with page for the next ones and collection to stay inside one collection. Here, the store's sale collection:

Python
def catalogue(store: str, collection: str | None = None) -> list[dict]:
    products, page = [], 1
    while True:
        params = {"url": store, "page": page, "limit": 250}
        if collection:
            params["collection"] = collection
        r = requests.get(
            f"{API}/v1/shopify/products", headers=HEADERS, params=params, timeout=60
        )
        r.raise_for_status()
        data = r.json()
        products += data["products"]
        if not data["has_more"]:
            return products
        page += 1


sale = catalogue("allbirds.com", collection="bfcm-all")
best = sorted(sale, key=lambda p: p.get("discount_percent") or 0, reverse=True)
for p in best[:5]:
    print(p["discount_percent"], p["price_min"], p["compare_at_price_max"], p["title"])

The real response, trimmed to 1 of the 200 products, 2 of its 13 variants and 5 of its 19 tags; description, images and dates omitted:

JSON
{
  "store": "https://allbirds.com",
  "page": 1,
  "limit": 250,
  "collection": "bfcm-all",
  "count": 200,
  "has_more": false,
  "products": [
    {
      "id": 7205163958352,
      "title": "Women's Breezer Point - Mushroom (Dark Cocoa Sole)",
      "handle": "womens-breezer-point-mushroom",
      "url": "https://allbirds.com/products/womens-breezer-point-mushroom",
      "vendor": "Allbirds",
      "product_type": "Shoes",
      "tags": [
        "allbirds::material => tree",
        "allbirds::price-tier => msrp",
        "allbirds::silhouette => breezer",
        "bfcm-womens",
        "FINAL SALE"
      ],
      "currency": "USD",
      "price_min": 75.0,
      "price_max": 75.0,
      "compare_at_price_max": 125.0,
      "on_sale": true,
      "discount_percent": 40,
      "available": true,
      "options": [
        { "name": "Size", "values": ["5", "5.5", "6", "6.5", "7", "7.5", "8", "8.5", "9", "9.5", "10", "10.5", "11"] }
      ],
      "variants": [
        { "id": 41271029235792, "title": "5", "sku": "A12594W050", "price": 75.0, "compare_at_price": 125.0, "available": true, "options": { "Size": "5" }, "weight_grams": 422 },
        { "id": 41271029629008, "title": "11", "sku": "A12594W110", "price": 75.0, "compare_at_price": 125.0, "available": true, "options": { "Size": "11" }, "weight_grams": 609 }
      ]
    }
  ]
}

The whole page took 1.3 seconds and 1 credit. A few things to read in it:

  • Discounts are computed per variant. discount_percent is the largest discount among variants: 1 − 75 / 125 = 40 %. Across this page, all 200 products were on sale, at 30, 40, 50 or 70 % off.
  • price_min and price_max bound the variants. A product whose sizes are priced differently shows both; sort and filter on them without opening the variants.
  • Tags carry merchant data. Many stores encode attributes in tags. Here the material, the price tier and a "FINAL SALE" flag, which a competitor analyst would want to know before comparing prices.
  • Options are named. Shopify stores variant values as option1, option2, option3; the API maps them to their names ({"Size": "5"}), so a "Colour / Size" product reads naturally.

has_more is true when a page came back full; loop until it is false. Without collection, the same loop pulls the whole catalogue.

Real stock and barcodes for one product

/products says whether each variant can be bought. For quantities, ask one product page with GET /v1/shopify/product:

Python
product = requests.get(
    f"{API}/v1/shopify/product",
    headers=HEADERS,
    params={
        "url": "https://www.allbirds.com/products/womens-runner-nz-slip-on-light-grey"
    },
    timeout=30,
).json()
for v in product["variants"]:
    print(v["title"], v.get("inventory_quantity"), v.get("barcode"))

A real response, trimmed to 1 of 13 variants, with tags, description, images and dates omitted:

JSON
{
  "id": 7205196070992,
  "title": "Women's Runner NZ Slip On - Light Grey (Light Grey Sole)",
  "handle": "womens-runner-nz-slip-on-light-grey",
  "url": "https://www.allbirds.com/products/womens-runner-nz-slip-on-light-grey",
  "vendor": "Allbirds",
  "product_type": "Shoes",
  "currency": "USD",
  "price_min": 73.5,
  "price_max": 73.5,
  "compare_at_price_max": 105.0,
  "on_sale": true,
  "discount_percent": 30,
  "available": true,
  "total_inventory": 241,
  "variants": [
    {
      "id": 41271201988688,
      "title": "5",
      "sku": "A12558W050",
      "barcode": "196942298909",
      "price": 73.5,
      "compare_at_price": 105.0,
      "available": true,
      "inventory_quantity": 15,
      "options": { "Size": "5" }
    }
  ]
}

inventory_quantity is the stock of each variant and total_inventory their sum: 241 pairs across 13 sizes. The barcode is a 12-digit UPC (GTIN-12), the key you need to match the same shoe across retailers and marketplaces.

This works only when the merchant exposes quantities and barcodes. Allbirds does; many stores, Kith among them, do not. Then both fields are simply absent and available remains the signal. Never treat a missing quantity as zero.

Collections: how the merchant organises the store

GET /v1/shopify/collections lists every published collection, 250 per page. The real response for Allbirds, trimmed to 2 of 250 collections:

JSON
{
  "store": "https://allbirds.com",
  "page": 1,
  "count": 250,
  "has_more": true,
  "collections": [
    {
      "id": 135995326544,
      "title": "Accessories",
      "handle": "womens-accessories",
      "url": "https://allbirds.com/collections/womens-accessories",
      "description": "You know what they say: It's all in the details. Customize your look with planet-friendly face masks, hats, and more.",
      "products_count": 28,
      "published_at": "2019-08-05T14:01:17-07:00"
    },
    {
      "id": 271812395088,
      "title": "Bags",
      "handle": "bags",
      "url": "https://allbirds.com/collections/bags",
      "description": "Crafted for durability and versatility, our bags offer practical (and planet-friendly) solutions without compromising on style.",
      "products_count": 16,
      "published_at": "2024-11-13T13:56:37-08:00"
    }
  ]
}

The store declares 1,354 published collections, far more than its menu shows. Alongside "Bags" and "Accessories", the list holds the merchant's working collections: deals of the day, cart upsells, discount-eligible products. For competitive research, these say more about a merchandising strategy than the home page does. Treat products_count as Shopify's own figure; the products you get from a collection are the ground truth.

A daily Shopify price and stock monitor

The pieces combine into a monitor: snapshot each store once a day, one row per variant, and compare with the previous snapshot. Variant IDs are stable, so they make a good key.

Python
import csv
import datetime
import pathlib

import requests

HOST = "shopify-store-scraper-products-prices-stock.p.rapidapi.com"
API = f"https://{HOST}"
HEADERS = {"x-rapidapi-key": "YOUR_API_KEY", "x-rapidapi-host": HOST}
STORES = ["allbirds.com"]
FIELDS = [
    "store",
    "variant_id",
    "product",
    "variant",
    "price",
    "compare_at",
    "available",
]


def s(value) -> str:  # CSV stores text: compare text with text
    return "" if value is None else str(value)


def snapshot(store: str) -> list[dict]:
    rows, page = [], 1
    while True:
        r = requests.get(
            f"{API}/v1/shopify/products",
            headers=HEADERS,
            params={"url": store, "page": page, "limit": 250},
            timeout=60,
        )
        if r.status_code == 400:  # not_shopify, site_blocked...: not billed
            print(store, r.json()["error"]["code"])
            return rows
        r.raise_for_status()
        data = r.json()
        for p in data["products"]:
            for v in p["variants"]:
                rows.append(
                    {
                        "store": store,
                        "variant_id": s(v["id"]),
                        "product": p["title"],
                        "variant": v["title"],
                        "price": s(v.get("price")),
                        "compare_at": s(v.get("compare_at_price")),
                        "available": s(v.get("available")),
                    }
                )
        if not data["has_more"]:
            return rows
        page += 1


def load(path: pathlib.Path) -> dict[str, dict]:
    if not path.exists():
        return {}
    with path.open(encoding="utf-8") as f:
        return {row["variant_id"]: row for row in csv.DictReader(f)}


today = datetime.date.today()
folder = pathlib.Path("snapshots")
folder.mkdir(exist_ok=True)
current = [row for store in STORES for row in snapshot(store)]
with (folder / f"{today}.csv").open("w", newline="", encoding="utf-8") as f:
    writer = csv.DictWriter(f, fieldnames=FIELDS)
    writer.writeheader()
    writer.writerows(current)

previous = load(folder / f"{today - datetime.timedelta(days=1)}.csv")
for row in current:
    before = previous.get(row["variant_id"])
    if before is None:
        print("NEW", row["product"], row["variant"], row["price"])
    elif row["price"] != before["price"]:
        print(
            "PRICE", row["product"], row["variant"], before["price"], "->", row["price"]
        )
    elif row["available"] != before["available"]:
        print("STOCK", row["product"], row["variant"], "available:", row["available"])
gone = previous.keys() - {row["variant_id"] for row in current}
print(len(gone), "variants removed since yesterday")

Allbirds costs 2 credits a day with this script: 352 products, two pages. A list of 50 mid-size stores fits comfortably in the PRO plan. Production notes:

  • Compare like with like. Prices always come in the store's own currency, so a change is a real change, not an exchange-rate artefact.
  • Removed is not sold out. A variant that disappears was unpublished or deleted; a variant with available: false is out of stock. Report them separately.
  • Add quantities for key products only. One /product call per product gives inventory where exposed. Inventory deltas hint at sales velocity, but restocks and returns move them too, so read them as an estimate.
  • Be gentle. Responses are cached 10 minutes per URL; polling a store more often than that returns the same data. Once or a few times a day is plenty for price tracking.

When a store cannot be read

Some sites look like Shopify stores but do not serve the storefront files. A real call on gymshark.com:

JSON
{
  "error": {
    "status": 400,
    "code": "not_shopify",
    "message": "This site does not serve Shopify's public storefront data (not a Shopify store, or a headless storefront)."
  }
}
Status code Meaning
400 invalid_url, invalid_request Fix the input (/product needs a /products/<handle> URL)
400 not_shopify Not a Shopify store, or a headless storefront
400 site_blocked, site_unreachable The store refused automated access or is down
404 product_not_found The product was removed or renamed
429 daily_limit_reached The plan's daily limit; resets at 00:00 UTC

Errors are never billed. For a non-Shopify shop, the AI web scraper extracts product fields from any page instead.

What it costs

Every call costs 1 credit, whatever its size: 250 products in one page cost the same as one store lookup.

Plan Price per month Credits In practice
BASIC Free 10 per day A store and a few pages of products
PRO $3.99 25,000 Up to 6.25 million product rows at 250 per call
ULTRA $9.99 100,000 A daily snapshot of about 1,500 stores of up to 500 products
MEGA $29.99 300,000 An hourly snapshot of about 200 such stores

Beyond the quota, paid plans continue at $0.002 per credit. Plans and parameters: the product page and the API reference. Selling abroad what you scraped? The HS code classifier walkthrough turns product titles into customs codes.

Run it without code on Apify

The same scraper runs as an Apify Actor, Shopify Store Scraper - Products, Prices & Stock. Paste store or product URLs, pick a collection, switch on "Real stock" if you need quantities, and export one row per product to CSV, Excel or Google Sheets, on a schedule if you like. It costs $0.0008 per product and $0.0008 per real-stock lookup; stores that fail are free, and the Apify free plan returns 100 products per run.

What the Shopify scraper API does not do

  • No sales or revenue figures. Shopify does not publish them. Inventory changes are at best an estimate.
  • No headless or protected stores. Custom front ends return not_shopify; stores behind bot protection or a storefront password cannot be read.
  • No hidden data. Quantities and barcodes come only when the merchant exposes them; metafields, cost prices and customer data are never public.
  • No reviews. Product reviews live in third-party apps, not in the storefront catalogue.
  • No AI. Values are copied from Shopify's data and normalised, not interpreted. Tags and product types are whatever the merchant typed.
  • No crawling of other platforms. WooCommerce, Magento or custom shops need a different tool.

Frequently asked questions

How do I scrape a Shopify store?

Read its public /products.json, 250 products per page, or call a Shopify scraper API that does it for you and fixes the currency, price format and discount calculation. GET /v1/shopify/products?url=<store> returns normalised products; loop on page while has_more is true.

How can I tell whether a website runs on Shopify?

A Shopify Online Store answers /meta.json with its myshopify_domain. GET /v1/shopify/store does that check and returns 400 not_shopify, not billed, when the site is not a readable Shopify storefront.

Can I get a Shopify store's inventory levels?

Only when the merchant exposes them. GET /v1/shopify/product returns inventory_quantity and barcode per variant when the product page data includes them; otherwise you still get available for each variant.

Why do Shopify prices change depending on where I scrape from?

Shopify Markets shows prices in the visitor's local currency. The API always requests the store's own currency and returns it in currency, so the numbers do not depend on your server's location.

Is it legal to scrape Shopify stores?

The catalogue files are public and contain no personal data, but each store has its own terms of use, and laws differ by country. Keep request rates low, reuse the data for analysis rather than republishing it wholesale, and ask a lawyer when in doubt.

Get started

Shopify Store Scraper API

Any Shopify store as JSON: products, prices, discounts, variants, SKUs, stock and collections.

  • Shopify
  • Web Scraping
  • Ecommerce
  • Python
  • Price Monitoring