12 min read
How to track electronic component prices and stock
Price breaks, stock and lead times for any part on Digi-Key and Mouser, as JSON, on a schedule.
Published October 29, 2026 · Updated November 11, 2026
| Distributor | Part | Price (1) | In stock |
|---|---|---|---|
| Digi-Key | STM32F103C8T6 | $8.31 | 7,115 |
| Mouser | STM32F103C8T6 | $8.29 | 0 |
| Digi-Key | ESP32-S3-WROOM-1-N16R8 | $6.76 | 0 |
| Mouser | ESP32-S3-WROOM-1-N16R8 | $6.72 | 36,128 |
| Digi-Key | LM358DR (TI) | $0.27 | 76,567 |
| Mouser | LM358DR (TI) | $0.26 | 57,635 |
String is a web access API for electronics teams that track component prices and stock. It returns any Digi-Key or Mouser product page, or just the part's price breaks, stock and factory lead time as JSON. In our October 2026 benchmark it was one of 2 of 17 providers to fetch digikey.com and mouser.com on all 10 attempts, with Firecrawl, and it returned 98.6% of requests across 100 bot-protected sites, the most of any provider.
Quickstart
Add the hosted MCP server to Claude, Cursor, ChatGPT or any MCP client. Then give your agent a Digi-Key or Mouser product URL. It calls the web_access_fetch tool and reads the price breaks and stock.
https://mcp.usestring.ai?login
One call returns a Digi-Key part's price breaks, stock and lead time as JSON. If the page has no price or stock figure, you get "extracted": false back instead of a guess.
curl https://request.usestring.ai/v1/fetch \
-H "Authorization: Bearer $STRING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.digikey.com/en/products/detail/stmicroelectronics/STM32F103C8T6/1646338",
"countryCode": "US",
"jsonSchema": {
"type": "object",
"properties": {
"manufacturer": { "type": "string" },
"part_number": { "type": "string" },
"distributor_part_number": { "type": "string" },
"quantity_available": { "type": "integer" },
"lead_time_weeks": { "type": "integer" },
"price_breaks": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"quantity": { "type": "integer" },
"unit_price": { "type": "number" }
},
"required": ["quantity", "unit_price"]
}
}
},
"required": ["manufacturer", "part_number", "quantity_available", "lead_time_weeks", "price_breaks"]
}
}'Response (String fetch on October 29, 2026)
{
"manufacturer": "STMicroelectronics",
"part_number": "STM32F103C8T6",
"distributor_part_number": "497-6063-ND",
"quantity_available": 7115,
"lead_time_weeks": 40,
"price_breaks": [
{ "quantity": 1, "unit_price": 8.31 },
{ "quantity": 10, "unit_price": 6.399 },
{ "quantity": 50, "unit_price": 5.633 },
{ "quantity": 100, "unit_price": 5.3956 },
{ "quantity": 250, "unit_price": 5.14496 },
{ "quantity": 500, "unit_price": 4.99394 }
]
}Which tool should I use to track electronic component prices?
Pick the Digi-Key or Mouser API if you only track those two distributors and their access terms and request limits suit your volume. Pick String if you also buy from distributors with no public API, or want one request shape for all of them. In the October 30, 2026 run of our benchmark, String and Firecrawl were the only 2 of 17 providers to fetch digikey.com and mouser.com on all 10 attempts. The Quickstart below shows one call.
Why track component prices and stock?
A board can't ship if one part on its bill of materials (BOM) is out of stock, and distributor stock moves every day. A tracker checks each part's product page at Digi-Key, Mouser and the other distributors you buy from, stores price, stock and lead time, and tells you when they change. It answers questions like these:
- Who has the part in stock right now? On October 29, 2026, Digi-Key showed 7,115 STM32F103C8T6 microcontrollers in stock while Mouser showed 0. For the ESP32-S3-WROOM-1-N16R8 module it was the other way round: 0 at Digi-Key, 36,128 at Mouser.
- What will this build cost? Unit prices fall with quantity. Mouser listed the same STM32 at $8.29 each for 1 and $4.26 each for 1,000 (source: Mouser product page, fetched by String on October 29, 2026).
- How long will I wait if it runs out? Both distributors listed a 40-week factory lead time for that STM32 on October 29, 2026, so a stockout now could hold a build for most of a year.
What you can collect
Price breaks
The unit price at every quantity tier, per packaging option, such as cut tape, tray or full reel.
Stock and incoming stock
Quantity in stock, quantity on order and the date the next delivery is expected, where the distributor shows them.
Lead times and minimums
Factory lead time, minimum order quantity and order multiples for each part.
Part identity
Manufacturer, manufacturer part number, the distributor's own part number and the datasheet link.
Why does component price tracking break?
- Distributor sites block scrapers. In our October 2026 benchmark, 15 of the 16 other scraping APIs couldn't fetch mouser.com on every attempt, and 10 got nothing back, including Bright Data, Oxylabs and Browserbase. On digikey.com, 7 of 16 missed at least once. Across both sites, String and Firecrawl returned 10 of 10, Scrape.do and Scrapfly 8 and Browserbase 0.
- One part number can mean two parts. A Digi-Key search for LM358DR returned parts from both Texas Instruments and Rohm. Matching on the part number alone mixes their prices.
- Price depends on packaging. Digi-Key sold the ESP32-S3-WROOM-1-N16R8 on cut tape from 1 piece at $6.76, and on full reels of 650 at $4.60 (Digi-Key product page, String fetch on October 29, 2026). A tracker that mixes the two reports a price change that never happened.
- Blocked pages can look real. A challenge page loads with no stock figure on it, and the tracker saves the gap as a stockout.
Why do teams choose String?
- It fetches the distributors most can't. String and Firecrawl were the only providers to return all 10 Digi-Key and Mouser requests in our October 2026 benchmark, and it returned 98.6% of requests across 100 bot-protected sites, the most of 17 providers.
- One request shape for every distributor. Send the same
jsonSchemato Digi-Key, Mouser or any other distributor's product page and get the same fields back. You don't need a separate API key or quota for each one. - You pay only for pages that come back. Blocks and errors are free.
- Blank pages don't become stockouts. Mark stock and price breaks as required in your schema, and a page that comes back without them is flagged instead of saved.
How do I build a component stock tracker?
Key every BOM line on manufacturer and part number
Export the BOM with the manufacturer and the manufacturer part number (MPN) for each line. Match distributor pages on both. The same MPN can belong to two manufacturers, and each distributor gives the part its own number, such as 497-6063-ND at Digi-Key and 511-STM32F103C8T6 at Mouser.
Find each part's product page at each distributor
Search each distributor once per part and save the product URL. A search for an exact MPN either opens the product page or lists every part that matches, so pick the one from your manufacturer.
With String: Fetch the search page and read the product link from it, or run a sitemap crawl to list a distributor's product URLs.
Read price and stock from the page's own data
Both distributors put schema.org Product data in the page, with the MPN, a price and an availability flag, and Mouser adds an inventory level. The full price-break table and the lead time sit in the page body. Read the structured data first and the table for the tiers.
With String: Pass a
jsonSchemaand get the price breaks, stock and lead time back as JSON. Mark every field you need as required. In our tests, lead time came back only when it was required.Compare prices at your build quantity and packaging
Store the price break that matches the quantity you buy, for one packaging type. Cut tape, tray and full reel are priced separately, and full reels often carry a minimum order of hundreds or thousands of pieces.
Treat a blank page as a failure
A page with no stock figure or price table was probably blocked or changed. Flag it and keep the last good values. Only a page that loads and shows 0 in stock is a stockout.
Save each check and alert on what changed
Store the time, distributor, MPN, stock, price at your quantity and lead time. Alert when stock drops below what your next build needs, when a part is out of stock at every distributor, or when its lead time gets longer. Check daily, and every few hours for parts that are running short. Send alerts to Slack or email.
How do I get alerts when a BOM part goes out of stock or its lead time changes?
Run a scheduled workflow that fetches each BOM part's product page at every distributor, compares stock and lead time with the last check, and posts to Slack or email when a rule fires. String does the fetch. A scheduler such as n8n, Zapier or cron does the timing and sends the message. In n8n, String runs from the built-in HTTP Request node, with nothing to install (String n8n docs).
The workflow in n8n, node by node
Schedule Trigger
Run every 4 hours for parts that are running short and once a day for the rest (n8n Schedule Trigger).
Read the BOM
Load one row per part and distributor: manufacturer, MPN, product URL, the quantity your next build needs, and the stock and lead time saved last time. A spreadsheet or a database table both work.
HTTP Request to String
Send a
POSTtohttps://request.usestring.ai/v1/fetchwith a Header Auth credential (Authorization: Bearer <your key>) and a JSON body holding the row's URL and thejsonSchemafrom the Quickstart. Under Options → Response, turn on Include Response Headers and Status and Never Error. The first exposes the HTTP status as$json.statusCodeand puts the extraction result under$json.body; the second lets HTTP errors reach the next node instead of stopping the run.If the fetch failed, stop there
Continue only when
$json.statusCode === 200and$json.body.extracted !== false. A failed fetch or$json.body.extracted === falsekeeps the last good values and goes on a "check this part" list, never into a stockout alert.Compare with the last check
An If or Code node applies the alert rules below to the new values in
$json.bodyand the saved ones.Send the alert and save the check
Post the parts that fired to a Slack channel or an email, then write the new stock, price and lead time back to the BOM for the next run.
On Zapier, the same flow starts from a schedule trigger and uses the String Web Access app's Extract Data From URL action, which returns only the fields a JSON schema describes. The app is invite-only until Zapier lists it in its app directory (String Zapier docs). For cron or GitHub Actions in Python, see how to schedule recurring scraping jobs. For retries and pacing in n8n, see how to scrape websites in n8n without getting blocked.
Alert rules that catch BOM risk
- Alert when a part is out of stock at every distributor you buy from. One distributor at 0 isn't a shortage: on October 29, 2026, Mouser showed 0 STM32F103C8T6 microcontrollers while Digi-Key showed 7,115.
- Alert when stock across your distributors falls under the quantity your next build needs.
- Alert when
lead_time_weeksis higher than at the last check. Both distributors listed a 40-week factory lead time for the STM32F103C8T6 on October 29, 2026. - Alert when stock goes from 0 to above 0 at any distributor, so the buyer can order while it lasts.
- Alert when a part's page fails twice in a row, so a blocked page never reads as a stockout.
What it costs to check a BOM every 4 hours
Checking a 40-part BOM at Digi-Key and Mouser every 4 hours is 480 requests a day, or about 14,400 a month. Both distributors' product pages billed as premium fetches on October 29, 2026. As of October 2026, that is about $34.56 a month in usage on the Starter plan at $2.40 per 1,000, or $12.96 on the Growth plan at $0.90 per 1,000 (String pricing). Structured extraction with jsonSchema adds a small fee per request, and blocked requests cost nothing.
Get a free sample stock feed
Tell us which parts and distributors you watch. We'll run String on their product pages and email you a sample feed of price, stock and lead time for each one, free.
| Distributor | Part | Price (1) | In stock |
|---|---|---|---|
| Digi-Key | STM32F103C8T6 | $8.31 | 7,115 |
| Mouser | STM32F103C8T6 | $8.29 | 0 |
| Digi-Key | ESP32-S3-WROOM-1-N16R8 | $6.76 | 0 |
| Mouser | ESP32-S3-WROOM-1-N16R8 | $6.72 | 36,128 |
| Digi-Key | LM358DR (TI) | $0.27 | 76,567 |
| Mouser | LM358DR (TI) | $0.26 | 57,635 |
Frequently asked questions
What's the best way to track electronic component prices and stock?
The best way to track electronic component prices and stock is to fetch each part's product page at every distributor you buy from on a schedule, and store the price at your quantity, the stock and the lead time. The hard part is getting the pages, because distributor sites block most scrapers. In our October 2026 benchmark, the String Web Access API and Firecrawl were the only 2 of 17 providers to fetch digikey.com and mouser.com on all 10 attempts. Across all 100 bot-protected sites, String returned 98.6% of requests, the most of any provider.
Should I use the Digi-Key or Mouser API instead?
The Digi-Key and Mouser APIs are a good fit if you only track those two distributors and their access terms and request limits suit your volume. Each one needs its own developer account and key, and returns its own field names. String reads the public product page instead, so one request shape covers Digi-Key, Mouser and distributors that have no public API.
How much does it cost to track component prices?
Tracking component prices with String costs $2.40 per 1,000 checks on the Starter plan ($19 a month, all of it usage credit), because Digi-Key and Mouser product pages bill as premium fetches. On October 29, 2026, both returned with x-billed-request-type: request_premium. Checking 200 parts at both distributors once a day is 12,000 requests a month, about $28.80 in usage. On the Growth plan ($99 a month) premium fetches cost $0.90 per 1,000, and sites that work on a standard proxy cost $0.25 per 1,000 on Starter, as of October 2026. Failed requests aren't billed. See pricing.
How do I get an alert when a part comes back in stock?
To get a restock alert, check the part's product page at each distributor every few hours and alert when the stock figure goes from 0 to above 0. Mouser also shows stock on order and its expected date, such as 16,250 ESP32-S3 modules due on November 2, 2026, so you can see a restock coming before it lands (Mouser product page, String fetch on October 29, 2026).
Can I track prices from distributors other than Digi-Key and Mouser?
Yes, String fetches any public product page, so the same request works on Arrow, Newark, LCSC, TME or a manufacturer's own store. Our benchmark tested only digikey.com and mouser.com among distributors, so test the others with a free sample stock feed or your free fetches before you rely on them.
Can I see prices for another country?
Yes, String fetches the page from the country you set in countryCode, so you see that country's site, currency and stock. Mouser's US page for the ESP32-S3 module noted that a 15% tariff may be applied when shipping to the United States, a cost that isn't in the listed price (source: Mouser product page, fetched by String on October 29, 2026).
Is it legal to scrape distributor prices?
Prices and stock counts are facts, and collecting public prices is among the best-supported cases in scraping law. Site terms you accept can still bind you. Stay on public pages, keep your request rate reasonable, and check with your counsel. We cover the cases in is it legal to scrape competitor prices? and is web scraping legal?
Does String work on the distributor sites I need?
Send us the part URLs and we'll run them and show you what comes back before you commit. Ask for a free sample stock feed, or test them yourself with your first 20,000 free standard fetches.