# JD.com Shop Catalog Scraper: Every Product & Watch Mode (`benthepythondev/jd-shop-catalog-scraper`) Actor

Paste JD.com (mall.jd.com) shop links or shop IDs to extract every reachable product, counted against the shop's announced total. Watch mode flags new, removed, and repriced items with scrapedAt and live sourceUrl proof. No login.

- **URL**: https://apify.com/benthepythondev/jd-shop-catalog-scraper.md
- **Developed by:** [Ben](https://apify.com/benthepythondev) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 results

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## JD.com Shop Catalog Scraper: Every Product & Watch Mode

Cross-border sellers, sourcing agents, brand-protection teams, and price analysts use this actor to export every public product from a JD.com (`mall.jd.com`) store and track catalog or price changes without logging in.

Paste one or more JD.com shop links or numeric shop IDs to page through the public catalog (60 SKUs per page), compare `productsRead` against the shop's announced total in a `shop_coverage` row, attach `scrapedAt` and live `sourceUrl` proof to every item, and flag `new`, `removed`, `price_up`, and `price_down` items across scheduled runs.

### Sample output

Each run writes one `product` row per SKU and one `shop_coverage` summary row per shop. Example rows from the Apple JD.com self-operated shop (`1000000127`):

| `rowType` | `itemId` | `title` | `price` | `changeType` | `scrapedAt` | `productUrl` |
|---|---|---|---|---|---|---|
| `product` | `100025283168` | 两年期官方AC+(适用于 HomePod) | `null` | `new` | `2026-11-24T08:51:39Z` | `https://item.jd.com/100025283168.html` |
| `product` | `100051856021` | Apple iPhone 15 (A3092) 128GB | `4999.00` | `price_down` | `2026-11-24T08:51:39Z` | `https://item.jd.com/100051856021.html` |
| `shop_coverage` | `shopId: 1000000127` | `productsRead: 848 / announcedTotal: 848` | `coverage: 1.0` | `stopReason: complete` | `2026-11-24T08:51:39Z` | `https://mall.jd.com/index-1000000127.html` |

### Input example

Pass public `mall.jd.com/index-<id>.html` links, `advance_search` URLs, mobile `shop.m.jd.com/?shopId=<id>` links, or bare numeric shop IDs. This two-shop example monitors one self-operated flagship (`1000000127`) and one third-party brand shop (`16405681`) in watch mode:

```json
{
  "shopUrls": [
    "https://mall.jd.com/index-1000000127.html",
    "16405681"
  ],
  "maxPagesPerShop": 50,
  "maxItemsPerShop": 0,
  "usePriceBands": false,
  "compareWithLastRun": true,
  "onlyChanges": true,
  "watchStoreName": "jd-shop-catalog-watch",
  "includeCoverageRows": true
}
```

### Pricing and billing units

This actor uses pay-per-event pricing (`product-row`). You are charged only for `product` rows written to the dataset. Check the Pricing tab for the active per-event rate.

| Scenario | Emitted `product` rows | `product-row` events charged |
|---|---|---|
| Full baseline export of a 1,000-SKU shop | 1,000 | 1,000 |
| Daily watch run (`onlyChanges: true`, 12 items changed) | 12 | 12 (988 unchanged items skipped) |
| Daily watch run (`onlyChanges: true`, 0 items changed) | 0 | 0 |
| Coverage summary row (`shop_coverage`) | 0 | 0 |
| Blocked shop (login or risk wall before any SKU loads) | 0 | 0 |

### Measured coverage (datacenter proxy, no login)

From our public probe (`docs/coverage-probe.md`, 2026-11-21, Apify datacenter proxy, no login or cookies; 97% of 130 fetches succeeded):

| JD Shop | Store type | Products read | Announced total | Coverage | Stop reason |
|---|---|---|---|---|---|
| Apple (`1000000127`) | Self-operated | 874 | 855 | 100% | complete (price bands) |
| Xiaomi (`1000004123`) | Self-operated | 1,177 | 1,008 | 100% | complete (price bands) |
| 361° (`16405681`) | Third-party | 1,175 | 1,163 | 100% | complete (price bands) |
| Huawei (`1000004259`) | Self-operated | 480 | 504 | 95% | blocked_redirect |
| Haier (`1000001782`) | Self-operated | 300 | 414 | 72% | blocked_redirect |

In our cloud verification run (`1.1.2`, 2026-11-24), the default Apple shop input returned 848 of 848 announced products (100% coverage) in 76.1 seconds.

### Watch mode and safe diffing

Enable `compareWithLastRun: true` to persist each shop's `itemId` and `price` snapshot in a named Apify Key-Value Store (`watchStoreName`, default `jd-shop-catalog-watch`). On the next run, every product row gets `changeType` (`new`, `removed`, `price_up`, `price_down`, or `unchanged`), `previousPrice`, and `priceDelta`. Set `onlyChanges: true` to emit and pay for changed rows only.

If JD redirects a page to a login or risk wall, or if `maxItemsPerShop` or `maxPagesPerShop` caps a run before the end of the catalog, the actor stops without bypassing any wall, suppresses false `removed` rows, and preserves unseen items in the saved snapshot.

### Output JSON schema

#### Product row (`rowType: "product"`)

```json
{
  "rowType": "product",
  "shopId": "1000000127",
  "shopUrl": "https://mall.jd.com/index-1000000127.html",
  "itemId": "100025283168",
  "title": "两年期官方AC+(适用于 HomePod)",
  "price": null,
  "currency": "CNY",
  "imageUrl": "https://img14.360buyimg.com/n7/jfs/t1/211055/30/1075/53343/614594eaE81828747/8857509893cf2618.jpg",
  "productUrl": "https://item.jd.com/100025283168.html",
  "scrapedAt": "2026-11-24T08:51:39Z",
  "sourceUrl": "https://mall.jd.com/advance_search-394872-1000000127-1000000127-0-0-0-1-1-60.html",
  "changeType": "new",
  "previousPrice": null,
  "priceDelta": null
}
```

#### Coverage summary row (`rowType: "shop_coverage"`)

```json
{
  "rowType": "shop_coverage",
  "shopId": "1000000127",
  "venderId": "1000000127",
  "appId": "394872",
  "shopUrl": "https://mall.jd.com/index-1000000127.html",
  "productsRead": 848,
  "announcedTotal": 848,
  "coverage": 1.0,
  "complete": true,
  "stopReason": "complete",
  "pagesFetched": 15,
  "scrapedAt": "2026-11-24T08:51:39Z",
  "sourceUrl": "https://mall.jd.com/advance_search-394872-1000000127-1000000127-0-0-0-1-15-60.html",
  "watchSummary": {
    "new": 848,
    "removed": 0,
    "price_up": 0,
    "price_down": 0,
    "unchanged": 0,
    "totalEmitted": 848,
    "onlyChanges": false,
    "isFirstSnapshot": true,
    "snapshotUpdated": true,
    "removedSuppressed": false
  }
}
```

### FAQ

#### How do I export every product of a JD.com shop?

Paste one or more `https://mall.jd.com/index-<shopId>.html` links (or bare numeric shop IDs) into `shopUrls` and leave `maxItemsPerShop` at `0`. The actor reads `(appId, venderId, shopId)` from the public shop index page and pages through all 60-item `advance_search` pages until the catalog ends or `maxPagesPerShop` is reached.

#### Does it need a JD.com account or cookies?

No. The actor fetches only public `mall.jd.com` pages using fresh, stateless proxy sessions with no login and no cookies. If JD returns a login or risk wall, the actor records the stop reason in `shop_coverage` and skips the rest of that shop instead of attempting to bypass the wall.

#### How many products per shop can it extract, and why do some shops show fewer?

The default `maxPagesPerShop: 50` covers up to 3,000 products per shop (60 SKUs per page), and you can raise it to `200` pages (up to 12,000 products). A shop can return fewer items than its `announcedTotal` if JD redirects a later page to a risk or login wall, or if some SKUs are omitted from the default sort order. Turning on `usePriceBands: true` sweeps five JD price bands (`1-99`, `100-499`, `500-1999`, `2000-4999`, `5000+`) to capture SKUs hidden from the default sort.

#### Does it support Taobao or Tmall (`brand.tmall.com`) links?

No. This actor is JD.com (`mall.jd.com`) only. In our public coverage probe, Taobao and Tmall shop search pages enforced a slider and login wall for anonymous visitors (0% catalog coverage without cookies). Because this actor never uses logins or bypasses captchas, it supports only public JD.com shops.

#### How do I get only new, removed, or repriced items?

Set `compareWithLastRun: true` and `onlyChanges: true`, and keep the same `watchStoreName` (default `jd-shop-catalog-watch`) on a recurring schedule. The first run saves the shop baseline; later runs emit only `new`, `removed`, `price_up`, and `price_down` rows.

#### What does a blocked shop cost?

Zero `product-row` charges. When a shop hits a login or risk wall before returning any products, the actor emits only its `shop_coverage` row (not billed) and 0 `product` rows. During watch mode, a blocked run also leaves your previous snapshot untouched and emits no false `removed` rows.

#### How does this differ from JD keyword search or single-product scrapers?

Keyword search scrapers return ranked results across many sellers and cannot confirm whether you collected a store's full assortment. Single-product scrapers require you to supply every SKU URL up front. A shop catalog scraper takes one store link, pages the whole store, checks `productsRead` against `announcedTotal`, and tracks catalog changes across runs in watch mode.

#### Why is `price` sometimes `null` on raw HTML runs?

JD's shop list HTML leaves `.jdNum` empty on some stores and loads prices client-side through a signed script. Because this actor does not run signed anti-bot workarounds or logins, `price` is filled whenever JD returns an inline numeric price and `null` otherwise. Watch mode still tracks `new` and `removed` SKUs when prices are `null`.

#### How do I verify the data is live and not cached?

Every `product` and `shop_coverage` row includes `scrapedAt` (UTC ISO-8601 timestamp) and `sourceUrl` (the exact live `mall.jd.com` page URL fetched during that run).

### 京东 店铺 全部商品 监控

支持输入京东自营（自营旗舰店）及第三方店铺链接（`https://mall.jd.com/index-<店铺ID>.html`）、手机端店铺链接（`https://shop.m.jd.com/?shopId=<店铺ID>`）或纯数字店铺 ID。无需京东账号与 Cookie，自动分页提取公开商品列表（每页 60 条），并输出 `shop_coverage` 覆盖率核对行（实采商品数对比店铺公示总数）。开启监控模式（`compareWithLastRun` 与 `onlyChanges`）后，按定时任务仅输出新品上架（`new`）、下架（`removed`）及调价（`price_up` / `price_down`）商品，未变更商品不计费；遇到风控或登录拦截时自动停止且不产生误报下架。

### More actors

Browse all public e-commerce and market-data scrapers on [Apify Store](https://apify.com/benthepythondev).

### Local development and tests

```bash
python3 -m unittest discover -s tests -v
```

# Actor input Schema

## `shopUrls` (type: `array`):

Public JD.com shop links (e.g. https://mall.jd.com/index-1000000127.html), advance_search URLs, or numeric shop IDs (e.g. 1000000127). Public pages only; no login or cookies required.

## `maxPagesPerShop` (type: `integer`):

Maximum 60-item listing pages to fetch per shop (and per price band when usePriceBands is enabled). Default 50 covers up to 3,000 products.

## `maxItemsPerShop` (type: `integer`):

Optional cap on distinct products extracted per shop. Set to 0 to read the entire reachable catalog. Note: capping a run marks it incomplete so watch mode will not emit false removed items.

## `usePriceBands` (type: `boolean`):

After paging the main shop listing, also sweep five JD price bands (1-99, 100-499, 500-1999, 2000-4999, 5000+) to catch SKUs omitted from the default sort.

## `compareWithLastRun` (type: `boolean`):

Store each shop's itemId and price snapshot in a named key-value store and tag every product row with changeType: new, removed, price_up, price_down, or unchanged.

## `onlyChanges` (type: `boolean`):

When compareWithLastRun is enabled, output only new, removed, price_up, and price_down rows and skip unchanged items. Priced per output product row so daily watches of stable shops cost very little.

## `watchStoreName` (type: `string`):

Named Apify Key-Value Store used to persist per-shop snapshots between scheduled watch runs.

## `includeCoverageRows` (type: `boolean`):

Emit one shop_coverage row per shop showing productsRead vs announcedTotal, coverage ratio, stopReason, and watchSummary. Coverage rows are not charged as product rows.

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

Apify Proxy settings. Datacenter proxies work for public JD.com shop lists without login.

## Actor input object example

```json
{
  "shopUrls": [
    "https://mall.jd.com/index-1000000127.html"
  ],
  "maxPagesPerShop": 50,
  "maxItemsPerShop": 0,
  "usePriceBands": false,
  "compareWithLastRun": false,
  "onlyChanges": false,
  "watchStoreName": "jd-shop-catalog-watch",
  "includeCoverageRows": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "BUYPROXIES94952"
    ]
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "shopUrls": [
        "https://mall.jd.com/index-1000000127.html"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/jd-shop-catalog-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 = { "shopUrls": ["https://mall.jd.com/index-1000000127.html"] }

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/jd-shop-catalog-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 '{
  "shopUrls": [
    "https://mall.jd.com/index-1000000127.html"
  ]
}' |
apify call benthepythondev/jd-shop-catalog-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,benthepythondev/jd-shop-catalog-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/iCerg8rkr4DnB3mWl/builds/LQBczfGPFR6j0BEjW/openapi.json
