Logo van Digikey

Digikey

CommunityPopulair
aklofas
digikey

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.

Add to TypingMind

Overzicht

Uitgeveraklofas
Repositorykicad-happy
Skillnaamdigikey
Sterren
1.2K
Forks
109
Meegeleverde bestanden
2
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 2

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door aklofas op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Digikey in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/aklofas/kicad-happy/tree/main/skills/digikey
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aklofas/kicad-happy.git /tmp/kicad-happy
mkdir -p .claude/skills
cp -r /tmp/kicad-happy/skills/digikey .claude/skills/digikey
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Digikey in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Digikey automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Digikey niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

DigiKey Parts Search & Analysis

Related Skills

SkillPurpose
kicadSchematic analysis — extracts MPNs for datasheet sync
bomBOM management — orchestrates sourcing across distributors
spiceUses 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:

  1. Create a DigiKey account at digikey.com if you don't have one
  2. 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
  3. 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).

bash
curl -s -X POST https://api.digikey.com/v1/oauth2/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "client_id=${DIGIKEY_CLIENT_ID}&client_secret=${DIGIKEY_CLIENT_SECRET}&grant_type=client_credentials"

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:

X-DIGIKEY-Client-Id: ${DIGIKEY_CLIENT_ID}
Authorization: Bearer <access_token>

Optional locale headers:

  • X-DIGIKEY-Locale-Language: en (default), ja, de, fr, ko, zhs, zht, it, es
  • X-DIGIKEY-Locale-Currency: USD (default), CAD, EUR, GBP, JPY, etc.
  • X-DIGIKEY-Locale-Site: US (default), CA, UK, DE, etc.

KeywordSearch — Find Parts

POST /products/v4/search/keyword

This is the primary search endpoint. Search by MPN, DigiKey part number, description, or keywords.

Request body:

json
{
  "Keywords": "GRM155R71C104KA88D",
  "Limit": 25,
  "Offset": 0,
  "FilterOptionsRequest": {
    "MinimumQuantityAvailable": 1,
    "SearchOptions": ["InStock", "HasDatasheet", "RoHSCompliant"],
    "ManufacturerFilter": [{"Id": "..."}],
    "CategoryFilter": [{"Id": "..."}],
    "StatusFilter": [{"Id": "..."}],
    "MarketPlaceFilter": "ExcludeMarketPlace"
  },
  "SortOptions": {
    "Field": "Price",
    "SortOrder": "Ascending"
  }
}

Key request fields:

  • Keywords (string, max 250 chars) — search term (MPN, DK PN, description)
  • Limit (int, 1-50) — results per page
  • Offset (int) — pagination offset
  • SearchOptions — array of: InStock, HasDatasheet, RoHSCompliant, NormallyStocking, Has3DModel, HasCadModel, HasProductPhoto, NewProduct
  • SortOptions.Field — Price, QuantityAvailable, Manufacturer, ManufacturerProductNumber, DigiKeyProductNumber, MinimumQuantity
  • MarketPlaceFilter — NoFilter, ExcludeMarketPlace, MarketPlaceOnly

Response — key fields in each Products[] item:

json
{
  "ManufacturerProductNumber": "GRM155R71C104KA88D",
  "Manufacturer": {"Id": 563, "Name": "Murata Electronics"},
  "Description": {
    "ProductDescription": "CAP CER 100NF 16V X7R 0402",
    "DetailedDescription": "..."
  },
  "UnitPrice": 0.01,
  "QuantityAvailable": 248000,
  "ProductUrl": "https://www.digikey.com/...",
  "DatasheetUrl": "https://...",
  "PhotoUrl": "https://...",
  "ProductVariations": [
    {
      "DigiKeyProductNumber": "490-10698-1-ND",
      "PackageType": {"Name": "Cut Tape"},
      "StandardPricing": [
        {"BreakQuantity": 1, "UnitPrice": 0.01, "TotalPrice": 0.01},
        {"BreakQuantity": 10, "UnitPrice": 0.008, "TotalPrice": 0.08}
      ],
      "QuantityAvailableforPackageType": 248000,
      "MinimumOrderQuantity": 1,
      "StandardPackage": 10000
    }
  ],
  "Parameters": [
    {"ParameterText": "Capacitance", "ValueText": "100nF"},
    {"ParameterText": "Voltage Rated", "ValueText": "16V"},
    {"ParameterText": "Temperature Coefficient", "ValueText": "X7R"},
    {"ParameterText": "Package / Case", "ValueText": "0402 (1005 Metric)"}
  ],
  "ProductStatus": {"Status": "Active"},
  "Category": {"Name": "Ceramic Capacitors"},
  "Classifications": {"RohsStatus": "ROHS3 Compliant"},
  "Discontinued": false,
  "EndOfLife": false,
  "NormallyStocking": true
}

