# LCSC Scraper: BOM Pricing, Stock & Price-Break Alerts with RoHS (`getascraper/lcsc-scraper`) Actor

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.

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

## Pricing

from $1.35 / 1,000 part records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## LCSC Scraper: BOM Pricing, Stock & Price-Break Alerts

<table width="100%">
<tr>
<td style="padding:24px 28px;background:#EFF6FF;border:1px solid #BFDBFE;border-top:4px solid #1D4ED8;border-radius:12px">
<span style="font-size:23px;font-weight:800;color:#1C1917;line-height:1.3">Know what your BOM actually costs on LCSC</span><br>
<span style="font-size:15px;color:#57534E;line-height:1.6">Upload your bill of materials, or search by keyword, brand, and category, and get the price you'd actually pay, live stock split by warehouse, RoHS certification, and the next volume discount tier computed automatically. No login, no account, no API key.</span>
</td>
</tr>
</table>

<table width="100%">
<tr>
<td style="padding:14px 12px;width:20%;background:#FFFFFF;border:1px solid #BFDBFE;border-radius:10px 0 0 10px;vertical-align:top">
<span style="font-size:15px;font-weight:800;color:#1E40AF">💸 Price-break optimizer</span><br>
<span style="font-size:12px;color:#57534E">See the next volume tier and the exact dollar savings for rounding your order up, computed from the full quantity ladder.</span>
</td>
<td style="padding:14px 12px;width:20%;background:#FFFFFF;border:1px solid #BFDBFE;border-left:none;vertical-align:top">
<span style="font-size:15px;font-weight:800;color:#1E40AF">📋 BOM cost summary</span><br>
<span style="font-size:12px;color:#57534E">One row per run with total cost, parts ready to order, and parts needing attention across your whole BOM.</span>
</td>
<td style="padding:14px 12px;width:20%;background:#FFFFFF;border:1px solid #BFDBFE;border-left:none;vertical-align:top">
<span style="font-size:15px;font-weight:800;color:#1E40AF">📦 Live stock by warehouse</span><br>
<span style="font-size:12px;color:#57534E">Domestic and overseas availability, so you know which parts ship immediately.</span>
</td>
<td style="padding:14px 12px;width:20%;background:#FFFFFF;border:1px solid #BFDBFE;border-left:none;vertical-align:top">
<span style="font-size:15px;font-weight:800;color:#1E40AF">🔔 Price & stock monitor</span><br>
<span style="font-size:12px;color:#57534E">Track a BOM over time and get alerted only when a part's price or stock actually changes.</span>
</td>
<td style="padding:14px 12px;width:20%;background:#FFFFFF;border:1px solid #BFDBFE;border-left:none;border-radius:0 10px 10px 0;vertical-align:top">
<span style="font-size:15px;font-weight:800;color:#1E40AF">🔎 Search, brand & category filters</span><br>
<span style="font-size:12px;color:#57534E">No code yet? Search by keyword, brand, or category, and filter to RoHS-certified or in-stock parts only.</span>
</td>
</tr>
</table>

LCSC is a large electronic-components distributor that frequently prices 30 to 50 percent below Digikey and Mouser on the same parts. This Actor turns LCSC's own product data into a BOM-sourcing tool: paste your part codes and quantities, or search by keyword, brand, and category when you don't have exact codes yet, and get back the price you'd really pay, live stock, RoHS certification, the next price break, and a run-level summary, no browser or account required to pull it yourself.

### 🙋 Why use this Actor

- **I am a hardware design engineer** sourcing a new board and want to know exactly what my BOM costs at the quantity I'm actually building, not the price for a single unit.
- **I am a procurement or purchasing lead** comparing LCSC against Digikey and Mouser and need the real numbers, at my real order volume, to make the case for switching a line item.
- **I am a maker or hobbyist** tracking a shortage-prone microcontroller or connector and want to know the moment it's back in stock, not just a generic "something changed" alert.
- **I am building a sourcing or inventory tool** and need structured price-ladder and stock data to feed into my own BOM cost calculator.
- **I am a design engineer hunting for a RoHS-certified alternate** to a part that's gone obsolete or is stuck on backorder, and want to browse a whole brand or category for in-stock replacements instead of checking candidates one at a time.

