# Export any Shopify store's products.json to CSV

> Every Shopify store serves its products as JSON, 250 a page. A Python script exported Gymshark's 10,357 products to CSV in 42 calls.

- URL: https://toolzerhub.com/blog/shopify-products-json
- Published: 2026-10-26
- Publisher: ToolzerHub (we sell the API this post describes)

## Short answer

- Every Shopify store serves its public catalog at /products.json, up to 250 products a page, with prices, variants, SKUs and stock flags.
- Paging stops at 25,000 products, and headless stores serve the JSON only on their .myshopify.com address.
- ToolzerHub's Shopify API pages any store by domain for 1 credit per 250 products; Gymshark's full catalog cost 42 credits.

Every Shopify store serves its public catalog as JSON at `/products.json`, up to 250 products a page. The script below pages through any store by its domain and writes one CSV row per product with prices, variants, SKUs and stock. It exported Gymshark's 10,357 products in 42 calls.

## What products.json gives you

`/products.json` takes `limit` (250 at most) and `page`, and each product carries its variants with SKU, price, compare-at price and an `available` flag. Paging stops at 25,000 products, and `/collections/<handle>/products.json` reads one collection the same way. Stores with a headless front end, such as one built on Hydrogen, serve the JSON only on their `.myshopify.com` address. Shopify's [Admin API](https://shopify.dev/docs/api/admin-graphql) returns more, but only with the store owner's access token.

## What one call returns

