# JD Products Scraper | JD.com Prices, Brands and Barcodes (`aimen_ch/jd-products-scraper`) Actor

JD.com (京东) products scraper: search 京东商品 by keyword, shop page or SKU id and get the real CNY price, brand, model, UPC barcode, shop, review count and good rate, variants, stock and delivery promise. No JD account needed, export to CSV, Excel or JSON.

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

## Pricing

Pay per event

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 Products Scraper | JD.com Prices, Brands and Barcodes

Turn **JD.com (京东)**, China's largest retailer, into a clean product table. Search 京东商品 by keyword, JD address, shop or SKU id and get one row per product: the real price in yuan, brand, model, UPC/EAN barcode, shop, review count and good rate, all variants, stock, delivery promise, return policy, warranty, sales rank, size, weight and photos.

**80 fields per product. No JD account, no Chinese needed to read the columns. Export to CSV, Excel or JSON.**

- **Fast.** On Apify, on 23 November 2026, `华为手机` with 50 products took **25 seconds**, 300 products from three keywords took **78 seconds** and 2,000 products from four keywords **under 6 minutes**, each product completed from its own product page.
- **Search price and product page in one row.** On the 50-product run, 65 fields were filled on at least half of the rows. All 50 rows had a live price, brand, color, variants and stock, 47 had a delivery promise and 44 a size. (Pre-orders with no public price come back with `price: null`.)
- **Barcodes you can join on.** The `upc` column carries JD's EAN/UPC barcode wherever the seller publishes one. JD self-operated stores (京东自营) almost always do; small resellers often leave it empty.
- **Keywords, addresses, SKU ids and shop ids in the same run,** each with its own cap. A product found twice is saved once.
- **Filters beyond a price band:** JD self-operated only, brands, shops to include or exclude, minimum reviews and good rate, 百亿补贴, interest-free, in stock, with barcode and 国补. Products the filters drop are never charged.
- **Built-in price tracking:** schedule the same input and every row says its previous price, the change in yuan and percent, and whether the product is new. With `onlyChanged` you get, and pay for, only new and repriced products.
- **Price bands filtered by JD itself:** JD's own search applies the band, so no pages are spent on products outside it. ¥1,000–3,000 phones took 4 search pages and 14 seconds for 100 products.
- **Cheaper, and fair:** $1.99 per 1,000 products. Rows JD only half showed cost half (including SKU ids whose price JD did not show), and SKU ids JD returned nothing for cost nothing.

### Quick start

Paste this in the JSON tab, or keep the prefilled form, and press **Start**:

```json
{
    "keywords": ["华为手机"],
    "maxItems": 50,
    "includeDetails": true
}
```

Each product lands as one row of the dataset. Open it as a table, download it as CSV, Excel or JSON, or read it from the API. Swap `华为手机` for any product words: `iphone 17`, `lego`, `奶粉`, `茅台`, `dyson`.

### Examples

**Products JD shows for a keyword**

```json
{ "keywords": ["iphone 17"], "maxItems": 30 }
```

English works: JD matches it against its titles. Chinese words (苹果手机) match the way JD shoppers search and give the widest results.

**A JD shop's catalog**

```json
{ "startUrls": [{ "url": "https://mall.jd.com/index-1000004259.html" }], "maxItems": 50 }
```

`"shopIds": ["1000004259"]` does the same with the bare id. On our test run, 华为京东自营旗舰店 gave 30 priced products, product pages off, in a 5-second run shared with two keyword searches.

**Refresh the price of SKUs you already track**

```json
{ "productIds": ["100320690657", "100256400499", "4806379"] }
```

**Sweep a category fast (search fields only)**

```json
{ "keywords": ["奶粉"], "maxItems": 300, "includeDetails": false }
```

On our test run, this gave 300 products, all priced, in 22 seconds.

**Only JD self-operated phones with a high good rate, in a price band**

```json
{ "keywords": ["手机"], "selfOperatedOnly": true, "minGoodRate": 97, "excludeShops": ["二手"], "minPrice": 1000, "maxPrice": 3000, "maxItems": 60, "includeDetails": false }
```

