本文へ移動
cccskills
無料GitHub で公開

mouser

Search Mouser Electronics for electronic components — secondary source for prototype orders. Find parts, check pricing/stock, download datasheets, analyze specifications. Use with KiCad for BOM creation and part selection. Use this skill when the user specifically mentions Mouser, when DigiKey is out of stock or has worse pricing, when comparing prices across distributors, or when searching for parts that DigiKey doesn't carry. For package cross-reference tables and BOM workflow, see the `bom` skill.

インストール方法を見る

含まれるファイル(3)

  • SKILL.md9.7 KB
  • scripts/fetch_datasheet_mouser.py18.0 KB
  • scripts/sync_datasheets_mouser.py22.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Mouser Electronics Parts Search & Analysis

Mouser is the secondary source for prototype orders — use when DigiKey is out of stock or has worse pricing. For production orders, see lcsc/jlcpcb. For BOM management and export workflows, see bom. For datasheets, prefer DigiKey's API (direct PDF links) — Mouser blocks automated PDF downloads.

API Credential Setup

Mouser uses simple API key authentication — no OAuth, no tokens, no callback URLs. The Search API key is a UUID passed as a query parameter.

Getting Your API Key

  1. Go to mouser.com → My Mouser → My Account
  2. Under "APIs" section, click "Manage"
  3. Register for Search API key — this is the one needed for part lookups and datasheet downloads
  4. Search API keys may require approval (status shows "pending authorization" initially)

Setting Credentials

Set the environment variable before running the scripts:

export MOUSER_SEARCH_API_KEY=your-search-api-key-uuid

If credentials are stored in a central secrets file (e.g., ~/.config/secrets.env), load them first:

export $(grep -v '^#' ~/.config/secrets.env | grep -v '^$' | xargs)

Mouser Search API Reference

All search endpoints use the Search API key as a query parameter: ?apiKey=<key>. Content-Type is application/json for all POST requests.

V1 Endpoints

Keyword Search

POST /api/v1/search/keyword?apiKey=<key>
{
  "SearchByKeywordRequest": {
    "keyword": "100nF 0402 ceramic capacitor",
    "records": 50,
    "startingRecord": 0,
    "searchOptions": "InStock"
  }
}
  • searchOptions: "None" | "Rohs" | "InStock" | "RohsAndInStock"
  • records: max 50 per request
  • startingRecord: offset for pagination

Part Number Search

POST /api/v1/search/partnumber?apiKey=<key>
{
  "SearchByPartRequest": {
    "mouserPartNumber": "GRM155R71C104KA88D|RC0402FR-0710KL",
    "partSearchOptions": "Exact"
  }
}
  • Up to 10 part numbers, pipe-separated (|)
  • Works with both Mouser part numbers AND manufacturer part numbers (MPNs)
  • partSearchOptions: "Exact" | "BeginsWith" | "Contains"

V2 Endpoints

V2 adds manufacturer filtering and pagination by page number.

Keyword + Manufacturer Search

POST /api/v2/search/keywordandmanufacturer?apiKey=<key>
{
  "SearchByKeywordMfrNameRequest": {
    "keyword": "LMR51450",
    "manufacturerName": "Texas Instruments",
    "records": 25,
    "pageNumber": 1,
    "searchOptions": "InStock"
  }
}

Note: the wrapper object name is SearchByKeywordMfrNameRequest (not SearchByKeywordMfrRequest — the V1 name is deprecated).

Part Number + Manufacturer Search

POST /api/v2/search/partnumberandmanufacturer?apiKey=<key>

Manufacturer List

GET /api/v2/search/manufacturerlist?apiKey=<key>

Returns the full list of manufacturer names for use in filtered searches.

V1 Deprecated Endpoints

These still work but V2 equivalents are preferred:

  • POST /api/v1/search/keywordandmanufacturer → use V2
  • POST /api/v1/search/partnumberandmanufacturer → use V2
  • GET /api/v1/search/manufacturerlist → use V2

Search Response Structure

All search endpoints return the same response format:

{
  "Errors": [],
  "SearchResults": {
    "NumberOfResult": 142,
    "Parts": [...]
  }
}