ProductDetails — Full Details for One Part

GET /products/v4/search/{productNumber}/productdetails

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

EndpointMethodDescription
/products/v4/search/{pn}/productdetailsGETFull product info for one part
/products/v4/search/productpricing/{pn}GETPricing with MyPricing for a part
/products/v4/search/{pn}/mediaGETAll media (images, datasheets) for a part
/products/v4/search/manufacturersGETAll manufacturers (use IDs in KeywordSearch filters)
/products/v4/search/categoriesGETAll categories (use IDs in KeywordSearch filters)
/products/v4/search/{pn}/alternatepackagingGETAlternate packaging options
/products/v4/search/{pn}/substitutionsGETSubstitute parts
/products/v4/search/{pn}/recommendedproductsGETRecommended/associated parts

Rate Limits

Per-minute and daily quotas apply. HTTP 429 with Retry-After header on exceed.

Error Responses

All errors return DKProblemDetails:

json
{"type": "...", "title": "...", "status": 401, "detail": "Invalid token", "correlationId": "..."}

Fallback: Fetch DigiKey Website

If API credentials are not available or authentication fails, search DigiKey by fetching product pages directly:

https://www.digikey.com/en/products/result?keywords=<url-encoded-query>

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.

bash
# Sync datasheets for a KiCad project (creates datasheets/ next to the schematic)
python3 <skill-path>/scripts/sync_datasheets_digikey.py <file.kicad_sch>

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

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

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

# Use pre-computed analyzer JSON instead of running the analyzer
python3 <skill-path>/scripts/sync_datasheets_digikey.py analyzer_output.json

# Parallel downloads (3 workers)
python3 <skill-path>/scripts/sync_datasheets_digikey.py <file.kicad_sch> --parallel 3

# Batch mode — sync from a plain MPN list (no KiCad project required)
python3 <skill-path>/scripts/sync_datasheets_digikey.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 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 --force is 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:

json
{
  "schematic": "/path/to/file.kicad_sch",
  "last_sync": "2026-03-09T04:44:30+00:00",
  "parts": {
    "TPS61023DRLR": {
      "file": "TPS61023DRLR.pdf",
      "manufacturer": "Texas Instruments",
      "description": "Boost converter",
      "datasheet_url": "https://...",
      "status": "ok",
      "references": ["U3", "U2"],
      "size_bytes": 2392725
    }
  }
}

Single Datasheet Download

Use fetch_datasheet_digikey.py for one-off datasheet downloads. It handles manufacturer-specific quirks automatically.

bash
# Search by MPN (uses DigiKey API, requires credentials)
python3 <skill-path>/scripts/fetch_datasheet_digikey.py --search "TPS61023" -o datasheet.pdf

# Direct URL download
python3 <skill-path>/scripts/fetch_datasheet_digikey.py "https://www.ti.com/lit/gpn/tps61023" -o datasheet.pdf

# JSON output for script integration
python3 <skill-path>/scripts/fetch_datasheet_digikey.py --search "ADP1706" --json