On our test run this returned 60 products from 11 JD self-operated shops in 18 seconds, every one with a good rate of 97% or more and a price between ¥1,099 and ¥2,999.

**Products you can match to your catalogue (in stock, with barcode)**

```json
{ "keywords": ["华为手机"], "inStockOnly": true, "withBarcodeOnly": true, "maxItems": 50 }
```

**Track prices every day**

```json
{ "keywords": ["奶粉"], "maxItems": 200, "includeDetails": false, "trackChanges": true, "onlyChanged": true }
```

Schedule this input daily from the Schedules tab. The first run saves every product as new. Each later run saves only products that are new to the search or whose price moved, with `previousPrice`, `priceChange` and `priceChangePercent`; unchanged products are skipped and not charged. Open the **Price changes** view of the dataset to see them.

**A price band across several searches**

```json
{ "keywords": ["iphone 17"], "startUrls": [{ "url": "https://search.jd.com/Search?keyword=lego&enc=utf-8" }], "minPrice": 300, "maxPrice": 8000, "maxItems": 30 }
```

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `keywords` | array of strings | `["华为手机"]` (prefill) | Words to search on JD, one search per line, Chinese or English. A 6–15 digit number is read as a SKU id. |
| `startUrls` | array of URLs | – | JD product pages, search pages and shop pages. A search address keeps its own price range (`ev=exprice_1000-3000`). |
| `productIds` | array of strings | – | JD SKU ids, one row each. |
| `shopIds` | array of strings | – | JD shop ids (`1000004259`): the shop's catalog. |
| `maxItems` | integer | 50 | Products per keyword, search address or shop, up to 5,000. Products the filters drop free their slot; with `onlyChanged`, unchanged products still count. A SKU id always gives one row. |
| `minPrice` / `maxPrice` | integer (CNY) | – | Price band for keyword searches and shops. |
| `selfOperatedOnly` | boolean | false | Keep only products sold by JD itself (京东自营). |
| `brands` | array | – | Brand ids (`8557`) or parts of brand names (`华为`, `apple`). |
| `includeShops` / `excludeShops` | array | – | Shop ids or parts of shop names to keep or drop (`旗舰店`, `二手`). |
| `minReviews` / `minGoodRate` | integer | – | Minimum review count (5万+ counts as 50,000) and good rate in %. |
| `billionSubsidyOnly` / `interestFreeOnly` | boolean | false | Keep only 百亿补贴 products, or products with interest-free installments. |
| `inStockOnly` / `withBarcodeOnly` / `governmentSubsidyOnly` | boolean | false | Keep only products in stock, with a UPC/EAN barcode, or eligible for 国补. These need the product page and turn it on. |
| `trackChanges` | boolean | false | Remember prices between runs and fill `previousPrice`, `priceChange`, `priceChangePercent`, `isNew`, `firstSeenAt`. |
| `onlyChanged` | boolean | false | With tracking: save only new and repriced products. `maxItems` still counts every product checked. |
| `trackingStoreName` | string | `jd-price-history` | The key-value store in your account that keeps the history. Use one name per schedule. |
| `includeDetails` | boolean | true | Open each search result's product page for brand, model, barcode, variants, stock, delivery, returns, warranty, rank, size, weight and photos. Off: price, shop and review fields only, much faster. |
| `proxyConfiguration` | object | auto | Leave empty: search and shop pages go direct and switch to Apify datacenter, then residential proxy, only when JD blocks them. Product pages always use residential proxy (JD blocks datacenter IPs on them). |

**Accepted addresses:**

- **Product pages:** `item.jd.com/{id}.html`, `item.m.jd.com/product/{id}.html`, `item.m.jd.com/ware/view.action?wareId={id}`, `npcitem.jd.hk/{id}.html`, `item.jd.hk/{id}.html` and `wqitem.jd.com/item/view?sku={id}`.
- **Search pages:** `search.jd.com/Search?keyword=…`, `re.jd.com/search?keyword=…` and `so.m.jd.com/ware/search.action?keyword=…`.
- **Shop pages:** `mall.jd.com/index-{shopId}.html`, `shop.m.jd.com/shop/home?shopId=…` and brand domains such as `huawei.jd.com`.

