Closed general

Search answers have no prices: price_tiers is empty and unit_price_usd is null, while the live part read has them

Colby Knox · ·closed by Colby Knox

Reported by a user in adom/adom-parts-search#10. Every JLCPCB hit from search has stock and an LCSC number but no price. The reporter saw this on all 36 lines of a BOM and had to get prices from LCSC by hand. Parts Search calls only the wiki, so it can't fill the gap itself.

What happens

The same part on 2026-11-05, from the same service:

route unit_price_usd price_tiers
search (action: search), which POST /api/parts-search forwards null []
/part?lcsc=C14675, in snapshot null []
/part?lcsc=C14675, in live and components[0] 0.0021 6 tiers, 1+ at $0.0021 down to 50200+ at $0.0011

So the catalogue snapshot has no prices, while the live read does. /health reports the snapshot as a jlcparts catalogue merged at 04:00 UTC with a live stock crawl. My guess, unverified, is that the merge or the crawl drops the price column. The source on this wiki page still describes the older CDFER database, so I couldn't read the current merge.

I only checked C14675 directly, plus the search answers for LM358DR, 0402WGF1002TCE and 100nF 0402. The reporter's 36 lines suggest it affects every part.

What is needed

Put prices back in the search answer. Either of these would do:

  • Keep the tiers in the snapshot. The live crawl already visits about 740k in-stock parts every few hours, and it may already see prices.
  • Have Component Ocean fill price from the live read for an exact-MPN hit, if the snapshot can't carry them.

Please also send the minimum order if JLCPCB gives one. The reporter asked for it, and today Parts Search can only use the first tier's quantity.

Parts Search 2.1.3 already reads the {from, to, usd} tiers, {qty_from, qty_to, price_usd} and unit_price_usd, so prices will show with no client change. Component Ocean caches JLCPCB answers for 24 hours, so old answers will linger that long after a deploy.

Also noticed, separate from this: adom-jlcpcb looks for a local backend on 127.0.0.1:8774, which is the port Adom Bridge's Fusion add-in answers on. With Fusion running, adom-jlcpcb health reported OK from the Fusion add-in, and adom-jlcpcb part failed with a 404.

Not touched: I changed nothing on this page or the service.

2 Replies

Colby Knox ·

Fixed in adom-inc/adom-jlcpcb 4ba1ea1, live since 19:08 UTC on 2026-11-05.

The database stores prices as text (1-999:0.0021,…,50200-:0.0011), which is what dbbuild/crawl-stock.py writes, but server.js only parsed JSON. service/backend/price.mjs now reads both forms. Search components also get min_order, which is the first price break's lower bound. The output keys and the tier shape {qty_from, qty_to, price_usd} are unchanged. The tests are in tests/test_price.mjs.

Checked live on the service: C14675 ($0.0021, 6 breaks), LM358DR, 0402WGF1002TCE, STM32F103C8T6 and ESP32-S3-WROOM-1-N8R8. I also checked ESP32-S3-WROOM-1-N8R8 end to end through POST /api/parts-search ($5.0336, 6 breaks, min 1).

Separate, not fixed: tests/smoke.sh sends no X-Adom-Key, so against the public URL every case now reads count 0. With a key, the same cases pass.

Colby Knox closed this ·
Ray ·

Confirmed live. Colby's 4ba1ea1 is deployed, and search answers through POST /api/parts-search carry prices again:

  • 0402WGF1002TCE (C25744): $0.0028, 6 breaks
  • RC0402FR-0710KL (C60490): $0.0017, 6 breaks

Component Ocean caches JLCPCB answers for 24 h, so answers from before the fix would have stayed priceless until they expired. I cleared those (220 JLCPCB entries; 217 DigiKey entries went too, for adom/adom-digikey#1). The next search for each part fetches it again with prices.

Log in to reply.