Key Part Fields

FieldTypeDescription
MouserPartNumberstringMouser's internal part number (prefixed, e.g., 81-GRM155R71C104KA88)
ManufacturerPartNumberstringManufacturer's part number (MPN) — use for cross-distributor matching
ManufacturerstringManufacturer name
DescriptionstringProduct description
CategorystringProduct category
DataSheetUrlstringURL to datasheet PDF (Mouser-hosted — see Datasheet section)
ProductDetailUrlstringURL to Mouser product page
ImagePathstringProduct image URL
AvailabilitystringHuman-readable stock text (e.g., "2648712 In Stock")
AvailabilityInStockstringNumeric stock quantity (as string)
AvailabilityOnOrderarrayIncoming stock: [{Quantity, Date}]
LeadTimestringFactory lead time (e.g., "84 Days")
LifecycleStatusstring|null"New Product", "End of Life", etc.
IsDiscontinuedstring"true" or "false" (string, not boolean)
SuggestedReplacementstringReplacement MPN if discontinued
MinstringMinimum order quantity (as string)
MultstringOrder multiple (as string)
ReelingboolTape-and-reel packaging available
ROHSStatusstringRoHS compliance status
PriceBreaksarrayTiered pricing: [{Quantity, Price, Currency}]
ProductAttributesarrayParametric specs: [{AttributeName, AttributeValue}]
AlternatePackagingsarray|nullAlternate packaging MPNs: [{APMfrPN}]
SurchargeMessagesarrayTariff/surcharge info: [{code, message}]
ProductCompliancearrayHTS codes, ECCN: [{ComplianceName, ComplianceValue}]
UnitWeightKgobject{UnitWeight: <float>} in kg

Quirks and Gotchas

  • Price is a string with currency symbol: "$0.10", not a float. Parse it before comparing.
  • Stock is a string: AvailabilityInStock returns "2648712" not 2648712.
  • IsDiscontinued is a string: "true" or "false", not boolean.
  • Mouser part numbers have prefixes: 81-GRM155R71C104KA88 — the prefix is Mouser-specific. Use ManufacturerPartNumber for cross-referencing.
  • V2 wrapper names differ from V1: V2 uses SearchByKeywordMfrNameRequest, not SearchByKeywordMfrRequest.
  • Tariff info: SurchargeMessages may contain US tariff percentages — useful for cost estimation.
  • On-order data: AvailabilityOnOrder shows incoming stock quantities and expected dates.

Datasheet Download & Sync

Mouser's DataSheetUrl field points to Mouser-hosted URLs (mouser.com/datasheet/...). These URLs block automated downloads — they return an HTML "Access denied" page when fetched with Python/curl/wget, even with browser User-Agent headers. The download scripts handle this by trying alternative manufacturer sources.

Datasheet Directory Sync

Use sync_datasheets_mouser.py to maintain a datasheets/ directory alongside a KiCad project. Same workflow and index.json format as the DigiKey skill.

# Sync datasheets for a KiCad project
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch>

# Preview what would be downloaded
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch> --dry-run

# Retry previously failed downloads
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch> --force

# Custom output directory
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch> -o ./my-datasheets

Single Datasheet Download

Use fetch_datasheet_mouser.py for one-off downloads.

# Search by MPN (uses Mouser API)
python3 <skill-path>/scripts/fetch_datasheet_mouser.py --search "TPS61023DRLR" -o datasheet.pdf

# Direct URL download
python3 <skill-path>/scripts/fetch_datasheet_mouser.py "https://example.com/datasheet.pdf" -o datasheet.pdf

# JSON output
python3 <skill-path>/scripts/fetch_datasheet_mouser.py --search "ADP1706" --json

Download Strategy

The scripts try multiple sources in order:

  1. Schematic URL — uses the datasheet URL embedded in the KiCad symbol (sync only)
  2. Mouser API search — gets the DataSheetUrl from the API response
  3. Alternative manufacturer sources — tries known URL patterns for major manufacturers (TI, Microchip, etc.) when the Mouser URL is blocked
  4. Headless browser fallback — if playwright is installed, uses headless Chromium as a last resort

