Monitor Shopify store prices with Python and the Packet API
A Python monitor for Shopify store prices: price ranges from any store through live search, per-size prices from variants, and SQLite snapshots, with real output from Stadium Goods and Kicks Crew.
On this page
By the end of this tutorial you will have a Python script that monitors Shopify store prices at three levels: the price range of every product matching a search on any Shopify store, the price of each size from a product URL, and cheap cached per-size prices for Kicks Crew. A small SQLite logger at the end records each check and flags drops. It is for developers and resellers who want to watch sneaker boutiques and consignment shops that run on Shopify without writing a scraper for each one. All output below comes from calls I made on November 15, 2026. Packet is an independent service and is not affiliated with Shopify, Stadium Goods or Kicks Crew.
Packet has four Shopify endpoints, and they return different shapes:
| Endpoint | Input | What you get | Credits |
|---|---|---|---|
/v1/shopify/search |
store URL + query | Up to a handful of products with price range, as strings in dollars | 0.5 |
/v1/shopify/product |
full product URL | Every variant, price as integer cents | 0.5 |
/v1/catalog/shopify/search |
query (Kicks Crew only for now) | 15 cached products per page, with variants | 0.5 |
/v1/catalog/shopify/product |
Shopify product ID (Kicks Crew only) | One cached product, every variant, price as a decimal | 0.3 |
Find products and their price range with live search
The Shopify search endpoint takes the root URL of any Shopify store and a query. It is the fastest way to start monitoring a store you know nothing about, because you don't need product URLs yet.
import os
import requests
API = "https://api.pckt.sh"
HEADERS = {"Authorization": f"Bearer {os.environ['PCKT_API_KEY']}"}
STORE = "https://www.stadiumgoods.com"
r = requests.get(
f"{API}/v1/shopify/search",
headers=HEADERS,
params={"url": STORE, "query": "air jordan 1"},
timeout=30,
)
r.raise_for_status()
for p in r.json()["resources"]["results"]["products"]:
print(f'{p["price_min"]:>8} {p["price_max"]:>8} {p["compare_at_price_min"]:>8} {p["title"]}')
331.95 628.95 0.00 Air Jordan 1 Retro High OG "Chicago Lost and Found" DZ5485 612
114.95 507.95 0.00 Air Jordan 1 High OG "Black Toe Reimagined" DZ5485 106
179.95 499.95 0.00 Air Jordan 1 Mid SE "Space Jam" DV1308 004
164.95 601.95 0.00 Air Jordan 1 Low OG "Chicago (2025)" HQ6998 600
213.95 267.95 0.00 Air Jordan 1 Retro High OG "Royal (2026)" IQ5495 005
That is a working monitor already: run it on a schedule and compare price_min with the last run. A few details in the raw response matter before you build on it:
- Prices are strings.
"price_min": "331.95"is text in dollars. Convert withfloat()before comparing, or"85.00" < "113.00"will compare characters. - Five products per query. Both searches I ran,
air jordan 1andadidas samba, returned exactly five products plus five suggested queries inqueries. Treat search as discovery, not as a full catalog crawl. Narrow queries (a style code such asDZ5485 612) work better than broad ones. - The
variantsarray is not the size run. For the Lost and Found it was empty. For the other four it held one variant titled"1"withavailable: false, while the product itself hadavailable: true. Don't read sizes from search results. - The
urlfield carries tracking parameters. It came back as/products/air-jordan-1-retro-high-og-royal-2026-199223?_pos=5&_psq=air+jordan+1&.... Strip everything after?and prefix the store root to get the product URL you need for the next step. price_maxis the most expensive size, not a typical price. The Black Toe Reimagined starts at $114.95 and tops out at $507.95. The spread is in the sizes, which is why per-variant data matters.
Reading compare-at prices
compare_at_price_min is the store's "was" price. On every Jordan above it was "0.00", which means no compare-at price is set. The Samba search on the same store had them filled in:
| Product | price_min | price_max | compare_at_price_min | Tags of note |
|---|---|---|---|---|
| Samba OG WMNS "Maroon / Cream White" ID0477 | 134.00 | 255.00 | 134.00 | Running Low |
| Samba OG WMNS "Leopard / Cream Orange" JI2734 | 104.00 | 853.00 | 147.00 | Sale, Under Retail |
| Samba OG WMNS "White" IG9030 | 89.00 | 334.00 | 113.00 | |
| Samba OG WMNS "Silver Metallic Cracked Leather" JR0035 | 78.00 | 238.00 | 113.00 | Sale |
| Samba OG "White / Black" B75806 | 85.00 | 250.00 | 113.00 | Price Drop, Sale, Under Retail |
When compare_at_price_min is above price_min, at least one variant is priced below its compare-at price. The two are minimums across variants, so they may come from different sizes. The tags are store-specific merchandising labels. On Stadium Goods, Sale, Price Drop and Under Retail showed up on exactly the products with a gap. Another store will use different tags, so treat them as a hint and rely on the numbers.
Read every size from a product URL
Search gives ranges. To watch a specific size you need the Shopify product endpoint, which takes the full product URL and returns every variant with its own price, compare_at_price, available and sku.
import os
import requests
API = "https://api.pckt.sh"
HEADERS = {"Authorization": f"Bearer {os.environ['PCKT_API_KEY']}"}
URL = "https://www.stadiumgoods.com/products/air-jordan-1-retro-high-og-royal-2026-199223"
r = requests.get(
f"{API}/v1/shopify/product",
headers=HEADERS,
params={"url": URL},
timeout=30,
)
r.raise_for_status()
p = r.json()
print(p["title"])
for v in p["variants"]:
status = "in stock" if v["available"] else "sold out"
print(f'{v["title"]:<6} {v["price"] / 100:>8.2f} {status}')
Two things differ from search. First, prices are integers in cents. The docs example for an Air Max 270 "Kentucky" on the same store shows "price": 11900 and "price_max": 35900, which is $119.00 to $359.00, so divide by 100. If you mix search and product data in one table, normalise both to the same unit before storing. Second, each variant has a sku and a barcode. In the docs example the SKU is 059784|DH0268 100|4: store ID, style code and size joined with pipes. That gives you a stable key for a size even if the variant title changes.
When I ran this against the Royal (2026) URL, and against the docs example URL, every call returned:
HTTP 426
{"status":false,"message":"rate limit exceeded"}
HTTP 426 is the status Packet returns both when you go over your plan's per-second limit and when your organization is out of credits, according to the pricing page. raise_for_status() turns it into an exception, which is what you want in a cron job: the run fails loudly and the next one retries. In a loop over many URLs, catch it, sleep, and retry once instead of hammering the endpoint. On the Free plan the limit is 1 request per second, so put time.sleep(1.1) between calls.
Per-size prices from the cached Kicks Crew catalog
For Kicks Crew, Packet keeps a cached copy of the store. The cached Shopify product endpoint costs 0.3 credits instead of 0.5, is not rate-limited by the store, and returns sizes with readable option names. You get the product ID from the cached Shopify search. A search for DD1391-100 returned the Panda Dunk with ID 6982041370819.
import os
import requests
API = "https://api.pckt.sh"
HEADERS = {"Authorization": f"Bearer {os.environ['PCKT_API_KEY']}"}
PRODUCT_ID = "6982041370819" # Nike Dunk Low 'Panda Black White' DD1391-100
WATCH = {"Men's US 9": 100, "Men's US 10": 80, "Men's US 11": 80}
r = requests.get(
f"{API}/v1/catalog/shopify/product",
headers=HEADERS,
params={"id": PRODUCT_ID},
timeout=30,
)
r.raise_for_status()
p = r.json()
print(p["title"], "| cache updated", p["updated_at"][:16])
for v in p["variants"]:
size = v["options"]["Size"].split(" / ")[0]
if size not in WATCH:
continue
target = WATCH[size]
status = "in stock" if v["available"] else "sold out"
flag = "AT OR BELOW TARGET" if v["available"] and v["price"] <= target else ""
print(f'{size:<12} {v["price"]:>7.2f} {status:<9} target {target:<4} {flag}')
Nike Dunk Low 'Panda Black White' DD1391-100 | cache updated 2026-11-09T00:03
Men's US 9 101.79 in stock target 100
Men's US 10 73.71 in stock target 80 AT OR BELOW TARGET
Men's US 11 83.07 in stock target 80
The size label needs the split. Kicks Crew packs every size system into one option value: "Men's US 9 / Women's US 10.5 / UK 8 / EU 42.5 / JP 27". The first segment is the one to match on. Matching with startswith("Men's US 9") would also catch US 9.5.
The rest of the variant list is where a naive monitor goes wrong. In the first 28 variants of this product (US 2.5 to US 16), 23 were in stock. The sold-out ones carried these prices:
| Size | available | price |
|---|---|---|
| Men's US 2.5 | false | 0 |
| Men's US 13.5 | false | 1709.37 |
| Men's US 14.5 | false | 116998.83 |
| Men's US 15.5 | false | 0 |
| Men's US 16 | false | 1709.37 |
A price on a sold-out variant is not an offer. If you take the minimum or maximum over all variants without checking available, you will report a free Dunk or a $116,998.83 one. Even among in-stock sizes the spread was wide: US 10 was the cheapest at 73.71 and US 3 the most expensive at 741.78, with US 4 and 4.5 both at 635.31. The Olive Canvas Jordan 1 (555088-300) showed the same pattern, with US 9.5 in stock at 182.52 and US 11.5 sold out at 1228.5.
Two more fields to handle:
currency_codewas an empty string on every variant I saw, for both products. The API does not tell you the currency of these prices, so store them as numbers and don't label them USD without checking the store.updated_atis the cache refresh time. It read2026-11-09T00:03on a November 15 call. Log it with every snapshot. If it hasn't moved, the price hasn't been re-read, and an unchanged price tells you nothing.
Store each check and alert on drops
A monitor needs memory. This version runs the live search for a list of stores and queries, writes one row per product per run to SQLite, and prints an alert when price_min falls below the last stored value or when a product with a compare-at price is marked down. It uses the same search call as the first snippet, so it works on any Shopify store.
import os
import sqlite3
import time
from datetime import datetime, timezone
import requests
API = "https://api.pckt.sh"
HEADERS = {"Authorization": f"Bearer {os.environ['PCKT_API_KEY']}"}
WATCH = [
("https://www.stadiumgoods.com", "air jordan 1"),
("https://www.stadiumgoods.com", "adidas samba"),
]
db = sqlite3.connect("shopify_prices.db")
db.execute("""
CREATE TABLE IF NOT EXISTS snapshots (
store TEXT, handle TEXT, title TEXT,
price_min REAL, price_max REAL, compare_at_min REAL,
available INTEGER, checked_at TEXT
)
""")
def search(store, query):
r = requests.get(
f"{API}/v1/shopify/search",
headers=HEADERS,
params={"url": store, "query": query},
timeout=30,
)
r.raise_for_status()
return r.json()["resources"]["results"]["products"]
now = datetime.now(timezone.utc).isoformat(timespec="seconds")
for store, query in WATCH:
for p in search(store, query):
price_min = float(p["price_min"])
compare_min = float(p["compare_at_price_min"])
last = db.execute(
"SELECT price_min FROM snapshots WHERE store = ? AND handle = ? "
"ORDER BY checked_at DESC LIMIT 1",
(store, p["handle"]),
).fetchone()
if last and price_min < last[0]:
print(f"DROP {p['title']}: {last[0]:.2f} -> {price_min:.2f}")
if compare_min > price_min:
print(f"MARKDOWN {p['title']}: from {price_min:.2f}, was {compare_min:.2f}")
db.execute(
"INSERT INTO snapshots VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
(store, p["handle"], p["title"], price_min, float(p["price_max"]),
compare_min, int(p["available"]), now),
)
db.commit()
time.sleep(1.1)
The key is the handle, not the title. Stadium Goods appends a numeric suffix to handles (samba-og-white-black-052111), and the handle stays the same when the title is edited. On the first run nothing prints as a drop, because there is no history yet. The markdown check fires straight away: with the Samba data above it would flag four of the five products. If you only want news, store the markdown state and alert when it changes.
To move from ranges to sizes, swap search() for the product endpoint on the URLs you care about and key rows on variant sku. For Kicks Crew, use the cached product call and also store updated_at. The StockX price tracker post has a fuller SQLite schema that deduplicates on the cache timestamp, and it carries over unchanged.
What it costs
Each request has a fixed credit cost from the API spec. A month is taken as 30 days.
| Job | Endpoint | Credits per request | Requests per month | Credits per month |
|---|---|---|---|---|
| 10 store searches, every 6 hours | /v1/shopify/search |
0.5 | 10 × 4 × 30 = 1,200 | 600 |
| 20 product URLs, every 6 hours | /v1/shopify/product |
0.5 | 20 × 4 × 30 = 2,400 | 1,200 |
| 20 Kicks Crew products, once a day | /v1/catalog/shopify/product |
0.3 | 20 × 30 = 600 | 180 |
| 20 Kicks Crew products, hourly | /v1/catalog/shopify/product |
0.3 | 20 × 24 × 30 = 14,400 | 4,320 |
The Free plan gives 500 credits a month, and new accounts can earn up to 550 bonus credits. That covers the daily Kicks Crew job plus five live searches a day (5 × 30 × 0.5 = 75 credits), with room to spare. Polling the cache hourly costs 24 times more for little gain: Packet's pricing page says cached catalog data is at most 24 hours old, and the updated_at above shows how slowly a single product can change. The two live jobs together need 1,800 credits a month, which means a top-up or the Developer plan's 50,000 credits. The pricing calculator works out other schedules, and the pricing page lists the per-second limits per plan.
Picking the right endpoint per store
For any Shopify store, start with live search to find handles and watch price ranges, then move the products that matter to the product endpoint for per-size prices. For Kicks Crew, skip the live calls: the cached search and product endpoints return the same variant data for less, with size options already labelled. Whatever the source, filter on available before you trust a price, convert search prices from strings and product prices from cents, and key your history on handle or SKU rather than title.
Victor Lourme
Working at pckt.sh