### 🚀 How to use it

<table width="100%">
<tr>
<td style="padding:16px 14px;width:33%;background:#EFF6FF;border:1px solid #BFDBFE;border-radius:10px 0 0 10px;vertical-align:top">
<span style="font-size:12px;font-weight:800;color:#1D4ED8;letter-spacing:1px">STEP 1</span><br>
<span style="font-size:14px;font-weight:700;color:#1C1917">Add your BOM, or search</span><br>
<span style="font-size:12px;color:#57534E">Paste each part's LCSC code or product link with the quantity you need, and/or set a search keyword, brand, or category to discover parts you don't have codes for yet.</span>
</td>
<td style="padding:16px 14px;width:33%;background:#EFF6FF;border:1px solid #BFDBFE;border-left:none;vertical-align:top">
<span style="font-size:12px;font-weight:800;color:#1D4ED8;letter-spacing:1px">STEP 2</span><br>
<span style="font-size:14px;font-weight:700;color:#1C1917">Run the Actor</span><br>
<span style="font-size:12px;color:#57534E">It fetches each part's real price at your quantity, live stock, specs, and datasheet link.</span>
</td>
<td style="padding:16px 14px;width:33%;background:#EFF6FF;border:1px solid #BFDBFE;border-left:none;border-radius:0 10px 10px 0;vertical-align:top">
<span style="font-size:12px;font-weight:800;color:#1D4ED8;letter-spacing:1px">STEP 3</span><br>
<span style="font-size:14px;font-weight:700;color:#1C1917">Get three ready-to-use views</span><br>
<span style="font-size:12px;color:#57534E">Parts, the full price ladder, and a BOM-level cost and stock summary.</span>
</td>
</tr>
</table>

BOM Items and Search Keyword / Brand Names / Category Names both feed the same run: use one, the other, or both together, and every part lands in the same three output views regardless of how it was found.

Want to track the same BOM over time instead of a one-off pull? Turn on **Only changed parts since last check** and rerun the Actor later with the same **State name**. Only parts whose price or stock actually moved come back, tagged with what kind of change it was.

### 📥 Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bomItems` | array of key-value pairs | No | Your bill of materials. Key is an LCSC part code (for example `C8734`) or a full lcsc.com product page link. Value is the quantity you need for that line. A bare manufacturer part number is not supported as a BOM key yet, use the LCSC code or product link, or use Search Keyword below. Defaults to one sample line. |
| `searchKeyword` | string | No | Free-text search across part description, model, and family. Discovered parts flow into the same output as your BOM. Defaults to empty. |
| `brandNames` | array of strings | No | Filter search results to specific manufacturers (ST, TI, NXP, Infineon, Microchip, and more, or type any brand name). Needs Search Keyword or Category Names also set. Defaults to none. |
| `categoryNames` | array of strings | No | Filter search results to real LCSC categories (Integrated Circuits, Microcontrollers, Capacitors, Connectors, and more). Can be used alone to browse a whole category. Defaults to none. |
| `rohsOnly` | boolean | No | Keep only RoHS-certified parts among search results. Defaults to false. |
| `inStockOnly` | boolean | No | Keep only parts with real stock above zero among search results. Defaults to false. |
| `proxyConfiguration` | object | No | Apify Proxy settings. Defaults to the cheaper datacenter proxy, which was confirmed to reach LCSC's product data without issue. |
| `maxParts` | integer | No | Maximum number of parts actually processed in this run, combining BOM lines and discovered search results, even if either source has more. Defaults to 15. |
| `onlyChangedParts` | boolean | No | Turns the run into a price and stock monitor: only parts whose price or stock moved since the last run under `stateName` are pushed, tagged with the kind of change. Defaults to false. |
| `stateName` | string | No | Name for this tracked BOM's saved monitor history, so multiple independent trackers don't overwrite each other. Only relevant when `onlyChangedParts` is on. Defaults to `default`. |
| `resetState` | boolean | No | Clears the saved price and stock history for `stateName` before the run starts, so every part counts as newly tracked again. Defaults to false. |

