{
  "openapi": "3.0.1",
  "info": {
    "title": "LCSC Scraper: BOM Pricing, Stock & Price-Break Alerts with RoHS",
    "description": "Turn your BOM into real LCSC numbers: paste part codes or URLs with quantities, or search by keyword, brand, and category. Get unit price at your quantity, the next price break, live stock by warehouse, RoHS certs, and datasheets. LCSC often beats Digikey/Mouser by 30-50%. From $0.0018/part.",
    "version": "0.2",
    "x-build-id": "bUiZX1bcK9mpC4flX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~lcsc-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-lcsc-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/getascraper~lcsc-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-lcsc-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/getascraper~lcsc-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-lcsc-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",
        "properties": {
          "bomItems": {
            "title": "BOM Items",
            "type": "array",
            "description": "Your bill of materials: one row per part. Key = an LCSC part code (e.g. C8734) or a full lcsc.com product-detail URL. Value = the quantity you actually need for that line. Real order quantity matters here because LCSC's price drops in volume tiers, so this Actor uses your quantity to compute the unit price you'd really pay and how many more units would unlock the next, cheaper price tier, something no other LCSC scraper on the Store currently does. A bare manufacturer part number (e.g. STM32F103C8T6 without the C-code) is not supported as a BOM key yet, use the LCSC code or the product page URL instead, or use Search Keyword below to find a part by description or MPN text first.",
            "default": [
              {
                "key": "C8734",
                "value": "1"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "key",
                "value"
              ],
              "properties": {
                "key": {
                  "type": "string",
                  "title": "Key"
                },
                "value": {
                  "type": "string",
                  "title": "Value"
                }
              }
            }
          },
          "searchKeyword": {
            "title": "Search Keyword",
            "type": "string",
            "description": "Free-text search across part description, model, and family (e.g. \"STM32\" or \"0603 resistor\"), run against LCSC's own live product search. Leave blank to only look up the exact parts listed in BOM Items above. Parts found this way are added to the same output as your BOM, each priced at its own real minimum order quantity unless combined with BOM Items.",
            "default": ""
          },
          "brandNames": {
            "title": "Brand Names",
            "type": "array",
            "description": "Only return search results made by these brands (requires Search Keyword or Category Names to also be set, LCSC's own search API rejects a brand-only filter with neither). Pick from the list or type a brand name exactly as LCSC shows it; an unrecognized name is skipped with a warning rather than guessed.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "ST",
                "TI",
                "NXP",
                "Infineon/CYPRESS",
                "MICROCHIP",
                "VISHAY",
                "PANASONIC",
                "TOSHIBA",
                "onsemi",
                "ADI",
                "MAXIM",
                "NORDIC",
                "ESPRESSIF",
                "SiTime",
                "muRata",
                "YAGEO",
                "TDK",
                "Winbond",
                "MXIC",
                "TE Connectivity",
                "MOLEX",
                "JST",
                "HRS",
                "OMRON",
                "LITEON",
                "SHARP",
                "EPSON",
                "Littelfuse",
                "HONGFA",
                "Nexperia",
                "micron",
                "Worldsemi",
                "DIODES",
                "UNI-ROYAL",
                "Samsung Electro-Mechanics",
                "Taiyo Yuden"
              ]
            },
            "default": []
          },
          "categoryNames": {
            "title": "Category Names",
            "type": "array",
            "description": "Only return search results in these LCSC categories, matched against LCSC's own live category tree at any depth (so a narrower name like \"Microcontrollers\" also works, not just the top-level groups suggested here). Can be used alone, without a Search Keyword, to browse a whole category.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "Integrated Circuits (ICs)",
                "Discrete Semiconductors",
                "Microcontrollers",
                "Capacitors",
                "Connectors, Interconnects",
                "Circuit Protection",
                "Development Boards, Kits, Programmers",
                "Fans, Thermal Management, HVAC",
                "Hardware, Fasteners, Accessories",
                "Cable Assemblies",
                "Cables, Wires",
                "Battery",
                "Audio Products",
                "Adhesives & Sealants",
                "Cleaning & Janitorial",
                "Computer Equipment",
                "Filters",
                "Relays",
                "Resistors",
                "Sensors, Transducers",
                "Optoelectronics",
                "Switches",
                "Transformers",
                "Crystals, Oscillators, Resonators"
              ]
            },
            "default": []
          },
          "rohsOnly": {
            "title": "RoHS Certified Only",
            "type": "boolean",
            "description": "Only keep discovered parts (from Search Keyword / Brand Names / Category Names) with a confirmed RoHS compliance certificate. Applied after the search, no extra request needed. Has no effect on parts looked up directly via BOM Items.",
            "default": false
          },
          "inStockOnly": {
            "title": "In Stock Only",
            "type": "boolean",
            "description": "Only keep discovered parts (from Search Keyword / Brand Names / Category Names) with real domestic or overseas stock above zero right now. Applied after the search, no extra request needed. Has no effect on parts looked up directly via BOM Items.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "LCSC's own search API returns clean, unblocked JSON with just a normal desktop User-Agent header, no login, no WAF challenge, so Apify's cheaper datacenter proxy is used by default. Residential proxy is not needed for this target.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxParts": {
            "title": "Max Parts Per Run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Caps how many parts this run actually processes in total, combining BOM Items lines and any parts discovered via Search Keyword / Brand Names / Category Names, even if either source has more. BOM Items lines are always processed first; discovery fills whatever budget is left. Keep this low for a quick test run; raise it once you know the run time and cost you're comfortable with.",
            "default": 15
          },
          "onlyChangedParts": {
            "title": "Only Changed Parts Since Last Check",
            "type": "boolean",
            "description": "Turns this run into a price and stock monitor: only parts whose unit price or stock level moved since the last run under the same State Name below are pushed, tagged with what kind of change it was (price dropped, price rose, stock depleted, stock replenished, or newly tracked). Run this Actor again later on a schedule with the same State Name to get alerted only when something actually changed.",
            "default": false
          },
          "stateName": {
            "title": "State Name",
            "type": "string",
            "description": "Identifies this tracked BOM's saved monitor state, so you can run several independent trackers (e.g. one per product or client) without them overwriting each other's price and stock history. Only relevant when Only Changed Parts Since Last Check is enabled.",
            "default": "default"
          },
          "resetState": {
            "title": "Reset Monitor State",
            "type": "boolean",
            "description": "Clears the saved price and stock history for State Name before this run starts, so every part currently in your BOM is treated as newly tracked again. Use this once if you want to restart tracking from scratch.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}