Lines that are none of these are skipped with a message in the log, and the rest of the run goes on.

### Output

One row = one JD SKU (one color and size of a phone, one pack size of a milk powder). Absent values are `null`. Text values are in Chinese, as JD shows them.

| Group | Fields |
|---|---|
| Identity | `id`, `productId`, `url`, `mobileUrl`, `title`, `shortTitle` |
| Product | `brand`, `brandId`, `model`, `upc`, `seriesId`, `categoryId`, `categoryIds`, `color`, `size`, `variantAttributes`, `variantCount`, `variants` |
| Seller | `shopId`, `shopName`, `shopUrl`, `venderId`, `isSelfOperated` (京东自营), `isFlagshipStore`, `isJdSupermarket` |
| Price | `price`, `currency`, `installmentOffer`, `installmentMonths`, `isInterestFree`, `isLowestPrice`, `isGovernmentSubsidy` (国补), `isBillionSubsidy` (百亿补贴), `isFlashSale`, `isPresale`, `promoTags`, `vatRatePercent`, `purchaseType` |
| Reviews | `reviewsCount`, `reviewsCountText` ("5万+"), `goodRate`, `reviewTags`, `sellingPoints` |
| Stock and delivery | `isOnSale`, `inStock`, `stockState`, `stockQuantity`, `maxOrderQuantity`, `purchaseLimit`, `deliveryPromise`, `shippingFee`, `isFreeShipping`, `returnPolicy`, `isSevenDayReturn`, `services`, `serviceTags`, `warranty` |
| Badges and rank | `isNewArrival`, `isSuperNewLaunch`, `isLiveStreaming`, `isCrossBorder`, `salesRank`, `salesRankPosition` |
| Size | `weightKg`, `lengthMm`, `widthMm`, `heightMm` |
| Media | `imageUrl`, `images`, `badgeUrl`, `hasVideo` |
| Price tracking | `previousPrice`, `priceChange`, `priceChangePercent`, `isNew`, `firstSeenAt` (null unless `trackChanges` is on) |
| Context | `listedAt`, `searchQuery`, `position`, `scrapedAt` |

**Example** (a row asked for by SKU id, 22 November 2026, images shortened):

