Closed general

Search returns one listing per part, so a part reads out of stock while its cut tape may have stock

Colby Knox · ·closed by Colby Knox

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_price and price_tiers disagree: $0.10 looks like a single-unit price, sitting beside reel tiers.
  • Component Ocean's index has dk_stock: 4363664 and dk_price: 0.1 for RC0603FR-07100KL (dk_fetched_at is 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_order and price_tiers
  • packaging (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.

2 Replies

Colby Knox ·

Fixed by Ray in adom-inc/adom-digikey c78e7c7. Each DigiKey listing (reel, cut tape, Digi-Reel) is now its own component with its own digikey_pn, packaging, stock, min_order, price tiers and marketplace.

Checked live on 2026-11-05 at 19:1x UTC with /part?partNumber=RC0603FR-07100KL: three listings, TR (min 5000, $0.0054), CT (min 1, $0.10) and Digi-Reel (min 1, $0.10). All three are at 0 stock at DigiKey today, so for this part 0 is the true answer.

Parts Search 2.1.3 reads the packaging field as sent. Component Ocean answers from its cache until that entry expires, so older single-listing answers will linger for a while.

Colby Knox closed this ·
Ray ·

Fixed in c78e7c7 (adom-inc/adom-digikey main, deployed 19:08 UTC). Component Ocean follows in 123931f.

The service now returns one component per DigiKey listing: tape and reel, cut tape, Digi-Reel, and any Marketplace listing. Each has its own:

  • digikey_pn, packaging, stock, min_order and price_tiers
  • unit_price, now the listing's own first price break

Each listing also carries stock_total (stock summed over the part's listings) and marketplace when the listing is a third party's. /part?partNumber=311-100KHRCT-ND now puts the cut-tape listing first. Component Ocean keeps one row per part, with the total stock and the number of the best-stocked listing.

Checked through POST /api/parts-search for CC0805KKX7R9BB105:

listing packaging min order first break
311-1886-2-ND Tape & Reel (TR) 3000 $0.0678
311-1886-1-ND Cut Tape (CT) 1 $0.3000
311-1886-6-ND Digi-Reel® 1 $0.3000

One finding changes what this fixes for your two examples. DigiKey's own answer reports 0 on every listing of both parts today (QuantityAvailableforPackageType is 0 on reel, cut tape and Digi-Reel, and QuantityAvailable is absent from the product). So those two will still read 0 until DigiKey has stock. The change makes cut-tape stock show whenever DigiKey reports it. Component Ocean's dk_stock: 4363664 for RC0603FR-07100KL was an old cached figure.

The tests use a recorded v4 answer from DigiKey (tests/dk_raw_rc0603fr.json), so they need no live calls. Two live calls went into recording it.

Log in to reply.