mouser
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMouser Electronics Parts Search & Analysis
Mouser Electronics元件搜索与分析
Related Skills
相关技能
| Skill | Purpose |
|---|---|
| Schematic analysis — extracts MPNs for part lookup |
| BOM management — orchestrates sourcing across distributors |
| Primary prototype source (prefer for datasheets — direct PDF links) |
| Uses Mouser parametric data for behavioral SPICE models |
Mouser is the secondary source for prototype orders — use when DigiKey is out of stock or has worse pricing. For production orders, see /. For BOM management and export workflows, see . For datasheets, prefer DigiKey's API (direct PDF links) — Mouser blocks automated PDF downloads.
lcscjlcpcbbom| 技能 | 用途 |
|---|---|
| 原理图分析——提取MPN用于元件查询 |
| BOM管理——协调多分销商采购 |
| 原型采购主要渠道(优先用于获取数据手册——提供直接PDF链接) |
| 利用Mouser参数数据生成行为SPICE模型 |
Mouser是原型订单的次要采购渠道——当DigiKey缺货或价格更高时使用。如需生产订单相关内容,请查看/。如需BOM管理与导出工作流相关内容,请查看。获取数据手册时优先选择DigiKey的API(提供直接PDF链接)——Mouser会阻止自动化PDF下载。
lcscjlcpcbbomAPI Credential Setup
API凭证设置
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.
Mouser采用简单API密钥认证——无需OAuth、无需令牌、无需回调URL。搜索API密钥是一个UUID,作为查询参数传递。
Getting Your API Key
获取API密钥
- Go to mouser.com → My Mouser → My Account
- Under "APIs" section, click "Manage"
- Register for Search API key — this is the one needed for part lookups and datasheet downloads
- Search API keys may require approval (status shows "pending authorization" initially)
- 访问mouser.com → My Mouser → 我的账户
- 在“APIs”板块下,点击“管理”
- 注册Search API密钥——这是元件查询和数据手册下载所需的密钥
- Search API密钥可能需要审核(初始状态显示“pending authorization”)
Setting Credentials
设置凭证
Set the environment variable before running the scripts:
bash
export MOUSER_SEARCH_API_KEY=your-search-api-key-uuidIf credentials are stored in a central secrets file (e.g., ), load them first:
~/.config/secrets.envbash
export $(grep -v '^#' ~/.config/secrets.env | grep -v '^$' | xargs)运行脚本前设置环境变量:
bash
export MOUSER_SEARCH_API_KEY=your-search-api-key-uuid如果凭证存储在中央密钥文件中(如),请先加载:
~/.config/secrets.envbash
export $(grep -v '^#' ~/.config/secrets.env | grep -v '^$' | xargs)Mouser Search API Reference
Mouser搜索API参考
All search endpoints use the Search API key as a query parameter: . Content-Type is for all POST requests.
?apiKey=<key>application/json所有搜索端点均使用搜索API密钥作为查询参数:。所有POST请求的Content-Type为。
?apiKey=<key>application/jsonV1 Endpoints
V1端点
Keyword Search
关键词搜索
POST /api/v1/search/keyword?apiKey=<key>json
{
"SearchByKeywordRequest": {
"keyword": "100nF 0402 ceramic capacitor",
"records": 50,
"startingRecord": 0,
"searchOptions": "InStock"
}
}- :
searchOptions|"None"|"Rohs"|"InStock""RohsAndInStock" - : max 50 per request
records - : offset for pagination
startingRecord
POST /api/v1/search/keyword?apiKey=<key>json
{
"SearchByKeywordRequest": {
"keyword": "100nF 0402 ceramic capacitor",
"records": 50,
"startingRecord": 0,
"searchOptions": "InStock"
}
}- :
searchOptions|"None"|"Rohs"|"InStock""RohsAndInStock" - : 每次请求最多50条
records - : 分页偏移量
startingRecord
Part Number Search
零件编号搜索
POST /api/v1/search/partnumber?apiKey=<key>json
{
"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"
POST /api/v1/search/partnumber?apiKey=<key>json
{
"SearchByPartRequest": {
"mouserPartNumber": "GRM155R71C104KA88D|RC0402FR-0710KL",
"partSearchOptions": "Exact"
}
}- 最多支持10个零件编号,用竖线分隔()
| - 同时支持Mouser零件编号和制造商零件编号(MPN)
- :
partSearchOptions|"Exact"|"BeginsWith""Contains"
V2 Endpoints
V2端点
V2 adds manufacturer filtering and pagination by page number.
V2新增了制造商筛选和按页码分页功能。
Keyword + Manufacturer Search
关键词+制造商搜索
POST /api/v2/search/keywordandmanufacturer?apiKey=<key>json
{
"SearchByKeywordMfrNameRequest": {
"keyword": "LMR51450",
"manufacturerName": "Texas Instruments",
"records": 25,
"pageNumber": 1,
"searchOptions": "InStock"
}
}Note: the wrapper object name is (not — the V1 name is deprecated).
SearchByKeywordMfrNameRequestSearchByKeywordMfrRequestPOST /api/v2/search/keywordandmanufacturer?apiKey=<key>json
{
"SearchByKeywordMfrNameRequest": {
"keyword": "LMR51450",
"manufacturerName": "Texas Instruments",
"records": 25,
"pageNumber": 1,
"searchOptions": "InStock"
}
}注意:包装对象名称为(而非——V1名称已废弃)。
SearchByKeywordMfrNameRequestSearchByKeywordMfrRequestPart Number + Manufacturer Search
零件编号+制造商搜索
POST /api/v2/search/partnumberandmanufacturer?apiKey=<key>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.
GET /api/v2/search/manufacturerlist?apiKey=<key>返回完整的制造商名称列表,用于筛选搜索。
V1 Deprecated Endpoints
V1废弃端点
These still work but V2 equivalents are preferred:
- → use V2
POST /api/v1/search/keywordandmanufacturer - → use V2
POST /api/v1/search/partnumberandmanufacturer - → use V2
GET /api/v1/search/manufacturerlist
这些端点仍可使用,但优先选择V2等效端点:
- → 使用V2版本
POST /api/v1/search/keywordandmanufacturer - → 使用V2版本
POST /api/v1/search/partnumberandmanufacturer - → 使用V2版本
GET /api/v1/search/manufacturerlist
Search Response Structure
搜索响应结构
All search endpoints return the same response format:
json
{
"Errors": [],
"SearchResults": {
"NumberOfResult": 142,
"Parts": [...]
}
}所有搜索端点返回相同的响应格式:
json
{
"Errors": [],
"SearchResults": {
"NumberOfResult": 142,
"Parts": [...]
}
}Key Part Fields
关键元件字段
| Field | Type | Description |
|---|---|---|
| string | Mouser's internal part number (prefixed, e.g., |
| string | Manufacturer's part number (MPN) — use for cross-distributor matching |
| string | Manufacturer name |
| string | Product description |
| string | Product category |
| string | URL to datasheet PDF (Mouser-hosted — see Datasheet section) |
| string | URL to Mouser product page |
| string | Product image URL |
| string | Human-readable stock text (e.g., "2648712 In Stock") |
| string | Numeric stock quantity (as string) |
| array | Incoming stock: |
| string | Factory lead time (e.g., "84 Days") |
| string|null | "New Product", "End of Life", etc. |
| string | "true" or "false" (string, not boolean) |
| string | Replacement MPN if discontinued |
| string | Minimum order quantity (as string) |
| string | Order multiple (as string) |
| bool | Tape-and-reel packaging available |
| string | RoHS compliance status |
| array | Tiered pricing: |
| array | Parametric specs: |
| array|null | Alternate packaging MPNs: |
| array | Tariff/surcharge info: |
| array | HTS codes, ECCN: |
| object | |
| 字段 | 类型 | 描述 |
|---|---|---|
| 字符串 | Mouser内部零件编号(带前缀,例如 |
| 字符串 | 制造商零件编号(MPN)——用于跨分销商匹配 |
| 字符串 | 制造商名称 |
| 字符串 | 产品描述 |
| 字符串 | 产品类别 |
| 字符串 | 数据手册PDF的URL(Mouser托管——查看数据手册章节) |
| 字符串 | Mouser产品页面的URL |
| 字符串 | 产品图片URL |
| 字符串 | 人类可读的库存文本(例如"2648712 In Stock") |
| 字符串 | 库存数量(字符串格式) |
| 数组 | 待入库库存: |
| 字符串 | 工厂交货期(例如"84 Days") |
| 字符串|null | "New Product"、"End of Life"等 |
| 字符串 | "true"或"false"(字符串类型,非布尔值) |
| 字符串 | 停产元件的替代MPN |
| 字符串 | 最小订购量(字符串格式) |
| 字符串 | 订购倍数(字符串格式) |
| 布尔值 | 是否提供卷带包装 |
| 字符串 | RoHS合规状态 |
| 数组 | 阶梯定价: |
| 数组 | 参数规格: |
| 数组|null | 替代包装MPN: |
| 数组 | 关税/附加费信息: |
| 数组 | HTS编码、ECCN: |
| 对象 | |
Quirks and Gotchas
注意事项与陷阱
- Price is a string with currency symbol: , not a float. Parse it before comparing.
"$0.10" - Stock is a string: returns
AvailabilityInStocknot"2648712".2648712 - IsDiscontinued is a string: or
"true", not boolean."false" - Mouser part numbers have prefixes: — the prefix is Mouser-specific. Use
81-GRM155R71C104KA88for cross-referencing.ManufacturerPartNumber - V2 wrapper names differ from V1: V2 uses , not
SearchByKeywordMfrNameRequest.SearchByKeywordMfrRequest - Tariff info: may contain US tariff percentages — useful for cost estimation.
SurchargeMessages - On-order data: shows incoming stock quantities and expected dates.
AvailabilityOnOrder
- 价格为带货币符号的字符串:例如,而非浮点数。对比前需解析。
"$0.10" - 库存为字符串:返回
AvailabilityInStock而非"2648712"。2648712 - IsDiscontinued为字符串:或
"true",而非布尔值。"false" - Mouser零件编号带前缀:例如——前缀为Mouser专属。跨分销商关联时请使用
81-GRM155R71C104KA88。ManufacturerPartNumber - V2包装名称与V1不同:V2使用,而非
SearchByKeywordMfrNameRequest。SearchByKeywordMfrRequest - 关税信息:可能包含美国关税百分比——对成本估算有用。
SurchargeMessages - 待入库数据:显示待入库库存数量及预计日期。
AvailabilityOnOrder
Datasheet Download & Sync
数据手册下载与同步
Mouser's field points to Mouser-hosted URLs (). 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 with a multi-strategy approach:
DataSheetUrlmouser.com/datasheet/...- Try the Mouser datasheet URL directly (works for some parts)
- Scrape the Mouser product page HTML for alternative datasheet links
- Try manufacturer-specific alternative URL patterns
Note: Mouser's product pages return 403 for most automated requests, so strategy 2 has limited success. DigiKey and LCSC are more reliable datasheet sources.
Mouser的字段指向Mouser托管的URL()。这些URL阻止自动化下载——当用Python/curl/wget获取时,即使设置浏览器User-Agent头,也会返回HTML“访问被拒绝”页面。下载脚本采用多策略方法处理此问题:
DataSheetUrlmouser.com/datasheet/...- 直接尝试Mouser数据手册URL(对部分元件有效)
- 抓取Mouser产品页面HTML以获取替代数据手册链接
- 尝试制造商专属的替代URL模式
注意:Mouser产品页面对大多数自动化请求返回403,因此策略2的成功率有限。DigiKey和LCSC是更可靠的数据手册来源。
Datasheet Directory Sync
数据手册目录同步
Use to maintain a directory alongside a KiCad project. Same workflow and format as the DigiKey skill.
sync_datasheets_mouser.pydatasheets/manifest.jsonbash
undefined使用在KiCad项目旁维护目录。工作流和格式与DigiKey技能相同。
sync_datasheets_mouser.pydatasheets/manifest.jsonbash
undefinedSync datasheets for a KiCad project
同步KiCad项目的数据手册
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch>
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
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
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
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch> -o ./my-datasheets
Parallel downloads (3 workers)
并行下载(3个工作进程)
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch> --parallel 3
python3 <skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch> --parallel 3
Batch mode — sync from a plain MPN list (no KiCad project required)
批量模式——从纯MPN列表同步(无需KiCad项目)
python3 <skill-path>/scripts/sync_datasheets_mouser.py --mpn-list mpns.txt --output ./datasheets
**MPN-list batch mode** (KH-312) — when you have a list of MPNs but no
KiCad project to point at (harness datasheet seeding, bulk part-library
seeding). One MPN per line; blank lines and `#` comments (full-line and
inline) are skipped; generic values (`100nF`, `DNP`) are filtered via
`is_real_mpn()` and de-duplicated. Output defaults to `./datasheets/` in
the current working directory when `--output` is omitted.
**Rate limiting** — the script paces API calls with a 1.0s delay between
requests by default (Mouser's Search API allows 30 calls/min on the free
tier; 1.0s stays comfortably under). Override with `--delay <seconds>` if
you have a higher-tier key or want to slow things down further.python3 <skill-path>/scripts/sync_datasheets_mouser.py --mpn-list mpns.txt --output ./datasheets
**MPN列表批量模式**(KH-312)——当你有MPN列表但没有对应的KiCad项目时(用于数据手册批量导入、元件库批量导入)。每行一个MPN;空行和`#`注释(整行或行内)会被跳过;通用值(如`100nF`、`DNP`)会通过`is_real_mpn()`过滤并去重。若未指定`--output`,默认输出到当前工作目录的`./datasheets/`。
**速率限制**——脚本默认在请求之间设置1.0秒延迟(Mouser搜索API免费层级允许每分钟30次调用;1.0秒延迟远低于限制)。如果你有更高等级的密钥或想进一步减慢速度,可使用`--delay <seconds>`覆盖默认设置。Single Datasheet Download
单个数据手册下载
Use for one-off downloads.
fetch_datasheet_mouser.pybash
undefined使用进行单次下载。
fetch_datasheet_mouser.pybash
undefinedSearch by MPN (uses Mouser API)
通过MPN搜索(使用Mouser API)
python3 <skill-path>/scripts/fetch_datasheet_mouser.py --search "TPS61023DRLR" -o datasheet.pdf
python3 <skill-path>/scripts/fetch_datasheet_mouser.py --search "TPS61023DRLR" -o datasheet.pdf
Direct URL download
直接下载URL
python3 <skill-path>/scripts/fetch_datasheet_mouser.py "https://example.com/datasheet.pdf" -o datasheet.pdf
python3 <skill-path>/scripts/fetch_datasheet_mouser.py "https://example.com/datasheet.pdf" -o datasheet.pdf
JSON output
JSON输出
python3 <skill-path>/scripts/fetch_datasheet_mouser.py --search "ADP1706" --json
undefinedpython3 <skill-path>/scripts/fetch_datasheet_mouser.py --search "ADP1706" --json
undefinedDownload Strategy
下载策略
The scripts try multiple sources in order:
- Schematic URL — uses the datasheet URL embedded in the KiCad symbol (sync only)
- Mouser API search — gets the from the API response
DataSheetUrl - Alternative manufacturer sources — tries known URL patterns for major manufacturers (TI, Microchip, etc.) when the Mouser URL is blocked
- Headless browser fallback — if is installed, uses headless Chromium as a last resort
playwright
When all methods fail, provide the to the user so they can download from the Mouser product page in their browser.
ProductDetailUrl脚本按以下顺序尝试多个来源:
- 原理图URL——使用KiCad符号中嵌入的数据手册URL(仅同步功能)
- Mouser API搜索——从API响应中获取
DataSheetUrl - 替代制造商来源——当Mouser URL被阻止时,尝试主要制造商(TI、Microchip等)的已知URL模式
- 无头浏览器回退——如果安装了,则使用无头Chromium作为最后手段
playwright
当所有方法都失败时,将提供给用户,以便他们在浏览器中从Mouser产品页面下载。
ProductDetailUrlWeb Search Fallback
网页搜索回退
If no API key is available, search Mouser by fetching product pages directly:
- Search URL:
https://www.mouser.com/c/?q=<query> - Product pages contain full specs, pricing tiers, stock, datasheets
- 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
如果没有API密钥,可直接抓取产品页面搜索Mouser:
- 搜索URL:
https://www.mouser.com/c/?q=<query> - 产品页面包含完整规格、阶梯定价、库存、数据手册
- Mouser的搜索结果可能较杂乱(页面依赖JS)
查询中包含关键参数:
- 无源元件:参数值、封装(0402/0603/0805)、容差、电压/功率等级、介质(C0G/X7R)
- 集成电路:零件编号或功能、封装(QFN/SOIC/TSSOP)、关键规格(电压、电流、接口)
- 连接器:类型(USB-C、JST-PH)、引脚数、间距、安装方式(SMD/THT)、方向
Tips
小贴士
- Pipe-separate up to 10 part numbers in a single PartNumber search for batch lookups
- and
Minfields matter — some parts have minimum order qty or must be ordered in multiplesMult - may include US tariff percentages — factor into cost estimates
SurchargeMessages - shows incoming stock with expected dates
AvailabilityOnOrder - Check and
IsDiscontinuedbefore selecting partsLifecycleStatus
- 在单个零件编号搜索中用竖线分隔最多10个零件编号,进行批量查询
- 和
Min字段很重要——部分元件有最小订购量或必须按倍数订购Mult - 可能包含美国关税百分比——纳入成本估算
SurchargeMessages - 显示待入库库存及预计日期
AvailabilityOnOrder - 选择元件前检查和
IsDiscontinuedLifecycleStatus