The script:

  • OS-agnostic — uses Python requests library (no wget/curl dependency). Falls back to urllib if requests isn't installed.
  • Normalizes redirect URLs — DigiKey's DatasheetUrl for TI parts points to a JS redirect page; the script extracts the direct PDF link. Also fixes protocol-relative //mm.digikey.com/... URLs.
  • Sets proper User-Agent — many manufacturer sites (Nexperia, Lite-On, STMicro, Molex) block bare urllib or curl requests but serve PDFs fine with a browser User-Agent
  • Validates PDF headers — rejects HTML error pages or Cloudflare challenge pages that masquerade as downloads
  • Falls back to alternative sources — tries known URL patterns for Microchip when the primary URL fails
  • Headless browser fallback — if playwright is installed, automatically uses a headless Chromium browser as a last resort for sites that serve PDFs via JavaScript (Broadcom doc viewer, Espressif download redirects). Intercepts download events and reads response bodies directly.
  • Exit codes: 0 = success, 1 = download failed, 2 = search/API error
  • Dependencies:
    • pip install requests (strongly recommended; urllib fallback can't handle HTTP/2 sites like analog.com)
    • pip install playwright && playwright install chromium (optional; enables headless browser fallback for JS-heavy sites)

Manufacturer Compatibility

Tested against 240 components across 8 open-source KiCad projects (96% download success rate, 94% without Playwright):

ManufacturerStatusNotes
TIWorksURL normalization strips JS redirect wrapper
ADI / AnalogWorksrequests handles HTTP/2 transparently
STMicroWorksRequires User-Agent header
NexperiaWorksRequires User-Agent header
Lite-OnWorksRequires User-Agent header
MolexWorksRequires User-Agent header
RenesasWorksDirect download
ON SemiWorksDirect download
NXPWorksDirect download
Diodes IncWorksDirect download
MicrochipWorksDirect download via API URLs
YAGEO, Samsung, MurataWorksDigiKey-hosted PDFs (mm.digikey.com)
BroadcomWorks*Requires Playwright — docs.broadcom.com serves PDFs via JS download
EspressifWorks*Requires Playwright — download redirect needs JS execution
LatticeMixedSome URLs require cookies/auth

* Requires playwright package — falls back gracefully to user notification if not installed.

When Download Fails

If the script or inline download fails (exit code 1), tell the user and provide the URL so they can open it in a real browser. Some manufacturer sites (Lattice, TDK InvenSense) require interactive login, cookies, or CAPTCHA that even a headless browser can't handle. With Playwright installed, Broadcom and Espressif now download automatically.

Example message to the user:

I couldn't download the datasheet for ICE40UP5K-SG48I automatically — Lattice's site requires browser authentication. Here's the direct link: https://www.latticesemi.com/-/media/LatticeSemi/Documents/DataSheets/iCE/FPGA-DS-02008-1-9-iCE40-Ultra-Plus-Family-Data-Sheet.ashx

You can open it in your browser and save it locally, then I can read and analyze it.

The --json output always includes the datasheet_url field even on failure, so you can extract the URL programmatically.

Manual Download Workflow

If the script isn't available or you need to do it inline:

  1. Search for the part using KeywordSearch or ProductDetails
  2. Extract DatasheetUrl from the API response
  3. Normalize the URL — if it starts with //, prepend https:. If it contains ti.com/general/docs/suppproductinfo, extract the gotoUrl query parameter.
  4. Download with requests (Python) or wget/curl with a browser User-Agent
  5. Verify it's a PDF: first 4 bytes should be %PDF

If the DatasheetUrl field is empty or all download methods fail:

  • Provide the URL to the user for manual browser download
  • Try the /products/v4/search/{pn}/media endpoint for alternative media links
  • Web search as a last resort: "<MPN> datasheet filetype:pdf"

What to Extract from Datasheets

When analyzing a datasheet for a KiCad design review (see kicad skill):

  • Absolute maximum ratings — voltage, current, temperature limits
  • Recommended operating conditions — typical operating ranges
  • Pinout and pin descriptions — verify against KiCad symbol
  • Package dimensions — verify against KiCad footprint
  • Typical application circuit — compare against the user's schematic
  • Thermal characteristics — θJA, θJC for power dissipation calculations
  • Electrical characteristics — key parameters (Vout, Iq, PSRR, etc.)

Tips

  • DigiKey PN suffixes: -ND standard, -1-ND cut tape, -2-ND digi-reel, -6-ND full reel
  • Use ExcludeMarketPlace filter to avoid third-party seller listings
  • Price breaks in ProductVariations[].StandardPricing[] — check BreakQuantity thresholds
  • Check ProductStatus and Discontinued/EndOfLife before selecting parts

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Digikey?

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

Waarom Digikey gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Digikey bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Digikey in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/aklofas/kicad-happy/tree/main/skills/digikey. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Digikey gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Digikey gebruiken?

Zoveel als je wilt. Je kunt Digikey gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Digikey gratis?

Ja. Deze skill is door aklofas op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