{
  "openapi": "3.0.1",
  "info": {
    "title": "DigiKey Parts Scraper",
    "description": "[ 💰 $1.50 / 1K] Search DigiKey by keyword, part number, BOM, or product URL. Get structured records with stock, lead times, quantity pricing, specs, compliance, lifecycle, origin, datasheets, images, and product links. From $1.50 per 1,000 records, plus a $0.10 start event.",
    "version": "0.1",
    "x-build-id": "ybh1PpuMTEISfe9Nd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchfinch~digikey-parts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchfinch-digikey-parts-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/fetchfinch~digikey-parts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fetchfinch-digikey-parts-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/fetchfinch~digikey-parts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fetchfinch-digikey-parts-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode",
          "maxItems"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "category",
              "search",
              "bom",
              "urls"
            ],
            "type": "string",
            "description": "How to find DigiKey products.",
            "default": "search"
          },
          "categoryUrl": {
            "title": "Category URL",
            "pattern": "^https://(www\\.)?digikey\\.com/en/products/(filter|result)/",
            "type": "string",
            "description": "A digikey.com /en/products/filter/... URL. Used in category mode."
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword, manufacturer part number, or DigiKey part number. Used in search mode.",
            "default": "STM32F103C8T6"
          },
          "partNumbers": {
            "title": "BOM part numbers",
            "type": "array",
            "description": "One manufacturer or DigiKey part number per item. Used in BOM mode.",
            "items": {
              "type": "string"
            },
            "default": [
              "RC0402FR-07100KL",
              "STM32F103C8T6"
            ]
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "DigiKey product-detail URLs to scrape directly. Used in Product URLs mode.",
            "items": {
              "type": "string",
              "pattern": "^https://(www\\.)?digikey\\.com/en/products/detail/"
            }
          },
          "manufacturer": {
            "title": "Manufacturer",
            "type": "string",
            "description": "Optional case-insensitive manufacturer filter applied to extracted records."
          },
          "inStockOnly": {
            "title": "In-stock products only",
            "type": "boolean",
            "description": "Discard products whose current available quantity is zero or unavailable.",
            "default": false
          },
          "extractParametrics": {
            "title": "Extract parametric attributes",
            "type": "boolean",
            "description": "Include the complete Product Attributes table.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum products",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of dataset records.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Concurrent detail requests. Keep this low to reduce blocking.",
            "default": 3
          },
          "requestDelaySecs": {
            "title": "Delay between requests",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Minimum delay per worker, in seconds.",
            "default": 1.5
          },
          "customProxyAttempts": {
            "title": "Custom proxy attempts",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Attempts made through RESIDENTIAL_PROXY_URL before switching to Apify Proxy. Rotating pools may need several exits to find one DigiKey accepts.",
            "default": 8
          },
          "saveDebugHtml": {
            "title": "Save debug HTML",
            "type": "boolean",
            "description": "Save successful product responses to the run's key-value store for parser troubleshooting. Disabled by default.",
            "default": false
          },
          "brightDataAttempts": {
            "title": "Bright Data attempts",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Attempts through Bright Data Web Unlocker before using RESIDENTIAL_PROXY_URL and then Apify Proxy. Only used when BRIGHTDATA_API_KEY and BRIGHTDATA_ZONE are configured as Actor environment variables.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Fallback proxy settings. Bright Data Web Unlocker is configured at the Actor level, so callers normally do not need to change this.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}