# Suning Scraper (China's electronics retailer) (`crawlerbros/suning-scraper`) Actor

Scrape suning.com - one of China's largest electronics e-commerce platforms. Search products by keyword, fetch product details. Emits title, prices, vendor, images and URLs. No login required.

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

## Pricing

from $3.00 / 1,000 results

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

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## Suning Scraper

Scrape [suning.com](https://www.suning.com/) — one of China's largest electronics e-commerce platforms (Suning 苏宁易购).

### Modes

| Mode | Description |
|---|---|
| `search` (default) | Products by free-text keyword (Chinese queries work best) |
| `byCategory` | Browse a verified category listing (17 categories, e.g. `0-20006-0` 手机) |
| `byProductUrl` | Fetch one product detail page per URL/ID |

### Filters

`minPrice` / `maxPrice` (CNY), `containsKeyword` (title substring), `sortType` (5 orderings: 综合/销量/评价数/价格升降), `maxItems`.

### Output fields

`productId`, `title`, `sellPoint`, `specs[]`, `shopName`, `commentCount`, `price` (CNY), `arrivalPrice` (到手价 / final price after discounts), `vendorName`, `supplierCode`, `promotions[]`, `imageUrl`, `url`, `sourceUrl`, `scrapedAt`, `recordType`. Typed `error` records for invalid URLs / fetch failures / parse failures.

### Data Source

Search uses Suning's mobile SSR listing (`m.suning.com/search/<query>/`) — the desktop `search.suning.com` endpoint hard-rate-limits (HTTP 429) non-mainland IPs, so the actor reads the mobile SSR instead (same product catalog, paginates via `?page=N`, sorts via `?st=N`). Category listings (`list.suning.com`) and product detail pages (`product.suning.com`) are server-side rendered and freely accessible. Prices come from Suning's public `ds.suning.com/generalForTile` JSONP endpoint — no login, no API key. The actor fetches pages direct first and escalates to the Apify AUTO proxy on 429/403/5xx.

**Canonical product URLs:** every record's `url`/`sourceUrl` uses the canonical form `product.suning.com/{pid}.html`. Suning's own SSR links use a shop-prefixed form (`product.suning.com/{shop}/{pid}.html`) that returns 404 from a clean shell — the actor always rewrites to the canonical form, which serves HTTP 200.

### Anti-bot

Tier 2: `curl_cffi` chrome131 TLS impersonation with rotating browser user-agents, exponential backoff on 429/5xx, lazy Apify AUTO-datacenter proxy escalation (direct-first, proxy fallback).

### Limits

- Prices come from Suning's public `ds.suning.com/generalForTile` JSONP endpoint, which serves `404` to some non-mainland egress IPs. The actor retries each price batch across fresh proxy sessions (some AUTO exits are mainland) and attaches prices whenever a mainland exit is found; otherwise records ship without the `price` fields (titles, sell points, specs, images, URLs are always populated from the SSR listing HTML). Some pre-release / out-of-stock items legitimately carry no price on either the SSR or the price API.
- `minPrice`/`maxPrice` are **strict**: when a price bound is set, records without an attached price are excluded (the filter always reflects in the output; an impossible range like `minPrice > maxPrice` yields 0 records cleanly).
- `promotions` may be empty when no promotion is active.
- Mobile search ignores `st=10` (price descending) and falls back to the default ordering — the field still validates and runs.
- Mobile SSR pages expose 10-20 products per page; `maxItems` above a single page's yield walks `?page=N` until filled.

# Actor input Schema

## `mode` (type: `string`):

What to fetch: search (products by keyword), byCategory (browse a category listing) or byProductUrl (single product detail).

## `searchQuery` (type: `string`):

Free-text product keyword, e.g. `手机` (phone), `笔记本` (laptop). Chinese queries work best.

## `categoryCode` (type: `string`):

Suning category listing code, e.g. `0-20006-0` (手机 / phones), `0-161004-0` (男装 / menswear).

## `productUrls` (type: `array`):

Suning product URLs or IDs, e.g. `https://product.suning.com/0000000000/12451301248.html`.

## `sortType` (type: `string`):

Result ordering for search mode.

## `minPrice` (type: `number`):

Drop products with a current price below this.

## `maxPrice` (type: `number`):

Drop products with a current price above this.

## `containsKeyword` (type: `string`):

Only emit products whose title contains this text (case-insensitive substring).

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

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "手机",
  "categoryCode": "0-20006-0",
  "productUrls": [],
  "sortType": "st0",
  "maxItems": 10
}
```

# Actor output Schema

## `products` (type: `string`):

Dataset containing all scraped Suning product records.

# 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 = {
    "mode": "search",
    "searchQuery": "手机",
    "categoryCode": "0-20006-0",
    "productUrls": [],
    "sortType": "st0",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/suning-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 = {
    "mode": "search",
    "searchQuery": "手机",
    "categoryCode": "0-20006-0",
    "productUrls": [],
    "sortType": "st0",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/suning-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 '{
  "mode": "search",
  "searchQuery": "手机",
  "categoryCode": "0-20006-0",
  "productUrls": [],
  "sortType": "st0",
  "maxItems": 10
}' |
apify call crawlerbros/suning-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/suning-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/ezrl9qpYouRrB2Qsa/builds/svp5x58W5wFNNqItk/openapi.json