When all methods fail, provide the ProductDetailUrl to the user so they can download from the Mouser product page in their browser.

Web Search Fallback

If no API key is available, search Mouser via WebFetch:

  • Search URL: https://www.mouser.com/c/?q=<query>
  • Product pages contain full specs, pricing tiers, stock, datasheets
  • WebFetch results from Mouser can be noisy (JS-heavy pages)

Include key parameters in the query:

  • Passives: value, package (0402/0603/0805), tolerance, voltage/power rating, dielectric (C0G/X7R)
  • ICs: part number or function, package (QFN/SOIC/TSSOP), key specs (voltage, current, interface)
  • Connectors: type (USB-C, JST-PH), pin count, pitch, mounting (SMD/THT), orientation

Tips

  • Pipe-separate up to 10 part numbers in a single PartNumber search for batch lookups
  • Min and Mult fields matter — some parts have minimum order qty or must be ordered in multiples
  • SurchargeMessages may include US tariff percentages — factor into cost estimates
  • AvailabilityOnOrder shows incoming stock with expected dates
  • Check IsDiscontinued and LifecycleStatus before selecting parts

Platform Guidance

  • Claude Code: Present part search results as tables. Use AskUserQuestion to confirm part selection before adding to BOM.
  • Codex/OpenCode: Present results as numbered options. Ask user to type selection number.
  • CLI: All part search and sourcing operations available via circuit-weaver subcommands.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

autoroute

無料

Route non-critical nets on a real KiCad PCB or Specctra DSN through Circuit Weaver's fail-closed Freerouting integration. Use after placement and net-class setup when the user requests autorouting, a validated SES session, routing diagnostics, or post-route cleanup. Keep critical power, RF, clock, crystal, switching, and differential nets manual.

日本語の概要は準備中です。原文の説明を表示しています。

mattpainter701/kicad_automations202026年10月3日 更新

bom

無料

Manage an electronics bill of materials across distributors and fabricators: part selection, stock, pricing, alternates, ordering, KiCad properties, and BOM/CPL export. Use for distributor-neutral sourcing, cost comparison, order preparation, or requests such as "what parts do I need" and "export for JLCPCB". Do not take over schematic analysis or a complete new-design workflow unless the requested task is specifically its sourcing/manufacturing stage.

日本語の概要は準備中です。原文の説明を表示しています。

mattpainter701/kicad_automations202026年10月3日 更新

bom

無料

BOM management, sourcing, pricing, export, and fabrication preparation. Load the canonical Circuit Weaver skill from `skills/bom/SKILL.md`.

日本語の概要は準備中です。原文の説明を表示しています。

mattpainter701/kicad_automations202026年10月3日 更新

Create, import, analyze, or resume an end-to-end Circuit Weaver electronic design with durable project state. Load the canonical workflow from skills/circuit-weaver/SKILL.md. Use kicad for one-off file inspection, bom for sourcing, and design-wizard only when explicitly requested.

日本語の概要は準備中です。原文の説明を表示しています。

mattpainter701/kicad_automations202026年10月3日 更新

Create, import, analyze, resume, or revise an end-to-end Circuit Weaver electronic design from requirements through validated functional KiCad schematics, placement review, and a truthful manufacturing handoff. Use for new designs and for existing KiCad/PCB/Gerber projects that need durable state. Use kicad for one-off file inspection, bom for standalone sourcing, and design-wizard only when the user explicitly requests the slower questionnaire.

日本語の概要は準備中です。原文の説明を表示しています。

mattpainter701/kicad_automations202026年10月3日 更新

Run the explicit, human-in-the-loop Circuit Weaver questionnaire from requirements through a validated design and KiCad handoff. Use only when the user asks for the design-wizard skill, the offline interactive wizard, or a slow step-by-step guided questionnaire. Do not trigger for ordinary new-design requests; use circuit-weaver for automatic end-to-end orchestration.

日本語の概要は準備中です。原文の説明を表示しています。

mattpainter701/kicad_automations202026年10月3日 更新

mattpainter701 のスキルをすべて見る

このスキルの問題を報告する