# DigiKey Search ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/digikey/search` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 2 credits per call | | **Documentation** | https://www.piloterr.com/library/digikey-search | ## Description Search DigiKey country sites by keyword or result/filter URL. Returns category branches or product listings with pagination via browser rendering. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/digikey/search' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### Keyword phoenix contact (FR categories) ```json { "results": [ { "id": "370", "url": "https://www.digikey.fr/fr/products/filter/embases-fiches-et-prises/370", "type": "category", "title": "Embases, fiches et prises", "image_url": "https://mm.digikey.com/Volume0/opasdata/d220001/derivates/3/010/141/386/1751086_tmb.jpg", "product_count": 13796, "parent_category": "Blocs de jonction" } ], "pagination": { "page": 1, "per_page": 30, "total_pages": 1, "has_next_page": false, "total_results": 65793 } } ``` ### Filter listing marteaux (products) ```json { "results": [ { "url": "https://www.digikey.fr/fr/products/detail/excel-blades/55672/24758809", "type": "product", "price": 44.32, "stock": "1000", "title": "9\" Swiss Style Mini Hammer", "currency": "EUR", "product_id": "24758809", "stock_label": "Marketplace", "manufacturer": "Excel Blades", "digikey_part_number": "5795-55672-ND", "manufacturer_part_number": "55672" } ], "pagination": { "next": 2, "page": 1, "per_page": 25, "total_pages": 20, "has_next_page": true, "total_results": 491 } } ``` ## Documentation ## Overview The **DigiKey Search** endpoint searches DigiKey across country sites (France, US, UK, Germany, and 40+ others). Pass a keyword or a DigiKey result/filter URL. You get either **category branches** (keyword search) or **product listings** (category filter pages), plus pagination. Browser rendering is used. Costs **2 credits** per call. ## Quickstart ``` GET https://api.piloterr.com/v2/digikey/search?query=phoenix+contact®ion=fr GET https://api.piloterr.com/v2/digikey/search?query=https://www.digikey.fr/fr/products/filter/marteaux/246 GET https://api.piloterr.com/v2/digikey/search?query=phoenix+contact®ion=com.au ``` ## Parameters | Parameter | Type | Required | Description | |---|---|---|---| | `query` | string | yes | Keyword, DigiKey result/filter URL, or relative path | | `region` | string | no | Country TLD such as `fr`, `com`, `de`, `co.uk`, `com.au`. Detected from a full URL | | `return_page_source` | boolean | no | Return rendered HTML instead of JSON | ## Regions Use the DigiKey site suffix: `fr`, `com`, `de`, `it`, `es`, `co.uk`, `com.au`, `com.br`, `ca`, `jp`, `cn`, and other DigiKey country TLDs. Aliases: `uk`/`gb` → `co.uk`, `au` → `com.au`, `br` → `com.br`, `mx` → `com.mx`. ## Response fields | Field | Type | Description | |---|---|---| | `results` | array | Categories or products | | `results[].type` | string | `category` (keyword search) or `product` (filter listing) | | `results[].title` / `url` / `image_url` | string | Common fields | | `results[].id` / `parent_category` / `product_count` | mixed | Category fields | | `results[].product_id` / `digikey_part_number` / `manufacturer_part_number` / `manufacturer` | string | Product identifiers | | `results[].price` / `currency` / `stock` | mixed | Price and availability when present | | `pagination` | object | `page`, `per_page`, `total_results`, `total_pages`, `has_next_page`, `next` | Tip: keyword search often returns categories first. Call search again on a category `url` to list products. ## Error codes | Code | Meaning | |---|---| | `400` | Empty or invalid `query` | | `404` | Page has no usable data | | `500` | Rendering failed | ## Related endpoints - [DigiKey Product](https://www.piloterr.com/library/digikey-product)