Shopify Store Inventory Tracking API
Track stock levels and variant availability across Shopify storefronts — for competitive intelligence on a competitor's sell-through rate, or for building a restock-alert tool for consumers.
How the Shopify Store Inventory Tracking API Workflow Works
Inventory tracking on Shopify follows the same products.json pattern as price monitoring but focuses on the inventory_quantity field per variant rather than price. Poll a product on a schedule and watch inventory_quantity drop over time to estimate sell-through velocity, or alert the moment a sold-out variant's quantity goes back above zero for a restock-notification use case. Note that some stores intentionally hide exact inventory counts (returning only in-stock/out-of-stock booleans) rather than precise numbers — handle both response shapes.
Recommended Tier & Cost
Same products.json path as price monitoring — inventory_quantity is returned in the same server-rendered response, so no additional rendering cost is incurred for tracking stock instead of price.
Sample Output
{
"store_domain": "example-store.myshopify.com",
"product_id": 7834921056,
"variants": [
{ "sku": "EX-001-BLK", "available": true, "inventory_quantity": 23 },
{ "sku": "EX-001-WHT", "available": false, "inventory_quantity": 0 }
],
"checked_at": "2026-07-10T14:00:00Z"
}Need an API key? — no credit card required.
Responsible Use
AlterLab is designed for extracting publicly available data. Always review the terms of service for Shopify, respect robots.txt directives, and ensure your use case complies with applicable laws in your jurisdiction. Do not use this service to access non-public, authenticated, or personally identifiable data without appropriate authorization.
Quick Start
# Always verify Shopify's robots.txt and terms of service before extracting data.
curl -X POST https://alterlab.io/api/v1/scrape \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://store.example.com/products/sample-product.json",
"advanced": { "render_js": false }
}'Frequently Asked Questions
Can I get exact stock counts, or just in-stock/out-of-stock status?
It depends on the store's configuration — many Shopify stores expose exact inventory_quantity values via products.json, while others only expose an available boolean. AlterLab returns whichever the store's own API provides.
How do I build a restock alert for a sold-out product?
Poll the product on a short interval (e.g. every 15-30 minutes for high-demand items) and trigger a notification the moment a variant's available flag flips from false to true or inventory_quantity rises above zero.
Can I track inventory across multiple stores selling the same product?
Yes — submit each store's product URL as a separate request (or in a batch job) and compare inventory levels across retailers carrying the same item.
Related Guides
Developer Scraping Resources
How to Scrape Shopify Data: Complete Guide
Step-by-step tutorial with Python and Node.js code examples, structured extraction, and cost breakdown for Shopify scraping.
How to Handle Bot Protection Challenges
All 6 detection layers explained: TLS fingerprinting, JS challenges, Turnstile, and more.
JavaScript Rendering API
Full browser rendering for SPAs, React, and dynamic content.
Python Web Scraping API
pip install alterlab — async-ready Python SDK with 5,000 free scrapes.
Pricing
From $0.0002/request. No subscriptions. Balance never expires.
Your first scrape.
Sixty seconds.
$1 free credit — up to 5,000 scrapes. No credit card.
Just a POST request.
No credit card required · $1 free credit, up to 5,000 scrapes · Balance never expires