### 📊 Data table

#### Parts (default view)

| Field | Type | Description |
| --- | --- | --- |
| `partCode` | string | The LCSC part code. |
| `mpn` | string | Manufacturer part number. |
| `brand` | string | Manufacturer or brand name. |
| `name` | string | Part description. |
| `category` / `parentCategory` | string | LCSC's own category and parent category for this part. |
| `requestedQuantity` | number | The quantity you asked for on this BOM line. |
| `unitPriceAtRequestedQty` | number | The real unit price you'd pay at your requested quantity. |
| `extendedCostAtRequestedQty` | number | Unit price multiplied by your requested quantity. |
| `stockTotal` | number | Total units currently in stock. |
| `stockDomestic` / `stockOverseas` | object | Warehouse split: total, ship-immediately, and ship-in-3-days counts. |
| `minOrderQuantity` / `maxOrderQuantity` | number | Minimum and maximum order quantity, when LCSC sets one. |
| `minPacketQuantity` | number | Minimum reel or tape packing quantity, when applicable. |
| `nextBreakQty` / `nextBreakUnitPrice` | number | The next higher volume price tier and its unit price, if any. |
| `unitsToNextBreak` | number | How many more units you'd need to order to reach that tier. |
| `savingsAtNextBreak` | number | Only present when rounding up to the next tier costs less in total than your current order, the real dollar amount you'd save. |
| `isRohsCert` | boolean | Whether this part has a confirmed RoHS compliance certificate. |
| `rohsCertType` | string | The certification type, when certified (for example `ROHS3`). |
| `rohsCertUrls` | array of strings | Direct links to the real certificate PDFs, when certified. |
| `origin` | string | Whether this row came from your BOM Items or was discovered via Search Keyword / Brand Names / Category Names. |
| `specs` | object | Full technical specification key-value pairs. |
| `datasheetUrl` | string | Direct link to the part's datasheet PDF. |
| `productUrl` | string | The LCSC product page for this part. |

**Example output**

```json
{
  "partCode": "C8734",
  "mpn": "STM32F103C8T6",
  "brand": "ST",
  "name": "Medium-density performance line Arm-based 32-bit MCU with 64 or 128 KB Flash, USB, CAN, 7 timers, 2 ADCs, 9 com. interfaces",
  "category": "Microcontrollers",
  "parentCategory": "Embedded Processors & Controllers",
  "requestedQuantity": 9,
  "unitPriceAtRequestedQty": 1.7357,
  "extendedCostAtRequestedQty": 15.62,
  "currency": "USD",
  "availability": "InStock",
  "stockTotal": 40695,
  "stockDomestic": { "total": 40695, "shipImmediately": 40695, "ship3Days": 0 },
  "stockOverseas": { "total": 40695, "shipImmediately": 40695, "ship3Days": 0 },
  "minOrderQuantity": 1,
  "minPacketQuantity": 250,
  "nextBreakQty": 10,
  "nextBreakUnitPrice": 1.503,
  "unitsToNextBreak": 1,
  "savingsAtNextBreak": 0.59,
  "isRohsCert": true,
  "rohsCertType": "ROHS3",
  "rohsCertUrls": ["https://datasheet.lcsc.com/certification/rohs/9553356917c3ad68e308019f11587e30.pdf"],
  "origin": "bom",
  "datasheetUrl": "https://datasheet.lcsc.com/datasheet/pdf/ac66debd4c13334db1d28037926f8881.pdf?productCode=C8734",
  "productUrl": "https://www.lcsc.com/product-detail/C8734.html"
}
```

#### Price Ladder view

| Field | Type | Description |
| --- | --- | --- |
| `partCode` / `mpn` | string | Which part this tier belongs to. |
| `tierQuantity` | number | Minimum quantity to qualify for this tier's unit price. |
| `unitPrice` | number | Unit price at this tier. |
| `extendedPriceAtTier` | number | Total price at exactly this tier's quantity. |
| `isRequestedTier` | boolean | True for the tier that actually applies to your requested quantity on that BOM line. |