```json
{
  "id": "100248562389",
  "productId": "100248562389",
  "url": "https://item.jd.com/100248562389.html",
  "mobileUrl": "https://item.m.jd.com/product/100248562389.html",
  "title": "华为畅享 90 Plus 128GB星海蓝 麒麟8系芯片关怀模式鸿蒙AI防诈6620mAh巨鲸大电池柔光护眼直屏手机",
  "shortTitle": "华为畅享 90 Plus智能手机",
  "brand": "华为（HUAWEI）",
  "brandId": "8557",
  "model": "畅享 90 Plus",
  "upc": "6942103189135",
  "seriesId": "1307476",
  "categoryId": "655",
  "categoryIds": ["9987", "653", "655"],
  "color": "星海蓝",
  "size": "128GB",
  "variantAttributes": { "外观": "星海蓝", "存储容量": "128GB", "自定义": "标准版" },
  "variantCount": 6,
  "variants": [
    { "id": "100331677410", "color": "羽沙白", "size": "128GB", "spec": "标准版" },
    { "id": "100331677352", "color": "羽沙白", "size": "256GB", "spec": "标准版" },
    { "id": "100248562389", "color": "星海蓝", "size": "128GB", "spec": "标准版" }
  ],
  "shopId": "1000004259",
  "shopName": "华为京东自营旗舰店",
  "shopUrl": "https://mall.jd.com/index-1000004259.html",
  "venderId": "1000004259",
  "isSelfOperated": true,
  "isFlagshipStore": true,
  "isJdSupermarket": false,
  "price": 1419,
  "currency": "CNY",
  "isGovernmentSubsidy": true,
  "isPresale": false,
  "vatRatePercent": 13,
  "purchaseType": "normalPurchase",
  "reviewsCount": 100000,
  "reviewsCountText": "10万+",
  "goodRate": 98,
  "isOnSale": true,
  "inStock": true,
  "stockState": "in_stock",
  "stockQuantity": 246,
  "maxOrderQuantity": 999,
  "deliveryPromise": "23:10前付款，预计明天(11月23日)送达",
  "shippingFee": "所选地址自营订单满59元免基础运费(20kg内)，超出重量加收1元/kg续重运费。",
  "isFreeShipping": true,
  "returnPolicy": "7天无理由退货",
  "isSevenDayReturn": true,
  "services": ["90天只换不修", "一年质保", "7天价保", "365天原厂维修"],
  "serviceTags": ["明日达", "211限时达", "极速达", "7天无理由退货", "预约送货", "部分收货", "送货上门", "59元免基础运费", "7天价保", "365天原厂维修"],
  "warranty": "1年质保",
  "isNewArrival": true,
  "isCrossBorder": false,
  "salesRank": "128GB存储手机热卖榜第20名",
  "salesRankPosition": 20,
  "weightKg": 0.5,
  "lengthMm": 188,
  "widthMm": 96,
  "heightMm": 66,
  "imageUrl": "https://img14.360buyimg.com/n0/jfs/t1/570703/31/12064/158383/6af95844F3301290f/00835a05a000efb6.jpg",
  "hasVideo": true,
  "listedAt": "2026-05-20T15:39:22Z",
  "searchQuery": "100248562389",
  "position": null,
  "scrapedAt": "2026-11-22T08:26:00Z"
}
```

Good to know:

- `id` is JD's SKU and never changes. `url` and `mobileUrl` are built from it.
- `price` is in yuan (CNY): the price a signed-out shopper sees in JD's search, before checkout coupons.
- `reviewsCount` turns JD's rounded counts into numbers (`5万+` → 50000). `reviewsCountText` keeps JD's wording.
- Search-only badges (installments, low-price, billion-subsidy and promotion badges, review tags) are filled for search results. On rows asked for by SKU id or from a shop's product links they are null unless JD's search lists the product.
- `listedAt` and `scrapedAt` are RFC 3339 dates in UTC. JD shows China time.

### FAQ

**Do I need a JD account or a Chinese phone number?** No. The actor reads what any signed-out visitor sees.

**Is the price the real one?** Yes. JD masks the price on product pages for signed-out visitors (it shows `1??9`), so the actor takes it from JD's search, where it is shown in full. A product asked for by SKU id is looked up in JD's search by its own title. When JD's search does not list that exact SKU, the row ships with `price: null` and every other field filled, and the log says how many. Pre-orders without a public price are always null. On our 12-SKU test run, 9 came back priced.

**Can I scrape a whole JD shop?** Yes. Paste the shop's address or give its shop id. The actor lists the shop's products from JD's search (priced), then the product links of the shop's home page (completed from their product pages), up to `maxItems` per shop.

**Can I get the text of the reviews?** No. JD shows review texts only to signed-in shoppers. Each row carries what JD shows everyone: review count, good rate and, for search results, the review tags.

**How many products can one keyword return?** The actor reads JD's results page after page until your `maxItems`, the end of the results, or three pages in a row with nothing new. Broad keywords easily give several hundred products: `奶粉` gave 300 in 22 seconds with product pages off.

**What happens when a product page does not load?** The product still ships as a row with its price, shop, reviews and photo, charged as a cheaper partial row. The product page fields stay null, and the log says how many rows were saved that way. A SKU id whose product page loaded but whose price JD did not show in search is charged as a partial row too. A SKU id for which JD showed nothing at all ships with its id and addresses only, free of charge.

**What if JD changes its pages?** The actor recognises JD's anti-bot answers and retries them through another IP. A page that loads but has none of the data the actor knows is reported as an unknown layout in the log and the status message, and is not retried. We run a daily monitoring run that fails on such changes, so they get fixed quickly.