We make ToolzerHub. Our [Shopify API](https://toolzerhub.com/apis/shopify) takes a store's domain and handles the paging limits and the `.myshopify.com` fallback for you. Each call is a `GET` with the `x-api-key` header and costs 1 credit. To check one store by hand first, the free [Shopify store checker](https://toolzerhub.com/free-tools/shopify-store-checker) shows its product count and first products.

```bash
export TOOLZERHUB_API_KEY=your_key
curl -H "x-api-key: $TOOLZERHUB_API_KEY" \
  "https://api.toolzerhub.com/v1/shopify/products?domain=allbirds.com&limit=250&page=1"
```

The first Allbirds product on that page, trimmed to one of its variants:

```json
{
  "title": "Women's Allbirds Flip Flop - Dusty Pink",
  "vendor": "Allbirds",
  "product_type": "Shoes",
  "price_min": 25,
  "price_max": 25,
  "compare_at_price_max": 50,
  "available": true,
  "created_at": "2026-03-27T14:03:50-07:00",
  "url": "https://allbirds.com/products/womens-allbirds-flip-flop-dusty-pink",
  "variants": [{ "title": "5", "sku": "A12513W050", "price": 25, "compare_at_price": 50, "available": false }]
}
```

`available` on the product is true when any variant can be bought; the size-5 variant above is sold out. The page also carries `has_more`, so you know when to stop. Add `collection=<handle>` to read one collection, and use `/v1/shopify/store` for the store's own product count, currency and location in one call.

## Export a Shopify store to CSV

The script takes a domain, walks pages of 250 until `has_more` is false, and writes title, vendor, type, price range, compare-at price, stock, variant count, SKUs and creation date. It names the CSV after the domain. Pass a page cap as the second argument to stop early on a large store.

```python
import csv
import os
import sys
import time

import requests

API = "https://api.toolzerhub.com/v1/shopify/products"
KEY = os.environ.get("TOOLZERHUB_API_KEY")
FIELDS = ["title", "vendor", "product_type", "price_min", "price_max", "compare_at_price_max", "available",
          "variants", "skus", "created_at", "url"]


def cell(value):
    # A leading = + - or @ would run as a formula when the CSV opens in a spreadsheet.
    return "'" + value if isinstance(value, str) and value[:1] in ("=", "+", "-", "@") else value


def get(params, tries=4):
    # 429 and 503 are worth a retry; the body says how long to wait.
    for attempt in range(tries):
        r = requests.get(API, params=params, headers={"x-api-key": KEY}, timeout=90)
        if r.status_code in (429, 503) and attempt < tries - 1:
            wait = int(((r.json().get("error") or {}).get("details") or {}).get("retryAfter") or r.headers.get("Retry-After") or 5 * (attempt + 1))
            time.sleep(min(wait, 60))
            continue
        r.raise_for_status()
        return r.json()["data"]


def row(product):
    variants = product.get("variants") or []
    return {
        **{k: product.get(k) for k in ["title", "vendor", "product_type", "price_min", "price_max",
                                       "compare_at_price_max", "available", "url"]},
        "variants": len(variants),
        "skus": "; ".join(v["sku"] for v in variants if v.get("sku")),
        "created_at": (product.get("created_at") or "")[:10],
    }


def main(domain, max_pages="100", out=None):
    rows, calls = [], 0
    for page in range(1, int(max_pages) + 1):
        data = get({"domain": domain, "limit": 250, "page": page})
        calls += 1
        if data is None:
            sys.exit(f"{domain} is not a Shopify store with a public catalog")
        rows += [row(p) for p in data["products"]]
        if not data["has_more"]:
            break
    out = out or f"{domain.replace('.', '-')}-products.csv"
    with open(out, "w", newline="", encoding="utf-8") as f:
        writer = csv.DictWriter(f, fieldnames=FIELDS)
        writer.writeheader()
        writer.writerows({k: cell(v) for k, v in r.items()} for r in rows)
    print(f"{domain}: {len(rows)} products in {calls} calls, saved to {out}")


if __name__ == "__main__":
    if not KEY or len(sys.argv) < 2:
        sys.exit("usage: TOOLZERHUB_API_KEY=... python shopify_products.py DOMAIN [max_pages] [file.csv]")
    main(*sys.argv[1:])
```

## What came out

The script exported four stores, one command each, such as `python shopify_products.py gymshark.com`:

| Store | Products | Calls | Seconds | In stock | Variants |
|---|---|---|---|---|---|
| gymshark.com | 10,357 | 42 | 77 | 2,833 | 63,289 |
| ruggable.com | 2,747 | 11 | 111 | 2,746 | 41,167 |
| allbirds.com | 397 | 2 | 2 | 358 | 4,615 |
| deathwishcoffee.com | 153 | 1 | 1 | 148 | 436 |

Gymshark's catalog keeps sold-out products: only 2,833 of 10,357 could be bought, against 358 of 397 at Allbirds, and 6,517 carried a compare-at price above their lowest price. Ruggable added 1,396 of its 2,747 products in 2026, and Death Wish Coffee 58 of its 153, so `created_at` is a quick way to see how fast a store adds products. Ruggable is headless, so its pages came from the `.myshopify.com` address and took longer.

`product_type` is whatever the merchant typed. Allbirds labels 381 of its 397 products Shoes, while Gymshark leaves 2,503 blank and writes paths such as `Mens>Apparel>SS Tops>t_shirt` for the rest. Clean that column before you group by it. Variants add up fast too: Gymshark's 10,357 products hold 63,289 of them, about six each, so a per-variant CSV is six times longer.

## What it costs

A call returns up to 250 products for 1 credit, so Gymshark's whole catalog cost 42 credits and Allbirds cost 2. A store with 250 products or fewer is a single call, and through our API `page` runs from 1 to 100, which reaches the same 25,000. The 100 free credits a month cover about 25,000 products; $19 buys 10,000 credits that never expire, and [plans for higher volume](https://toolzerhub.com/pricing) cover daily price tracking. Set your key and your first store is a CSV in under a minute.

For the same job on TikTok Shop, see [export TikTok Shop products](https://toolzerhub.com/blog/export-tiktok-shop-products), or start with the [TikTok Shop API guide](https://toolzerhub.com/blog/tiktok-shop-api). For listings on Taobao, see [the Taobao API](https://toolzerhub.com/blog/taobao-api), and for Amazon, [Amazon product data without PA-API](https://toolzerhub.com/blog/amazon-product-api). For a store's traffic, see [is the Semrush API free](https://toolzerhub.com/blog/semrush-api).

We are not affiliated with Shopify.
