# Weidian Products Scraper (`automation-lab/weidian-products-scraper`) Actor

Fetch public Weidian item URLs and export product identity, CNY prices, images, collection signals, seller context, variants, stock, and availability.

- **URL**: https://apify.com/automation-lab/weidian-products-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 product extracteds

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

## Weidian Products Scraper

Extract **Weidian products** from supplied public item URLs.
Get product identity, current CNY price, original price, images, collection signals,
seller context, stock, normalized availability, and exposed SKU variants in a
structured Apify dataset.

The Actor is designed for repeatable China-commerce sourcing checks and price or
availability snapshots. It does not crawl whole shops or search Weidian.

### What the Actor does

For every accepted public product URL, the Actor:

1. validates each Weidian item URL and canonicalizes its item ID;
2. fetches the public item page;
3. reads Weidian's embedded structured product state;
4. normalizes product, seller, collection, image, and availability fields;
5. optionally includes SKU-level prices and stock;
6. saves one product record to the default dataset.

Duplicate item IDs are fetched once. Invalid URLs fail clearly instead of
creating misleading empty records.

### Who is it for?

- sourcing teams checking candidate products before placing orders;
- resellers comparing a saved list of Weidian offers;
- catalog teams importing product identity, prices, and media;
- analysts collecting collection and availability signals;
- automation teams scheduling recurring product snapshots;
- developers feeding Weidian product records into spreadsheets or databases.

### Why use this Actor

The output combines fields that otherwise require inspecting several parts of a
product page:

- canonical product identity and URL;
- current and original CNY prices;
- product-level stock and normalized availability;
- product collection count and displayed sales text;
- primary image and full image list;
- seller identity, URL, and shop collection count;
- optional SKU prices, stock, images, and availability;
- a UTC extraction timestamp for snapshot comparison.

The implementation uses embedded structured page data rather than brittle
visual selectors. It remains intentionally narrow: supplied products only.

### Extracted data

| Field | Meaning |
| --- | --- |
| `itemId` | Weidian numeric product ID |
| `url` | Canonical public product URL |
| `title` | Product title displayed by Weidian |
| `price` | Current or lowest exposed price in CNY |
| `originalPrice` | Original displayed price when exposed |
| `currency` | `CNY` |
| `isAvailable` | Normalized purchase availability |
| `stock` | Product-level exposed stock |
| `availabilityStatus` | `available`, `out_of_stock`, `off_shelf`, `deleted`, `invalid`, `not_sellable`, or `unknown` |
| `soldText` | Weidian's displayed sales signal |
| `collectCount` | Product collection/favorite count |
| `isCollectedByCurrentSession` | Anonymous session collection state |
| `primaryImageUrl` | Main product image |
| `imageUrls` | All exposed product images |
| `shopId`, `shopName`, `shopUrl` | Seller context |
| `shopCollectCount` | Shop collection/follower signal |
| `variants` | Optional exposed SKU details |
| `scrapedAt` | UTC extraction timestamp |

Fields may be `null` when Weidian does not expose them for a particular item.

### Getting started

1. Open the Actor in Apify Console.
2. Add one or more public Weidian item URLs to **Weidian product URLs**.
3. Keep **Include variants** enabled for SKU-level stock and prices.
4. Set **Maximum products** to cap the run.
5. Click **Start**.
6. Open the default dataset or export it as JSON, CSV, Excel, or XML.

A valid URL looks like:

```text
https://weidian.com/item.html?itemID=7331453669
```

### Input parameters

#### `startUrls`

Required array of public Weidian item URLs. Supported hostnames
are `weidian.com` and its subdomains, and the URL must contain a numeric
`itemID` query parameter.

#### `maxItems`

Maximum number of unique supplied products to process. Default: `100`.
Allowed range: `1` to `1000`. This is a safety and billing cap; it does not
make the Actor discover products.

#### `includeVariants`

When `true` (the default), each product includes the SKU variants exposed in
the public page state. Disable it for a smaller product-level monitoring
payload.

### Example input: one complete product

```json
{
  "startUrls": [
    { "url": "https://weidian.com/item.html?itemID=7331453669" }
  ],
  "maxItems": 1,
  "includeVariants": true
}
```

### Example input: compact price comparison