**What do isSelfOperated, isGovernmentSubsidy and isBillionSubsidy mean?** `isSelfOperated` is true when JD itself sells and ships the product (京东自营). `isGovernmentSubsidy` marks listings eligible for China's national trade-in subsidy (国补). `isBillionSubsidy` marks JD's 百亿补贴 program.

**Do filters apply to SKU ids?** No. Products you ask for by SKU id or product address are always returned; filters and the price band apply to keyword searches, search addresses and shops.

**Why are some products "new" on every tracking run?** JD shows a broad search in a slightly different order each time, so a run with a small `maxItems` meets some products it has not seen before. Use a narrower keyword, a higher `maxItems`, or track a fixed list of SKU ids for a stable set.

### Pricing

Pay per result, platform usage included:

| Event | Price |
|---|---|
| Product (complete row) | $1.99 per 1,000 (Store discounts: $1.89 Bronze, $1.79 Silver, $1.69 Gold) |
| Partial product (product page asked for and JD did not show it, or a SKU id with no price) | $0.99 per 1,000 ($0.94 Bronze, $0.89 Silver, $0.84 Gold) |
| SKU id JD showed nothing for | free |
| Run start | $0.005 at the default 4 GB of memory ($0.00125 per GB) |

You can cap the cost of a run with the maximum charge setting: the actor stops cleanly when it is reached.

### Legal

This actor extracts publicly available product data from JD.com: prices, product details, shop names and aggregated review figures. It does not log in, bypass a paywall or solve CAPTCHAs, and it collects no personal data about shoppers or reviewers. You are responsible for complying with JD.com's terms and applicable data protection laws (GDPR, CCPA, China's PIPL). JD.com and 京东 are trademarks of their owner; this actor is not affiliated with JD.com.

# Actor input Schema

## `keywords` (type: `array`):

What to search on JD.com, one search per line, in Chinese or English: 华为手机, iphone 17, lego, 奶粉. Chinese words match the way JD shoppers search and give the widest results. A JD SKU number typed here is read as a product id.

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