Every quantity price tier for every part in your BOM, laid out in one flat table, so you can spot volume-discount opportunities across your whole order at a glance.

#### BOM Summary view

| Field | Type | Description |
| --- | --- | --- |
| `runAt` | string | When this run completed. |
| `partsRequested` / `partsResolved` / `partsFailed` | number | How many BOM lines were requested, successfully priced, and failed to resolve. |
| `partsInStock` / `partsNeedingAttention` | number | How many resolved parts are in stock versus need attention. |
| `totalCostAtRequestedQuantities` | number | Total cost across the whole BOM at your requested quantities. |
| `totalPotentialSavingsIfRoundedUp` | number | Total savings across the whole BOM if every eligible line were rounded up to its next price break. |

One row per run, so you can see instantly whether your BOM is ready to order and what it's going to cost.

#### Monitor mode output

When `onlyChangedParts` is on, changed parts are pushed with `changeType` (`PRICE_DROPPED`, `PRICE_ROSE`, `STOCK_DEPLETED`, `STOCK_REPLENISHED`, or `NEWLY_TRACKED`), `previousValue`, `currentValue`, and `delta`, instead of the full Parts row.

### 💰 Pricing

Pricing is pay per result, billed on the part and price records actually saved to your dataset. Empty runs cost nothing. There are no fixed monthly subscriptions or hidden maintenance fees.

### ⭐ Enjoying LCSC Scraper?

<table width="100%">
<tr>
<td style="padding:20px 24px 14px;background:#EFF6FF;border:1px solid #BFDBFE;border-left:5px solid #1D4ED8;border-radius:10px 10px 0 0">
<span style="font-size:20px;letter-spacing:4px">⭐ ⭐ ⭐ ⭐ ⭐</span><br>
<span style="font-size:17px;font-weight:800;color:#1C1917">If this saved you from manually checking price tiers on LCSC one part at a time, let us know.</span><br>
<span style="font-size:14px;color:#57534E">A 5-star rating takes 10 seconds and helps other hardware engineers and procurement teams find this Actor. Your feedback also tells us what to build next.</span>
</td>
</tr>
<tr>
<td style="padding:0;background:#1D4ED8;border:1px solid #BFDBFE;border-top:none;border-radius:0 0 10px 10px;text-align:center">
<a href="https://apify.com/getascraper/lcsc-scraper/reviews" style="display:block;padding:13px 16px;color:#FFFFFF;text-decoration:none;font-weight:800;font-size:15px;letter-spacing:0.3px">★&nbsp;&nbsp;Rate this Actor on Apify</a>
</td>
</tr>
</table>

### 💡 Tips

- Use the exact LCSC code from your BOM spreadsheet when you have it. It's the fastest and most reliable way to target a part.
- Don't have a code yet? Combine Search Keyword with Category Names or Brand Names to narrow a broad search down fast, instead of scrolling pages of results.
- Give each tracked BOM its own `stateName` so a per-product tracker and a per-client tracker never overwrite each other's price and stock history.
- Check the BOM Summary view first after a run, it tells you at a glance whether your BOM is ready to order before you dig into individual parts.

### ❓ FAQ

##### Does this Actor need an LCSC account or login?

No. Every request this Actor makes reads LCSC's public product data. It never logs in or requires an API key from LCSC or from you.

##### How does the price-break savings number work?

For each BOM line, this Actor compares the total cost at your requested quantity against the total cost of rounding up to the next volume price tier. If rounding up actually costs less overall, the savings amount and how many more units you'd need are included. If rounding up would cost more, the field is simply left out.

##### Can I look up a part by its manufacturer part number instead of the LCSC code?

As a BOM Items key, not yet, that field still expects an LCSC code or a product page link. But Search Keyword does match on manufacturer part numbers, so type the MPN into Search Keyword to find and price the part, then use its LCSC code in BOM Items for future runs if you want an exact repeatable lookup.

##### What's the difference between BOM Items and the search filters?