```json
{
  "startUrls": [
    { "url": "https://weidian.com/item.html?itemID=4281670129" },
    { "url": "https://weidian.com/item.html?itemID=7331453669" }
  ],
  "maxItems": 2,
  "includeVariants": false
}
```

### Output example

The exact title, price, stock, and signals change at the source. A current run
returns this shape:

```json
{
  "itemId": "7331453669",
  "url": "https://weidian.com/item.html?itemID=7331453669",
  "title": "Product title displayed by Weidian",
  "price": 210,
  "originalPrice": 210,
  "currency": "CNY",
  "isAvailable": true,
  "stock": 9986,
  "availabilityStatus": "available",
  "soldText": "销量 4",
  "collectCount": 2,
  "isCollectedByCurrentSession": false,
  "primaryImageUrl": "https://si.geilicdn.com/product-image.jpg",
  "imageUrls": ["https://si.geilicdn.com/product-image.jpg"],
  "shopId": "1826085585",
  "shopName": "Seller shop name",
  "shopUrl": "https://weidian.com/?userid=1826085585",
  "shopCollectCount": 32683,
  "variants": [
    {
      "id": "124463963907",
      "title": "36",
      "price": 210,
      "originalPrice": 210,
      "stock": 666,
      "imageUrl": null,
      "attributeIds": ["9567175262"],
      "isAvailable": true
    }
  ],
  "scrapedAt": "2026-01-15T12:00:00.000Z"
}
```

### How much does it cost to extract Weidian products?

Pricing is pay per event:

- **$0.00005** once when a run starts;
- **$0.004 per product** on the BRONZE tier;
- lower per-product prices are available on higher Apify subscription tiers.

Approximate BRONZE examples:

| Products | BRONZE charge calculation |
| ---: | ---: |
| 1 | 1 × $0.004 + $0.00005 start |
| 10 | 10 × $0.004 + $0.00005 start |
| 100 | 100 × $0.004 + $0.00005 start |
| 1,000 | 1,000 × $0.004 + $0.00005 start |

Only successfully saved product records receive the product charge. Duplicate
input IDs are processed once. Apify may also enforce your run spending limit.

### Recurring price and availability monitoring

Save a stable list of item URLs and schedule the Actor daily or weekly. Each
record includes `itemId` and `scrapedAt`, so downstream automation can join
snapshots and detect:

- current price changes;
- items moving on or off shelf;
- stock changes;
- newly exposed or unavailable variants;
- collection-count changes;
- seller context changes.

The Actor produces snapshots, not alerts or a built-in historical database.
Use Apify schedules, webhooks, dataset exports, or your own storage to compare
runs.

### Spreadsheet and data-pipeline workflows

After a run, export the dataset to CSV or Excel for a sourcing review. For an
automated pipeline, attach an Apify webhook or fetch the default dataset through
the API. Stable `itemId` values are the recommended join key.

When variants are enabled, they remain nested JSON. Choose JSON for full
fidelity or flatten the `variants` array in your destination tool.

### API usage with cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~weidian-products-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startUrls": [{"url":"https://weidian.com/item.html?itemID=7331453669"}],
    "maxItems": 1,
    "includeVariants": true
  }'
```

Use the returned run ID to inspect status and retrieve the default dataset.
Never commit your Apify token to source control.

### API usage with JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/weidian-products-scraper').call({
    startUrls: [{ url: 'https://weidian.com/item.html?itemID=7331453669' }],
    maxItems: 1,
    includeVariants: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

### API usage with Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/weidian-products-scraper').call(run_input={
    'startUrls': [{'url': 'https://weidian.com/item.html?itemID=7331453669'}],
    'maxItems': 1,
    'includeVariants': True,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items[0])
```

### Use through MCP

Add the Actor to Claude Code through Apify's MCP endpoint:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/weidian-products-scraper"
```

#### Claude Desktop, Cursor, and VS Code setup

Use this equivalent configuration in Claude Desktop, Cursor, or VS Code:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/weidian-products-scraper"
    }
  }
}
```

Example prompts:

- “Extract price, stock, and collection count for these Weidian item URLs.”
- “Fetch this sourcing list with variants and return unavailable SKUs.”
- “Run the Weidian product snapshot and summarize products that are off shelf.”

### Reliability and retries

The Actor makes direct bounded HTTP requests to public product pages and reads
embedded structured state. Transient network errors, HTTP 408/429, and temporary
5xx responses are retried up to two times.

