Shopify 商店如何將產品目錄及價格匯出為 CSV
How to Export Any Shopify Store's Product Catalog and Prices to CSV
Shopify 商店可利用公開的 /products.json feed,配合 Apify 的 Shopify Products Scraper,將產品目錄及價格匯出為 CSV。產品 feed 會分頁,價格及供應情況則記錄在 variants;Scraper 可輸出產品或 variant 資料,並支援每日排程追蹤價格。費用為每列 $0.0008;公開 feed 顯示供應情況,不提供確切庫存數量。
How to Export Any Shopify Store's Product Catalog and Prices to CSV
Roughly a quarter of online stores run on Shopify, and almost all of them expose something many people don't know about: a public JSON product feed. If you do price monitoring, dropshipping research or competitor analysis, this feed is the cleanest data source you will find, and you don't need a headless browser or proxies to use it.
In this tutorial we'll look at how the feed works, then export a full catalog with the Shopify Products Scraper on Apify, and finish with a small price-tracking workflow.
The /products.json trick
Open any Shopify store and add /products.json to the domain, for example https://www.allbirds.com/products.json. You will see a JSON list of products with titles, handles, vendors, product types, tags, images and every variant with its price, compare-at price and availability.
Two catches:
- It is paginated (
?limit=250&page=2...), so large stores need many requests. - Prices and availability live inside variants, so you have to flatten them to get a useful table.
That is exactly the boring part a tool should do for you.
Step 1: Check the store is on Shopify
Visit https://thestore.com/products.json. JSON means you're good. A 404 or an HTML page means the store isn't on Shopify or has disabled the feed (rare, but it happens).
Step 2: Run the scraper
Open the Shopify Products Scraper and click Try for free. The input is prefilled with https://www.allbirds.com and a limit of 20 products, so the first run takes a few seconds:
| title | vendor | minPrice | onSale | anyAvailable |
|---|---|---|---|---|
| Women's Allbirds Flip Flop - Dusty Pink | Allbirds | 25 | true | true |
| Men's Canvas Runner NZ - Deep Navy Stripes | Allbirds | 100 | false | true |
Each product row includes minPrice, maxPrice, onSale (a compare-at price exists), anyAvailable, variantCount, tags, image URLs and timestamps.
Step 3: Products or variants?
The includeVariants switch changes the shape of the output:
- Off (default): one row per product with min/max price. Best for catalog overviews.
- On: one row per variant (each size/colour) with its own SKU, price, compare-at price and availability. Best for price and stock monitoring.
Raise maxProductsPerStore to export the full catalog. You can paste many stores at once, one per line.
Step 4: Build a simple price tracker
Schedule the actor daily on Apify (Schedules > Create), then compare today's dataset with yesterday's. A minimal Python version:
from apify_client import ApifyClient
import csv, datetime
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("scrape-smith/shopify-products-feed").call(run_input={
"storeUrls": ["https://www.allbirds.com", "https://www.gymshark.com"],
"maxProductsPerStore": 1000,
"includeVariants": True,
})
rows = list(client.dataset(run["defaultDatasetId"]).iterate_items())
fname = f"prices-{datetime.date.today()}.csv"
with open(fname, "w", newline="") as f:
w = csv.DictWriter(f, fieldnames=sorted({k for r in rows for k in r}))
w.writeheader(); w.writerows(rows)
print(len(rows), "rows saved to", fname)
Join two days on the variant ID and you have price drops, new products and sold-out items. Or skip code entirely: connect the dataset to Google Sheets with Apify's integration and use a formula.
What people use this for
- Competitor price monitoring, especially catching sales via compare-at prices.
- Dropshipping and product research across dozens of stores in a niche.
- Catalog backup or migration when moving platforms.
- Brand and market research: which product types and tags dominate a category.
- Feeding AI agents: the actor works through Apify's MCP server, so an assistant can pull a catalog on request.
Honest limitations
- The public feed shows availability (in stock / out of stock), not exact inventory counts.
- Some stores hide products from the feed or disable it; you can't get around that, and you shouldn't try.
- Prices are in the store's default currency and market.
- Respect each store's terms of service. This tool reads a public endpoint at a gentle rate; it does not log in or bypass anything.
Cost
$0.0008 per row. The 20-product test is under two cents; 1,000 products is $0.80; a 10,000-variant monitoring run is $8. Apify platform usage is included, and you can cap spend per run.
Wrap-up
Shopify's product feed is one of the easiest structured data sources on the web, as long as something handles pagination and flattening. Try the Shopify Products Scraper with the prefilled example, then swap in the stores you actually care about.
Scrape-Smith builds small, cheap data tools on public and official APIs.
來源:DEV Community · dev.to