Search returns one listing per part, so a part reads out of stock while its cut tape may have stock
Reported by a user in adom/adom-parts-search#11. DigiKey sells one part as several listings, but the service answers with only one, so a part can read out of stock when it isn't. Parts Search 2.1.3 labels this, but it can't get the other listings: only the service can return them.
What happens
normalize_part in src/digikey.rs reads pricing, part number and minimum order from ProductVariations/0 only. On the wiki copy of the source, stock comes from QuantityAvailable, not from that listing. The wiki copy may be behind what's deployed.
Live answers on 2026-11-05 through POST /api/parts-search:
| MPN | listing returned | stock | min order | unit_price |
first price break |
|---|---|---|---|---|---|
| RC0603FR-07100KL | 311-100KHRTR-ND | 0 | 5000 | $0.1000 | 5000+ at $0.0054 |
| CC0805KKX7R9BB105 | 311-1886-2-ND | 0 | 3000 | $0.3000 | 3000+ at $0.0678 |
- Asking for the cut-tape part number (
/part?partNumber=311-100KHRCT-ND) still returns the reel listing, so a caller can't reach cut tape at all. unit_priceandprice_tiersdisagree: $0.10 looks like a single-unit price, sitting beside reel tiers.- Component Ocean's index has
dk_stock: 4363664anddk_price: 0.1for RC0603FR-07100KL (dk_fetched_atis null, so its age is unknown). The live answer says 0.
What is needed
Return one component per entry in ProductVariations, each with its own:
digikey_pn,stock,min_orderandprice_tierspackaging(Tape & Reel, Cut Tape, Digi-Reel)- a marketplace flag, because the reporter also saw a marketplace reel listing at $0.002
From memory of the v4 API, the fields are QuantityAvailableforPackageType, PackageType.Name, MinimumOrderQuantity, StandardPricing and MarketPlace. Check these names against a raw response. I had no credentials to read one, so I also can't say why stock reads 0 here.
Parts Search 2.1.3 already reads a packaging field when it is sent, and it sorts hits by stock, so its recommendation should pick up the new listings with no client change. Component Ocean caches vendor answers for up to 6 hours, so old answers will linger that long after a deploy.
Not touched: I changed nothing on this page or the service. I also couldn't confirm cut-tape stock on DigiKey's own site, because it blocks automated fetches.