$npx -y skills add aklofas/kicad-happy --skill mouserSearch 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. Also supports batch MPN-list seeding (--mpn-list) for b
| 1 | # Mouser Electronics Parts Search & Analysis |
| 2 | |
| 3 | ## Related Skills |
| 4 | |
| 5 | | Skill | Purpose | |
| 6 | |-------|---------| |
| 7 | | `kicad` | Schematic analysis — extracts MPNs for part lookup | |
| 8 | | `bom` | BOM management — orchestrates sourcing across distributors | |
| 9 | | `digikey` | Primary prototype source (prefer for datasheets — direct PDF links) | |
| 10 | | `spice` | Uses Mouser parametric data for behavioral SPICE models | |
| 11 | |
| 12 | 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. |
| 13 | |
| 14 | ## API Credential Setup |
| 15 | |
| 16 | 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. |
| 17 | |
| 18 | ### Getting Your API Key |
| 19 | |
| 20 | 1. Go to [mouser.com](https://www.mouser.com) → My Mouser → My Account |
| 21 | 2. Under "APIs" section, click "Manage" |
| 22 | 3. Register for **Search API** key — this is the one needed for part lookups and datasheet downloads |
| 23 | 4. Search API keys may require approval (status shows "pending authorization" initially) |
| 24 | |
| 25 | ### Setting Credentials |
| 26 | |
| 27 | Set the environment variable before running the scripts: |
| 28 | ```bash |
| 29 | export MOUSER_SEARCH_API_KEY=your-search-api-key-uuid |
| 30 | ``` |
| 31 | |
| 32 | If credentials are stored in a central secrets file (e.g., `~/.config/secrets.env`), load them first: |
| 33 | ```bash |
| 34 | export $(grep -v '^#' ~/.config/secrets.env | grep -v '^$' | xargs) |
| 35 | ``` |
| 36 | |
| 37 | ## Mouser Search API Reference |
| 38 | |
| 39 | All search endpoints use the Search API key as a query parameter: `?apiKey=<key>`. Content-Type is `application/json` for all POST requests. |
| 40 | |
| 41 | ### V1 Endpoints |
| 42 | |
| 43 | #### Keyword Search |
| 44 | ``` |
| 45 | POST /api/v1/search/keyword?apiKey=<key> |
| 46 | ``` |
| 47 | ```json |
| 48 | { |
| 49 | "SearchByKeywordRequest": { |
| 50 | "keyword": "100nF 0402 ceramic capacitor", |
| 51 | "records": 50, |
| 52 | "startingRecord": 0, |
| 53 | "searchOptions": "InStock" |
| 54 | } |
| 55 | } |
| 56 | ``` |
| 57 | - `searchOptions`: `"None"` | `"Rohs"` | `"InStock"` | `"RohsAndInStock"` |
| 58 | - `records`: max 50 per request |
| 59 | - `startingRecord`: offset for pagination |
| 60 | |
| 61 | #### Part Number Search |
| 62 | ``` |
| 63 | POST /api/v1/search/partnumber?apiKey=<key> |
| 64 | ``` |
| 65 | ```json |
| 66 | { |
| 67 | "SearchByPartRequest": { |
| 68 | "mouserPartNumber": "GRM155R71C104KA88D|RC0402FR-0710KL", |
| 69 | "partSearchOptions": "Exact" |
| 70 | } |
| 71 | } |
| 72 | ``` |
| 73 | - Up to **10 part numbers**, pipe-separated (`|`) |
| 74 | - Works with both Mouser part numbers AND manufacturer part numbers (MPNs) |
| 75 | - `partSearchOptions`: `"Exact"` | `"BeginsWith"` | `"Contains"` |
| 76 | |
| 77 | ### V2 Endpoints |
| 78 | |
| 79 | V2 adds manufacturer filtering and pagination by page number. |
| 80 | |
| 81 | #### Keyword + Manufacturer Search |
| 82 | ``` |
| 83 | POST /api/v2/search/keywordandmanufacturer?apiKey=<key> |
| 84 | ``` |
| 85 | ```json |
| 86 | { |
| 87 | "SearchByKeywordMfrNameRequest": { |
| 88 | "keyword": "LMR51450", |
| 89 | "manufacturerName": "Texas Instruments", |
| 90 | "records": 25, |
| 91 | "pageNumber": 1, |
| 92 | "searchOptions": "InStock" |
| 93 | } |
| 94 | } |
| 95 | ``` |
| 96 | Note: the wrapper object name is `SearchByKeywordMfrNameRequest` (not `SearchByKeywordMfrRequest` — the V1 name is deprecated). |
| 97 | |
| 98 | #### Part Number + Manufacturer Search |
| 99 | ``` |
| 100 | POST /api/v2/search/partnumberandmanufacturer?apiKey=<key> |
| 101 | ``` |
| 102 | |
| 103 | #### Manufacturer List |
| 104 | ``` |
| 105 | GET /api/v2/search/manufacturerlist?apiKey=<key> |
| 106 | ``` |
| 107 | Returns the full list of manufacturer names for use in filtered searches. |
| 108 | |
| 109 | ### V1 Deprecated Endpoints |
| 110 | |
| 111 | These still work but V2 equivalents are preferred: |
| 112 | - `POST /api/v1/search/keywordandmanufacturer` → use V2 |
| 113 | - `POST /api/v1/search/partnumberandmanufacturer` → use V2 |
| 114 | - `GET /api/v1/search/manufacturerlist` → use V2 |
| 115 | |
| 116 | ## Search Response Structure |
| 117 | |
| 118 | All search endpoints return the same response format: |
| 119 | |
| 120 | ```json |
| 121 | { |
| 122 | "Errors": [], |
| 123 | "SearchResults": { |
| 124 | "NumberOfResult": 142, |
| 125 | "Parts": [...] |
| 126 | } |
| 127 | } |
| 128 | ``` |
| 129 | |
| 130 | ### Key Part Fields |
| 131 | |
| 132 | | Field | Type | Description | |
| 133 | |-------|------|-------------| |
| 134 | | `MouserPartNumber` | string | Mouser's internal part number (prefixed, e.g., `81-GRM155R71C104KA88`) | |
| 135 | | `ManufacturerPartNumber` | string | Manufacturer's part number (MPN) — use for cross-distributor matching | |
| 136 | | `Manufacturer` | string | Manufacturer name | |
| 137 | | `Description` | string | Product description | |
| 138 | | `Category` | string | Product category | |
| 139 | | `DataSheetUrl` | string | URL to datasheet PDF (Mouser-hosted — see Datasheet section) | |
| 140 | | `ProductDetailUrl` | string | URL to Mouser product page | |
| 141 | | `ImagePath` | string | Product |