# LCSC Electronic Components Scraper (`talcoe/lcsc-electronics`) Actor

Search LCSC parts by keyword, category or manufacturer and get stock, USD price breaks, specs, datasheet links and package info, billed per result.

- **URL**: https://apify.com/talcoe/lcsc-electronics.md
- **Developed by:** [M Usama](https://apify.com/talcoe) (community)
- **Categories:** E-commerce, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does LCSC Electronic Components Scraper do?

It searches the LCSC electronics catalog (lcsc.com) and returns one clean record per part: LCSC part number, manufacturer part number, manufacturer, description, live stock, USD price breaks, package, specs, datasheet link and product URL. Filter by keyword, category ID, manufacturer and stock status so each run stays small. Pricing is per result.

### Data source

Reads the public JSON endpoint that powers the lcsc.com category and search pages, no login needed. Stock and prices are live at the time of the run.

### Why use it?

- Price and stock monitoring for a bill of materials, with every quantity price break.
- Finding second sources and alternates by MPN, category or manufacturer.
- Building a parts database with specs and datasheet links for a procurement or design tool.
- Replaces copying rows by hand from the website.

### How to use it

1. Open the Actor and set the filters.
2. Click Start. Download results as JSON, CSV or Excel, or read them through the API.
3. Add a Schedule and an Integration (Slack, Google Sheets, webhook) to get new records automatically.

### Input

| Field | Description |
|---|---|
| `keywords` | Part numbers, MPNs or free text, one search per entry (ESP32, STM32F103, 10k 0603). |
| `categoryIds` | LCSC category IDs from `lcsc.com/category/<id>.html` (1199 is Chip Resistor - Surface Mount). Combined with each keyword. |
| `manufacturers` | Keep only parts whose manufacturer name contains one of these, case insensitive. |
| `inStockOnly` | Return only parts currently in stock. Default true. |
| `maxResults` | Hard stop for the run. You are billed per result, so this caps the cost. |
| `proxyConfiguration` | Apify proxy is recommended for larger runs. |

Example input:

```json
{ "keywords": ["ESP32"], "inStockOnly": true, "maxResults": 60 }
```

### Output

Every record has the same shape (trimmed):

```json
{
  "id": "C3013946",
  "partNumber": "C3013946",
  "mpn": "ESP32-S3-WROOM-1U-N16R8",
  "manufacturer": "ESPRESSIF",
  "description": "2.4GHz ESP32-S3R8 -103.5dBm SMD,19.2x18mm RF Transceiver Modules and Modems RoHS",
  "category": "IoT/Communication Modules",
  "subcategory": "WiFi Modules",
  "stock": 4805,
  "inStock": true,
  "unitPriceUsd": 5.0217,
  "priceBreaks": [{ "minQty": 1, "unitPriceUsd": 5.0217 }, { "minQty": 10, "unitPriceUsd": 4.3934 }],
  "minOrderQty": 1,
  "packaging": "Tape & Reel (TR)",
  "package": "SMD,19.2x18mm",
  "datasheetUrl": "https://datasheet.lcsc.com/datasheet/pdf/24a44651a4767a6582addcdaa9cab2ca.pdf?productCode=C3013946",
  "specs": { "Frequency Range": "2.4GHz", "Voltage - Supply": "3V~3.6V" },
  "url": "https://www.lcsc.com/product-detail/C3013946.html"
}
```

| Field | Meaning |
|---|---|
| `id` / `partNumber` | LCSC part number, stable key for deduplication between runs |
| `mpn` | Manufacturer part number |
| `stock` | Units LCSC reports in stock |
| `unitPriceUsd` | Price at the lowest quantity break |
| `priceBreaks` | All quantity breaks with USD unit price |
| `specs` | Parametric attributes LCSC lists for the part |
| `scrapedAt` | ISO timestamp of the run |

### Pricing

Pay per event: a small fee when a run starts, then a fixed price per result returned. You only pay for records that pass your filters. Set `maxResults` to cap any run.

### Limitations

- LCSC returns at most 5000 parts per search. Split larger pulls by category or keyword.
- The manufacturer filter is applied after fetching, so narrow filters scan more pages.
- Prices are in USD and reflect the LCSC global store, not other regions.

### FAQ

**Is this legal?** The Actor reads listings the site publishes for any visitor without a login and stores only business information published for that purpose. You are responsible for how you use the data.

**Something is missing or broken?** Open an issue in the Issues tab; response time is usually under a day.

# Actor input Schema

## `keywords` (type: `array`):

Part numbers, MPNs or free text, one search per entry (for example ESP32, STM32F103, 10k 0603). Leave empty if you only use category IDs.

## `categoryIds` (type: `array`):

LCSC category IDs from lcsc.com/category/<id>.html (for example 1199 for Chip Resistor - Surface Mount). Combined with each keyword.

## `manufacturers` (type: `array`):

Keep only parts whose manufacturer name contains one of these (case insensitive), for example ESPRESSIF, TI, YAGEO.

## `inStockOnly` (type: `boolean`):

Return only parts that LCSC currently has in stock.

## `maxResults` (type: `integer`):

Hard stop for the run. You are billed per result, so this caps the cost. LCSC returns at most 5000 parts per search.

## `proxyConfiguration` (type: `object`):

Apify proxy is recommended for larger runs.

## Actor input object example

```json
{
  "keywords": [
    "ESP32"
  ],
  "categoryIds": [],
  "manufacturers": [],
  "inStockOnly": true,
  "maxResults": 60,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        "ESP32"
    ],
    "categoryIds": [],
    "manufacturers": [],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("talcoe/lcsc-electronics").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "keywords": ["ESP32"],
    "categoryIds": [],
    "manufacturers": [],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("talcoe/lcsc-electronics").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "ESP32"
  ],
  "categoryIds": [],
  "manufacturers": [],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call talcoe/lcsc-electronics --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,talcoe/lcsc-electronics"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/U9QFXP2qg5oabHfme/builds/aK6a82OTShgggMJf9/openapi.json