BOM Items is for parts you already know, an exact code or link plus the quantity you need. Search Keyword, Brand Names, and Category Names are for parts you're still trying to find, browse a category, compare a brand's options, or search by description. Both feed the same three output views in the same run.

##### How fresh is the data?

Every run reads LCSC's live product data at request time. There is no cached or pre-scraped snapshot, so results reflect what LCSC shows right now.

##### Can I track price and stock changes instead of re-pulling everything each time?

Yes. Turn on `onlyChangedParts` and rerun the Actor later against the same BOM and `stateName`. Only parts whose price or stock actually changed come back.

### 🔗 Other actors

- [China supplier award monitor: 全国公共资源交易](https://apify.com/getascraper/china-supplier-award-monitor) ↗ - tracks official China supplier award and procurement signals.
- [Yiwugo Scraper 义乌购: Supplier & market monitor](https://apify.com/getascraper/yiwugo-booth-monitor) ↗ - monitors supplier listings on China's Yiwugo wholesale sourcing platform.
- [Chinagoods Scraper 中国小商品城: Yiwu booth monitor](https://apify.com/getascraper/chinagoods-booth-monitor) ↗ - tracks booth and supplier data from the Yiwu wholesale market platform.
- [US HTS Tariff Monitor: Official Line Changes](https://apify.com/getascraper/us-hts-tariff-monitor) ↗ - watches official US tariff line changes relevant to importing sourced components.
- [China Recall Scraper: 中国缺陷产品召回](https://apify.com/getascraper/china-samr-product-recall-scraper) ↗ - monitors official Chinese government product recall notices by brand and category.

# Actor input Schema

## `bomItems` (type: `array`):

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.

## `searchKeyword` (type: `string`):

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.

## `brandNames` (type: `array`):

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.

## `categoryNames` (type: `array`):

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.

## `rohsOnly` (type: `boolean`):

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.

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

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.

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

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.

## `maxParts` (type: `integer`):

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.

## `onlyChangedParts` (type: `boolean`):

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.

## `stateName` (type: `string`):

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.

## `resetState` (type: `boolean`):

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.

## Actor input object example

```json
{
  "bomItems": [
    {
      "key": "C8734",
      "value": "1"
    }
  ],
  "searchKeyword": "",
  "brandNames": [],
  "categoryNames": [],
  "rohsOnly": false,
  "inStockOnly": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxParts": 15,
  "onlyChangedParts": false,
  "stateName": "default",
  "resetState": false
}
```

# Actor output Schema

## `parts` (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 = {
    "bomItems": [
        {
            "key": "C8734",
            "value": "1"
        }
    ],
    "searchKeyword": "",
    "brandNames": [],
    "categoryNames": [],
    "rohsOnly": false,
    "inStockOnly": false,
    "proxyConfiguration": {
        "useApifyProxy": true
    },
    "maxParts": 15,
    "onlyChangedParts": false,
    "stateName": "default",
    "resetState": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("getascraper/lcsc-scraper").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 = {
    "bomItems": [{
            "key": "C8734",
            "value": "1",
        }],
    "searchKeyword": "",
    "brandNames": [],
    "categoryNames": [],
    "rohsOnly": False,
    "inStockOnly": False,
    "proxyConfiguration": { "useApifyProxy": True },
    "maxParts": 15,
    "onlyChangedParts": False,
    "stateName": "default",
    "resetState": False,
}

# Run the Actor and wait for it to finish
run = client.actor("getascraper/lcsc-scraper").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 '{
  "bomItems": [
    {
      "key": "C8734",
      "value": "1"
    }
  ],
  "searchKeyword": "",
  "brandNames": [],
  "categoryNames": [],
  "rohsOnly": false,
  "inStockOnly": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxParts": 15,
  "onlyChangedParts": false,
  "stateName": "default",
  "resetState": false
}' |
apify call getascraper/lcsc-scraper --silent --output-dataset

```

## MCP server setup

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

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/etOcmGi9WCxhQlbsR/builds/bUiZX1bcK9mpC4flX/openapi.json