Stable invalid URLs, unsupported domains, missing product state, deleted page
shapes, and malformed upstream data fail explicitly. This prevents a blocked or
broken response from being presented as a successful empty dataset.

### Limits

- Only supplied public product URLs are supported.
- Shop URLs, keyword search, and whole-shop catalog discovery are not supported.
- Output reflects what Weidian exposes at extraction time.
- Some products may omit stock, sales, collection, seller, or variant fields.
- Product titles may be Chinese, English, or seller-provided mixed language.
- Prices are returned in CNY and are not converted.
- The Actor does not download image files; it exports source image URLs.
- Weidian can change its public page structure without notice.

### Legality and responsible use

Use the Actor only for public data you are authorized to collect. Follow
Weidian's terms, applicable laws, and your contractual obligations. Avoid
collecting unnecessary personal information, do not use output for prohibited
profiling, and apply suitable retention and access controls.

Product availability and price data can change quickly. Verify critical
purchasing decisions at the source.

### Troubleshooting

#### “Weidian URL must contain a numeric itemID”

Use a product URL such as
`https://weidian.com/item.html?itemID=7331453669`. Shop home pages are not
product URLs.

#### “Weidian returned no product state”

Open the product URL manually to check whether it is public and still exists.
If it loads only after login, it is outside this Actor's anonymous public scope.
Retrying an unchanged private or deleted URL will not help.

#### The dataset contains fewer rows than input URLs

Duplicate item IDs are fetched once, and `maxItems` caps unique processed
products. Review those two conditions first.

#### Variants are null

`variants` is `null` when `includeVariants` is disabled. It is an empty array
when variants were enabled but the source exposed no SKU map.

### FAQ

#### Does it search Weidian?

No. Supply known public product URLs. This keeps the Actor focused on
repeatable detail and monitoring snapshots.

#### Does it scrape whole shops?

No. Shop information included in each product record is context for that
product, not a complete shop catalog.

#### Can I schedule it?

Yes. Use Apify schedules and reuse the same input list. Save or export each
run's dataset for historical comparison.

#### Are unavailable products charged?

A product is charged when a valid structured record is saved, including a valid
record whose availability flags say it is unavailable. Invalid or unparsable
pages are not saved or charged as products.

#### Can I disable variants?

Yes. Set `includeVariants` to `false` for smaller product-level records.

#### Are image files downloaded?

No. The output contains public image URLs. Downloading and storing image files
is a separate workflow.

### Related Automation Lab Actors

For sourcing work on other marketplaces, consider:

- [Alibaba Products Scraper](https://apify.com/automation-lab/alibaba-products-scraper) for public Alibaba listing searches;
- [JD.com Product Scraper](https://apify.com/automation-lab/jd-com-product-scraper) for JD.com product detail extraction;
- [AliExpress Products & Seller Catalog Scraper](https://apify.com/automation-lab/aliexpress-products-scraper) for AliExpress catalog and seller research.

Choose this Actor when your input is a known set of public Weidian item URLs and
you need compact, repeatable product snapshots.

# Actor input Schema

## `startUrls` (type: `array`):

Public Weidian item URLs containing a numeric itemID. Duplicate products are fetched once.

## `maxItems` (type: `integer`):

Maximum number of unique supplied products to process. This never discovers additional products.

## `includeVariants` (type: `boolean`):

Include exposed SKU-level title, price, stock, image, and availability records. Disable for a smaller monitoring payload.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://weidian.com/item.html?itemID=7331453669"
    }
  ],
  "maxItems": 10,
  "includeVariants": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing product identity, pricing, availability, collection, seller, images, and optional variants.

# 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 = {
    "startUrls": [
        {
            "url": "https://weidian.com/item.html?itemID=7331453669"
        }
    ],
    "maxItems": 10,
    "includeVariants": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/weidian-products-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 = {
    "startUrls": [{ "url": "https://weidian.com/item.html?itemID=7331453669" }],
    "maxItems": 10,
    "includeVariants": True,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/weidian-products-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 '{
  "startUrls": [
    {
      "url": "https://weidian.com/item.html?itemID=7331453669"
    }
  ],
  "maxItems": 10,
  "includeVariants": true
}' |
apify call automation-lab/weidian-products-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/weidian-products-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/rrwd4PVC6wliuodFB/builds/QMOHBMhA0I1PQf89r/openapi.json
