# 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-wmsc-lcsc-com-api-efa55a02/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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/parse-wmsc-lcsc-com-api-efa55a02/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-wmsc-lcsc-com-api-efa55a02/get_product_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-wmsc-lcsc-com-api-efa55a02/parse_product_identification \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-wmsc-lcsc-com-api-efa55a02/parse_product_pricing \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-wmsc-lcsc-com-api-efa55a02/parse_product_specifications \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-wmsc-lcsc-com-api-efa55a02/parse_product_stock \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-wmsc-lcsc-com-api-efa55a02/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
