Let Your Agent Watch Apple Store Pickup For You

3 min readApple, AI & Agents, Gadgets

Jake Marsh

As I write this, you can’t pick up an iPhone Duo at any of the 12 Apple Stores nearest New York, Dallas or San Francisco. Every one of the eight configurations says “Currently unavailable” at every store. When units do turn up, the trick is noticing before they’re gone.

Apple’s online store has a public web address for in-store pickup availability, and it answers for the dozen nearest stores and every model you ask about in a single request. That’s a perfect job for an agent: check it every 30 seconds, stay quiet, and tap you on the shoulder the moment something is really ready.

So here’s a little configurator. Pick what you want, copy the prompt, and paste it to Claude Code or any agent that can run a small script in the background.

Prompt for your agent
Watch Apple Store pickup for me and tell me the moment this is in stock near me:

iPhone Duo, 512GB or 1TB, any color, near New York, NY.

Check this one URL every 30 seconds. It returns the ~12 nearest Apple Stores and every part at once, so never loop per store or per part:
https://www.apple.com/shop/retail/pickup-message?pl=true&mts.0=regular&location=New%20York%2C%20NY&parts.0=MK1G4LL%2FA&parts.1=MK1H4LL%2FA&parts.2=MK1J4LL%2FA&parts.3=MK1L4LL%2FA

Part numbers in it: MK1G4LL/A (512GB Star White), MK1H4LL/A (512GB Night Sky), MK1J4LL/A (1TB Star White), MK1L4LL/A (1TB Night Sky). The carrier is picked at checkout, so these cover every carrier.

Run the checks as a small background script (one request per check, a browser-like User-Agent), not a full agent turn per check. Have the script stay silent while nothing is available and print what it found (or exit) on a hit, and keep an eye on its output so you can tell me. Don't send me "still nothing" updates.

For each store in body.stores and each part in its partsAvailability, it's available ONLY when pickupDisplay is not "unavailable" AND messageTypes.regular.storeSelectionEnabled is true. An HTTP error or a reply you can't parse means the check failed, not that it's out of stock.

On a hit: wait about 5 seconds and check once more with a fresh request, then alert me right away. Send one alert that lists every store and configuration that's available (the configuration from storePickupProductTitle, plus Apple's own wording from storePickupQuote), with the buy link: https://www.apple.com/shop/buy-iphone/iphone-duo
Alert me with a macOS notification with a sound (osascript -e 'display notification "<configuration> at <store>" with title "iPhone Duo in stock" sound name "Glass"') and also tell me here.
If it's gone on the second check, still tell me about the near miss. After an alert, keep watching, but don't alert again about the same store and configuration for 3 minutes.

If Apple starts answering with error statuses, back off: wait 15 minutes before checking again, and never retry in a tight loop.

Alert only. Never order, reserve or add anything to a bag for me; I'll check out myself. Keep watching until I tell you to stop.

Before you start, tell me in one sentence exactly what you're watching.

Your agent should answer with one sentence confirming exactly what it’s watching, then go quiet until there’s something to tell you.

How It Works#

The URL in the prompt looks like this:

https://www.apple.com/shop/retail/pickup-message?pl=true&mts.0=regular&location=Dallas%2C%20TX&parts.0=MK1G4LL%2FA&parts.1=MK1J4LL%2FA

location can be a city and state or a ZIP code (a city name on its own gets an error back). Apple decides what “near” means: it always returns the 12 closest stores, so near Dallas the list reaches all the way to Houston, Austin and Oklahoma City. Each parts.N is a part number, and every storage and color combination has its own: MK1G4LL/A is the 512GB Star White, MK1L4LL/A is the 1TB Night Sky, and so on. The carrier gets picked at checkout, so one part number covers all of them. The reply lists the nearest stores, and under each one, every part you asked about.

The part that matters is deciding what “available” means. Every store and part comes back with a pickupDisplay and a storeSelectionEnabled flag, and the prompt only counts it when both say yes. While testing this I asked about a few accessories near Dallas: chargers that were in stock came back available with selection enabled, and a case that can’t be picked up came back ineligible with selection turned off. Checking one field alone gets you false alarms.

The prompt also asks your agent for a few manners:

  • One request per check. Every store and every configuration in one call, from a small background script, instead of a full agent turn every 30 seconds.
  • Quiet until it matters. No “still nothing” updates. A failed check (an error or a reply it can’t read) is reported as a failed check, never as “out of stock.”
  • Double check, then tell you. On a hit it asks once more, then sends you the store, the configuration, Apple’s own wording (like “Tomorrow at Apple Knox Street”) and the buy link.
  • Alert only. It never orders, reserves or adds anything to a bag. You check out yourself.

Or Run The Check Yourself#

If you’d rather see it work first, here’s the same check as a small script. It prints one line per store that can hand you the phone, prints nothing when nobody can, and exits with 3 when the check itself fails:

pickup-check.shShell
#!/bin/bash
# One Apple Store pickup check. Prints one line per store + part that can be picked up.
# Usage: pickup-check.sh "Dallas, TX" MK1G4LL/A MK1J4LL/A ...
# Exit: 0 checked, 3 the check failed (not the same as out of stock).
loc=$1; shift
url="https://www.apple.com/shop/retail/pickup-message?pl=true&mts.0=regular&location=$(python3 -c 'import sys,urllib.parse as u;print(u.quote(sys.argv[1],safe=""))' "$loc")"
i=0; for p in "$@"; do url+="&parts.$i=${p/\//%2F}"; i=$((i+1)); done
body=$(curl -sf --max-time 20 -A "Mozilla/5.0 (Macintosh)" "$url") || { echo "check failed" >&2; exit 3; }
python3 -c '
import json, sys
try: body = json.loads(sys.argv[1])["body"]
except Exception: sys.exit("check failed: unreadable reply")
if "stores" not in body: sys.exit("check failed: " + str(body.get("errorMessage", "no stores in the reply")))
for s in body["stores"]:
    for part, a in s["partsAvailability"].items():
        r = a.get("messageTypes", {}).get("regular", {})
        if a.get("pickupDisplay") != "unavailable" and r.get("storeSelectionEnabled"):
            print(s["storeName"] + ": " + r.get("storePickupProductTitle", part) + ", " + r.get("storePickupQuote", ""))
' "$body" || exit 3
Shell
./pickup-check.sh "Dallas, TX" MK1G4LL/A MK1J4LL/A

Wrap it in a loop with a sleep 30 and you’ve got your own watcher. The agent version is nicer, though: it notices when something’s there, double checks, and tells you in words.

The same trick works for anything Apple sells with in-store pickup. Swap in the part numbers for an iPad or a pair of AirPods and the URL works exactly the same way.