---
title: "How to track electronic component prices and stock"
canonical: "https://usestring.ai/use-cases/electronic-component-price-tracking"
description: "The String Web Access API is the best way to track electronic 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."
updated: 2026-10-29
---

> Markdown version of https://usestring.ai/use-cases/electronic-component-price-tracking, for AI agents. Reading this yourself? The full page is at https://usestring.ai/use-cases/electronic-component-price-tracking.

# How to track electronic component prices and stock

The String Web Access API is the best way to track electronic 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 [September 2026 benchmark](https://usestring.ai/benchmark) it was the only one of 16 providers to fetch digikey.com and mouser.com on all 10 attempts, and it returned 97% of requests across 100 bot-protected sites, the most of any provider.

**On this page**

1. [Quickstart](#quickstart)
2. [Why track component prices and stock?](#why-track-component-prices-and-stock)
3. [Why does component price tracking break?](#why-does-component-price-tracking-break)
4. [How do I build a component stock tracker?](#how-do-i-build-a-component-stock-tracker)
5. [Get a free sample stock feed](#get-a-free-sample-stock-feed)
6. [Frequently asked questions](#frequently-asked-questions)

---

## Quickstart

### From your agent

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.

```text
https://mcp.usestring.ai/v1/mcp
```

[MCP setup](https://portal.usestring.ai/docs/mcp/remote) · [n8n](https://portal.usestring.ai/docs/integrations/n8n) · [Zapier](https://portal.usestring.ai/docs/integrations/zapier)

### From the API

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.

```bash
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 (keyed run on October 29, 2026; billed as `request_premium`, `x-json-schema-applied: true`):

```json
{
  "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 }
  ]
}
```

The same request on Mouser's page for the part (`https://www.mouser.com/ProductDetail/511-STM32F103C8T6`) returned `"distributor_part_number": "511-STM32F103C8T6"`, `"quantity_available": 0`, `"lead_time_weeks": 40` and eight price breaks, starting at $8.29 for 1.

[Get a free API key](https://portal.usestring.ai/sign-up) · [Structured extraction docs](https://portal.usestring.ai/docs/fetch/structured-extraction)

---

## 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.
- **How long will I wait if it runs out?** Both distributors listed a 40-week factory lead time for that STM32, so a stockout now could hold a build for most of a year.

### What you can collect

| What | Examples |
|---|---|
| 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 [September 2026 benchmark](https://usestring.ai/benchmark), 14 of the 15 other scraping APIs couldn't fetch mouser.com on every attempt, and 10 got nothing back, including ScrapingBee, Oxylabs, Zyte and Browserbase. On digikey.com, 10 of 15 missed at least once. Across both sites, String returned 10 of 10, 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. 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.

Benchmark rows (Web Data Frontier Benchmark, run September 16, 2026, successful attempts out of 5, in the benchmark's column order):

| Site | String | Scrapfly | ScraperAPI | Firecrawl | Apify | Bright | ScrapingBee | Context.dev | Oxylabs | Nimble | Zyte | Decodo | Scrapingdog | Browserbase | ZenRows | ScrapingAnt |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| digikey.com | 5/5 | 4/5 | 4/5 | 0/5 | 5/5 | 4/5 | 4/5 | 5/5 | 5/5 | 5/5 | 5/5 | 1/5 | 1/5 | 0/5 | 0/5 | 0/5 |
| mouser.com | 5/5 | 4/5 | 2/5 | 5/5 | 2/5 | 2/5 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 |

---

## Why do teams choose String?

- **It fetches the distributors others can't.** String was the only provider to return all 10 Digi-Key and Mouser requests in our [September 2026 benchmark](https://usestring.ai/benchmark), and it returned 97% of requests across 100 bot-protected sites, the most of 16 providers.
- **One request shape for every distributor.** Send the same `jsonSchema` to 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?

### 1. 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.

### 2. 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.

### 3. 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 `jsonSchema` and 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.

### 4. 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.

### 5. 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.

### 6. 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.

---

## 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.

Email [support@usestring.ai](mailto:support@usestring.ai) with your work email, what you want to track and the distributors or part URLs, or use the [form on the page](https://usestring.ai/use-cases/electronic-component-price-tracking#sample-feed).

What a stock feed looks like (rows from String fetches of the US Digi-Key and Mouser product pages on October 29, 2026; price is the unit price for 1 piece on cut tape or tray; LM358DR is the Texas Instruments part):

| 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 [September 2026 benchmark](https://usestring.ai/benchmark), the String Web Access API was the only one of 16 providers to fetch digikey.com and mouser.com on all 10 attempts. Across all 100 bot-protected sites, String returned 97% 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. Failed requests aren't billed. See [pricing](https://usestring.ai/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.

### 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](#get-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.

### 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?](https://usestring.ai/answers/is-it-legal-to-scrape-competitor-prices) and [is web scraping legal?](https://usestring.ai/answers/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](#get-a-free-sample-stock-feed), or test them yourself with your first 20,000 free standard fetches.

---

## Send us the sites you can't get

We'll show you what comes back. [Get started](https://portal.usestring.ai/sign-up) · [Book a demo](https://usestring.ai/book-demo)

All use cases: https://usestring.ai/use-cases

---

[llms.txt](https://usestring.ai/llms.txt): machine-readable index of this site for AI agents.
