# Wmsc Lcsc — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and retrieve detailed information about electronics components from LCSC, including product specifications, pricing, stock levels, and categories. Quickly find component data, identify parts, and access real-time availability to streamline your electronics sourcing and procurement.

**Category:** Marketplaces | **Website:** [wmsc.lcsc.com/](https://wmsc.lcsc.com/) | **Docs:** [parse.bot/marketplace/efa55a02-5520-41f1-af4f-7ea8a7bedc4b/wmsc-lcsc-com-api](https://parse.bot/marketplace/efa55a02-5520-41f1-af4f-7ea8a7bedc4b/wmsc-lcsc-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/wmsc-lcsc/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get categories

Fetches the full 3-level category hierarchy of the LCSC marketplace. Returns all top-level categories with nested subcategories. No pagination — single response contains the entire tree. Each node carries a productNumber count and a childCategoryList array (null at leaves).

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/wmsc-lcsc/get-categories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get product detail

Fetches complete product details for a given LCSC product code. Returns the full upstream record including pricing tiers, stock breakdown, specifications, images, PDF datasheet link, category path, and compliance data (ECCN, HTS codes). A single round-trip; no pagination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_code` | string | Yes | The LCSC product code (e.g., C14663). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/wmsc-lcsc/get-product-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"product_code":"<string>"}'
```

### Parse product identification

Parses and returns core product identification fields for a given LCSC product code: manufacturer part number, English product name, and the composite title (brand + MPN). Derived from the full product detail in a single round-trip.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_code` | string | Yes | The LCSC product code (e.g., C14663). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/wmsc-lcsc/product-identification \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"product_code":"<string>"}'
```

### Parse product pricing

Extracts the tiered pricing ladder for a product, showing unit prices at different quantity thresholds. Each tier includes the quantity break, unit price in the local currency and USD equivalent, and any volume discount rate. Also returns the reel price when the product is sold in reel packaging.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_code` | string | Yes | The LCSC product code (e.g., C14663). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/wmsc-lcsc/product-pricing \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"product_code":"<string>"}'
```

### Parse product specifications

Extracts technical parameters and specifications for a product. Returns a map keyed by parameter name (English), where each value contains the English name, English value, and an isMain flag indicating whether it is a primary specification.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_code` | string | Yes | The LCSC product code (e.g., C14663). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/wmsc-lcsc/product-specifications \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"product_code":"<string>"}'
```

### Parse product stock

Extracts stock and availability details for a product, including total stock count and domestic stock breakdown (ship immediately vs ship within 3 days). Zero stock is a valid response for out-of-stock items.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_code` | string | Yes | The LCSC product code (e.g., C14663). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/wmsc-lcsc/product-stock \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"product_code":"<string>"}'
```

### Search products

Full-text search over LCSC product catalog by keyword. Returns a paginated list of matching products with basic identification (MPN, brand), stock count, and tiered pricing. Server paginates via currentPage; each page returns up to 10 items. Matches highlight via HTML spans.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | The page number to retrieve. |
| `query` | string | Yes | Search keyword (e.g., NE555, capacitor, resistor). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/wmsc-lcsc/search-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.