Or paste addresses copied from JD: a product page (https://item.jd.com/100320690657.html, https://item.m.jd.com/product/100320690657.html, https://npcitem.jd.hk/…) gives that product; a search page (https://search.jd.com/Search?keyword=茅台, https://re.jd.com/search?keyword=lego) gives its results, keeping the price range of the address; a shop page (https://mall.jd.com/index-1000004259.html, https://shop.m.jd.com/shop/home?shopId=1000004259, a brand domain such as https://huawei.jd.com/) gives the shop's catalog.

## `productIds` (type: `array`):

Or give JD product SKU ids, one per line: the number in a product address (100320690657 in item.jd.com/100320690657.html), the same as the id column of the results. Each id gives one row.

## `shopIds` (type: `array`):

Or give JD shop ids, one per line, to get each shop's catalog: the number in a shop address (1000004259 in mall.jd.com/index-1000004259.html), the same as the shopId column of the results. The cap below applies to each shop.

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

How many products to save for each keyword, search address or shop. A product id or product address always gives one row. Up to 5,000 per search or shop.

## `minPrice` (type: `integer`):

Lowest price to keep, in yuan, for keyword searches and shops. Leave empty for no floor.

## `maxPrice` (type: `integer`):

Highest price to keep, in yuan, for keyword searches and shops. Leave empty for no ceiling.

## `includeDetails` (type: `boolean`):

Open each search result's product page to add the brand, model, UPC barcode, color and size, all variants, photos, stock, delivery promise, shipping fee, return policy, warranty, service guarantees, sales rank, size and weight. Turn off for the price, shop and review fields only: faster. Products asked for by SKU id or found on a shop page always open their product page.

## `selfOperatedOnly` (type: `boolean`):

Keep only products sold and shipped by JD itself. Applies to keyword searches and shops; SKU ids are always returned.

## `brands` (type: `array`):

Keep only these brands: a brand id (8557, the brandId column) or part of the brand name as JD writes it (华为, HUAWEI, apple).

## `includeShops` (type: `array`):

Keep only products of these shops: a shop id (1000004259) or part of the shop name (旗舰店, 华为京东自营).

## `excludeShops` (type: `array`):

Drop products of these shops: a shop id or part of the shop name (二手, 专营店).

## `minReviews` (type: `integer`):

Keep only products with at least this many reviews (JD's rounded count: 5万+ counts as 50,000).

## `minGoodRate` (type: `integer`):

Keep only products whose good rate is at least this (98 keeps 98% and up).

## `billionSubsidyOnly` (type: `boolean`):

Keep only products in JD's billion-yuan subsidy program.

## `interestFreeOnly` (type: `boolean`):

Keep only products JD offers with interest-free installments (免息).

## `inStockOnly` (type: `boolean`):

Keep only products in stock or available to order. Needs the product page, so it turns product page details on.

## `withBarcodeOnly` (type: `boolean`):

Keep only products with a UPC/EAN barcode, for catalogue matching. Needs the product page.

## `governmentSubsidyOnly` (type: `boolean`):

Keep only products eligible for China's national trade-in subsidy (国补). Needs the product page.

## `trackChanges` (type: `boolean`):

Remember each product's price between runs and add previousPrice, priceChange, priceChangePercent, isNew and firstSeenAt to every row. Schedule the same input daily to follow prices.

## `onlyChanged` (type: `boolean`):

With tracking: save only products new since the last run or whose price changed. Unchanged products are not saved and not charged. Max products still counts every product checked.

## `trackingStoreName` (type: `string`):

Name of the key-value store in your account that keeps the price history. Use one name per schedule you track.

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

Leave empty: search and shop pages go direct and move up to Apify datacenter, then residential proxy, only when JD blocks them; product pages always use Apify residential proxy, because JD blocks datacenter IPs on them. Set a proxy to use it for every request.

## `maxConcurrency` (type: `integer`):

Number of JD pages fetched in parallel. Each page mostly waits on the proxy, so more in parallel is faster and cheaper; lower it only if JD starts blocking. 50 needs the default 4 GB of memory (more memory gives the run more CPU).

## `qualityCheck` (type: `object`):

For monitoring runs: the run fails when its data falls below these thresholds, so a scheduled run alerts you when JD changes. Keys: minRows, minPricedShare (0–1), minDetailedShare (0–1), minFieldsFilled (fields filled on half the rows). Pages with an unknown layout always fail the check. Leave empty for normal runs.

## Actor input object example

```json
{
  "keywords": [
    "华为手机"
  ],
  "maxItems": 50,
  "includeDetails": true,
  "selfOperatedOnly": false,
  "billionSubsidyOnly": false,
  "interestFreeOnly": false,
  "inStockOnly": false,
  "withBarcodeOnly": false,
  "governmentSubsidyOnly": false,
  "trackChanges": false,
  "onlyChanged": false,
  "trackingStoreName": "jd-price-history",
  "maxConcurrency": 50
}
```

# Actor output Schema

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

All products: photo, id, title, brand, model, price, shop, reviews, stock and links. Every field is in the dataset; this view shows the main ones.

## `barcodes` (type: `string`):

The same products with their UPC/EAN barcode, product family id and variants, for matching to a catalogue.

## `priceChanges` (type: `string`):

Previous price, change in yuan and percent and whether the product is new. Filled when trackChanges or onlyChanged is on.

## `summary` (type: `string`):

Counts for the run: rows, priced, with product page, partial and free rows, products checked and saved per keyword or shop, proxy requests and the quality check result.

# 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 = {
    "keywords": [
        "华为手机"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("aimen_ch/jd-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 = { "keywords": ["华为手机"] }

# Run the Actor and wait for it to finish
run = client.actor("aimen_ch/jd-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 '{
  "keywords": [
    "华为手机"
  ]
}' |
apify call aimen_ch/jd-products-scraper --silent --output-dataset

```

## MCP server setup

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