aklofas/kicad-happy/digikey
- community
Checking that the SKILL.md file is still in the repository.
Search DigiKey for electronic components and download datasheets — primary source for prototype orders and the preferred API method for fetching datasheets. Find parts by keyword or MPN, check pricing/stock, download datasheets via API, analyze specifications. Sync and maintain a local datasheets directory — extract components from schematics, download missing datasheets, keep them up to date. Also supports batch MPN-list seeding (`--mpn-list`) for bulk workflows without a KiCad project. Use when the user asks about electronic components, part specs, datasheets, pricing, stock, footprints, or needs to download a datasheet — even without mentioning "DigiKey". Also for "sync datasheets", "download datasheets for my board/project", or mentions a datasheets directory. DigiKey is the default distributor for prototyping. For BOM workflows, see the bom skill.
Install
npx vskill@latest install aklofas/kicad-happy/digikeySKILL.md
DigiKey Parts Search & Analysis
Related Skills
| Skill | Purpose | |
|---|---|---|
kicad | Schematic analysis — extracts MPNs for datasheet sync | |
bom | BOM management — orchestrates sourcing across distributors | |
spice | Uses DigiKey parametric data for behavioral SPICE models |
DigiKey is the primary source for prototype orders (Mouser is secondary). Its API returns direct PDF datasheet links, making it the preferred datasheet source. For production orders, see lcsc/jlcpcb. For BOM management and export workflows, see bom.
API Credential Setup
The DigiKey API requires OAuth 2.0 credentials. Here's how to set them up:
- Create a DigiKey account at digikey.com if you don't have one
- Register an API app at developer.digikey.com:
- Sign in with your DigiKey account
- Go to "My Apps" → "Create App"
- App name: anything (e.g., "kicad-happy")
- Select "Product Information v4" API
- OAuth type: Client Credentials (2-legged, no user login needed)
- Callback URL:
https://localhost(not used for client credentials, but required) - After creation, note the Client ID and Client Secret
- Set the environment variables before running the scripts:
``bash export DIGIKEY_CLIENT_ID=your_client_id_here export DIGIKEY_CLIENT_SECRET=your_client_secret_here ` If credentials are stored in a central secrets file (e.g., ~/.config/secrets.env), load them first: `bash export $(grep -v '^#' ~/.config/secrets.env | grep -v '^$' | xargs) ``
The client credentials flow has no user interaction — once configured, API calls work automatically.
DigiKey Product Information API v4
The API is the preferred way to search DigiKey. It returns structured JSON with full product details, pricing, stock, datasheets, and parametric data.
Base URL: https://api.digikey.com
Authentication
All API requests require OAuth 2.0. Use the client credentials flow (2-legged). Credentials must be loaded as environment variables (see "API Credential Setup" above).
The response returns an access_token valid for 10 minutes. Cache the token in a shell variable and reuse it for subsequent calls in the same session. If you get a 401 error mid-session, the token has expired — re-authenticate to get a fresh one.
Required Headers
Every API call needs:
Optional locale headers:
X-DIGIKEY-Locale-Language:en(default),ja,de,fr,ko,zhs,zht,it,esX-DIGIKEY-Locale-Currency:USD(default),CAD,EUR,GBP,JPY, etc.X-DIGIKEY-Locale-Site:US(default),CA,UK,DE, etc.
KeywordSearch — Find Parts
This is the primary search endpoint. Search by MPN, DigiKey part number, description, or keywords.
Request body:
Key request fields:
Keywords(string, max 250 chars) — search term (MPN, DK PN, description)Limit(int, 1-50) — results per pageOffset(int) — pagination offsetSearchOptions— array of:InStock,HasDatasheet,RoHSCompliant,NormallyStocking,Has3DModel,HasCadModel,HasProductPhoto,NewProductSortOptions.Field—Price,QuantityAvailable,Manufacturer,ManufacturerProductNumber,DigiKeyProductNumber,MinimumQuantityMarketPlaceFilter—NoFilter,ExcludeMarketPlace,MarketPlaceOnly
Response — key fields in each Products[] item:
ProductDetails — Full Details for One Part
Use this for expanded information on a specific part. {productNumber} can be a DigiKey part number or manufacturer part number.
Query parameters:
manufacturerId(optional) — disambiguate MPNs that match multiple manufacturers (e.g., "CR2032")
Returns the full Product object with all parameters, pricing (including MyPricing if authenticated with account), media links, and related products.
Other Useful Endpoints
| Endpoint | Method | Description | |
|---|---|---|---|
/products/v4/search/{pn}/productdetails | GET | Full product info for one part | |
/products/v4/search/productpricing/{pn} | GET | Pricing with MyPricing for a part | |
/products/v4/search/{pn}/media | GET | All media (images, datasheets) for a part | |
/products/v4/search/manufacturers | GET | All manufacturers (use IDs in KeywordSearch filters) | |
/products/v4/search/categories | GET | All categories (use IDs in KeywordSearch filters) | |
/products/v4/search/{pn}/alternatepackaging | GET | Alternate packaging options | |
/products/v4/search/{pn}/substitutions | GET | Substitute parts | |
/products/v4/search/{pn}/recommendedproducts | GET | Recommended/associated parts |
Rate Limits
Per-minute and daily quotas apply. HTTP 429 with Retry-After header on exceed.
Error Responses
All errors return DKProblemDetails:
Fallback: Fetch DigiKey Website
If API credentials are not available or authentication fails, search DigiKey by fetching product pages directly:
Examples:
https://www.digikey.com/en/products/result?keywords=GRM155R71C104KA88D(by MPN)https://www.digikey.com/en/products/result?keywords=100nF+0402+X7R+16V(by specs)
Results from DigiKey can be noisy (JS-heavy pages). Look for the product table rows containing: DigiKey part number, MPN, description, unit price, stock quantity, and datasheet links. If results are truncated or empty, try searching by exact MPN rather than keywords.
Datasheet Download & Analysis
DigiKey's API provides direct PDF URLs for datasheets — this is the preferred method for downloading datasheets because it avoids web scraping and returns reliable, stable links. Other skills (kicad, bom) should use DigiKey API as the first-choice datasheet source.
Datasheet Directory Sync (Primary Workflow)
Use sync_datasheets_digikey.py to maintain a datasheets/ directory alongside a KiCad project. It extracts components from the schematic, searches DigiKey for datasheet URLs, downloads missing PDFs, and writes an manifest.json manifest. Subsequent runs are incremental — only new or changed parts are fetched.
MPN-list batch mode (KH-312) — when you have a list of MPNs but no KiCad project to point at (harness datasheet seeding, bulk seeding a new part library). The file format is one MPN per line. Blank lines and # comments (full-line and inline) are skipped. Non-MPN strings (generic values like 100nF or DNP) are filtered via is_real_mpn() and de-duplicated. Output defaults to ./datasheets/ in the current working directory when --output is omitted.
The script:
- Runs the kicad schematic analyzer automatically to extract components and MPNs
- Filters generic passives — skips entries without real MPNs (e.g., "100nF", "10K")
- Tries schematic URLs first — uses the datasheet URL embedded in the KiCad symbol before hitting the DigiKey API, saving API calls
- Writes `manifest.json` manifest — maps each MPN to its PDF file, manufacturer, description, download status, and URL. The kicad skill reads this during design review to cross-reference datasheets with the schematic.
- Tracks failures — failed downloads are recorded with error details and not retried on subsequent runs unless
--forceis used - Rate-limited — 1 second between DigiKey API calls (configurable with
--delay) - Saves progress incrementally — if interrupted, already-downloaded files are preserved
The manifest.json manifest structure:
Single Datasheet Download
Use fetch_datasheet_digikey.py for one-off datasheet downloads. It handles manufacturer-specific quirks automatically.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/digikey/SKILL.md
Popularity
- Repository stars
- 1,293
- Repository forks
- 114
- 7-day trend score
- 36
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aklofas/kicad-happy/digikey)