# JD.com Product Details Scraper (`sleepmodesystems/jd-com-product-details-scraper`) Actor

\[💰 $2.99 / 1K products] Paste JD.com (京东) product links or SKU ids and get complete rows: real CNY price, brand, model, UPC barcode, every variant, stock, delivery promise, review count and good rate. No JD account. Export JSON, CSV or Excel.

- **URL**: https://apify.com/sleepmodesystems/jd-com-product-details-scraper.md
- **Developed by:** [Sleep Mode Systems](https://apify.com/sleepmodesystems) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.54 / 1,000 products

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

**\[💰 $2.99 per 1,000 products]** Paste JD.com (京东) product links or SKU ids and get each product complete, with the real price in yuan, barcode, every variant, stock and delivery promise: 100 products in about 30 seconds.

### What can JD.com Product Details Scraper do?

JD.com Product Details Scraper **turns JD.com product links or SKU ids into complete rows** (https://www.jd.com): paste the links you collected or the SKU ids you track and get the real price in yuan, brand, model, UPC barcode, every variant SKU of the product, stock code and quantity, delivery promise, returns, warranty, services, review count and good rate, sales rank, size, weight and VAT. No JD account, no Chinese phone number, no proxy, nothing to set up.

<table>
<tr>
<th>📦 What you can extract</th>
<th>⚙️ Features & integrations</th>
</tr>
<tr>
<td valign="top">

💴 **Real price in yuan**, not JD's masked `6??8` <br>
🏷️ **Every variant**: color, size, spec, photo <br>
📦 **Stock** code and quantity, delivery promise <br>
🔢 **UPC barcode**, brand, model, category <br>
⭐ **Review count** and good rate <br>
🧾 **Services**, warranty, VAT, size and weight

</td>
<td valign="top">

🔗 **Links or SKU ids**: item.jd.com, mobile, JD Worldwide <br>
⚡ **100 products in about 30 seconds** <br>
⏰ **Scheduling** for daily price tracking <br>
⬇️ **Export data** to JSON, CSV, Excel or XML <br>
🦾 **API access, webhooks**, Node.js & Python <br>
🤖 **LLM-ready data** for MCP, Claude, ChatGPT

</td>
</tr>
</table>

If you track prices on JD, match JD listings to your catalogue by barcode, or check what a list of products costs in China, you can get it all from a single tool.

### What data can I scrape from JD.com products?

One **complete row per product**:

- **Price:** *what it costs on JD.* The price in yuan a shopper sees before checkout coupons, never the masked price JD shows signed-out visitors on product pages.
- **Product:** *what it is.* Title and short title, brand, model, UPC barcode, category ids, sale date, photos, size, weight and VAT rates.
- **Variants:** *what a shopper can pick.* This SKU's color, size and spec, every option JD offers for each, and every variant SKU of the product with its photo.
- **Stock and delivery:** *whether it ships.* JD's stock code and quantity, the delivery promise, shipping rule, return policy, warranty, services with JD's description, purchase limits.
- **Shop and reviews:** *who sells it and what buyers think.* Shop name and id, seller id, JD's review count ("1万+") and good rate, and the JD sales list it ranks on.

Fill rates over 100 products by SKU id: price, good rate, variants, stock, shop, category, size and weight, VAT and services 100%; delivery promise 97%; review count 93%; brand 92%; model 90%; barcode 76%; sales rank 54%; warranty 47%.

> Need more? This dedicated scraper covers other JD.com jobs:
>
> - 🛒 [JD.com Scraper](https://apify.com/sleepmodesystems/jd-com-scraper): search by keyword, product links and shops in one run, with JD's own filters

### How much will scraping JD.com products cost?

JD.com Product Details Scraper uses **pay-per-event** pricing: you pay for each product written to the dataset, and nothing else. The start fee is a fraction of a cent, platform usage is included, and SKU ids JD no longer has or links from other sites are not charged.

| Event | FREE | BRONZE | SILVER | GOLD |
|---|---|---|---|---|
| Product, complete: real price, barcode, every variant, stock, delivery, reviews (per 1,000) | $2.99 | $2.84 | $2.69 | $2.54 |
| Actor start | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

The tiers are Apify's discount tiers; the PLATINUM and DIAMOND tiers pay the GOLD price. Every field is in the product price: no add-ons.

#### Cost examples

| Scenario | Products | Cost (FREE) | Cost (GOLD) |
|---|---|---|---|
| Try it: 20 SKU ids | 20 | $0.06 | $0.05 |
| A sourcing list | 500 | $1.50 | $1.27 |
| 100 SKUs tracked every day for a month | 3,000 | $8.97 | $7.62 |
| A 10,000-SKU catalogue | 10,000 | $29.90 | $25.40 |

Set the run's maximum charge in Apify to cap spend: the actor stops cleanly and says how many products it delivered.

### How do I use JD.com Product Details Scraper?

<a href="https://console.apify.com/actors/tlH4XgLeQzhd8n2v7/input"><img src="https://raw.githubusercontent.com/sleepmodesystems/actor-readme-images/main/jd-com-product-details-scraper/jd-com-product-details-scraper-how-it-works.png" alt="How JD.com Product Details Scraper works: JD.com links in, complete products out" style="width:100%;"></a>

1. [Create](https://console.apify.com/sign-up) a free Apify account.
2. Open **[JD.com Product Details Scraper](https://console.apify.com/actors/tlH4XgLeQzhd8n2v7)** in Apify Console.
3. Paste your JD **product links or SKU ids**, one per line, or with **Bulk edit**.
4. Click **Save & Start**: 100 products take about 30 seconds.
5. Download the dataset as **JSON, CSV, Excel or XML**, or read it through the Apify API.

### ⬇️ Input

<a href="https://console.apify.com/actors/tlH4XgLeQzhd8n2v7/input"><img src="https://raw.githubusercontent.com/sleepmodesystems/actor-readme-images/main/jd-com-product-details-scraper/jd-com-product-details-scraper-input.png" alt="JD.com Product Details Scraper input form: product links or SKU ids" style="width:100%;"></a>

Paste product links or SKU ids: each one gives one complete row, and a product pasted twice is saved once.

| Paste this | And you get |
|---|---|
| A SKU id: `100320690657` | That product, complete |
| A link: `https://item.jd.com/100320690657.html` | That product, complete |
| A mobile link (`item.m.jd.com/product/…`) or a JD Worldwide link (`npcitem.jd.hk/…`) | That product, complete |
| A link from another site (Taobao, Amazon) | The run stops at once and names the line to fix; nothing charged |

```json
{
    "products": ["https://item.jd.com/100320690657.html", "100066291366", "100012043978"]
}
```

#### Input fields

| Field | Type | Default | Meaning |
|---|---|---|---|
| Products (SKU ids or links) (`products`) | list | – | JD product links or SKU ids, up to 10,000 |
| Minimum products (`minItems`) | number | 0 | Fail the run when fewer products come back (for monitoring) |

### ⬆️ Output

<a href="https://console.apify.com/actors/tlH4XgLeQzhd8n2v7/input"><img src="https://raw.githubusercontent.com/sleepmodesystems/actor-readme-images/main/jd-com-product-details-scraper/jd-com-product-details-scraper-output.png" alt="JD.com Product Details Scraper output: products with price, brand, barcode, stock and shop" style="width:100%;"></a>

Results land in the run's dataset: view them as a table, download them as JSON, CSV, Excel or XML, or read them through the API. The rows are the same as [JD.com Scraper](https://apify.com/sleepmodesystems/jd-com-scraper)'s, so datasets from both combine directly. Texts are in Chinese, as JD shows them.

#### 📦 JD.com product data sample

A phone read by its link (lists and long text shortened):

```json
{
  "skuId": "100320690657",
  "title": "HUAWEI Mate 90 12GB+512GB 曜石黑 麒麟9030 超可靠玄武架构 睿影红枫人像 华为手机",
  "price": 6998,
  "currency": "CNY",
  "url": "https://item.jd.com/100320690657.html",
  "imageUrl": "https://img14.360buyimg.com/n0/jfs/t1/585585/31/3791/118951/6af6e2bbFa03ea39f/00835a05a….jpg",
  "brand": "华为（HUAWEI）",
  "brandId": "8557",
  "model": "Mate 90",
  "upc": "6942711326083",
  "shopId": "1000004259",
  "shopName": "华为京东自营旗舰店",
  "venderId": "1000004259",
  "reviewCountText": "1万+",
  "goodRate": 99,
  "stockState": 33,
  "stockQuantity": 943,
  "deliveryPromise": "明天11:10前付款，预计<b>明天(11月17日)</b>送达",
  "shippingText": "所选地址此商品无门槛包邮，免基础运费和续重运费。",
  "returnPolicy": "7天无理由退货",
  "warranty": "1年质保",
  "services": [
    { "name": "7天价保", "description": "在下单后7天内，商品出现降价可享受价保服务…" }
  ],
  "serviceTags": [
    { "name": "211限时达", "tip": "上午下单，下午送达", "code": "sendpay_211" }
  ],
  "salesRank": { "list": "高端人士精选 手机榜", "position": 27, "listId": "5179998" },
  "color": "曜石黑",
  "size": "12GB+512GB",
  "spec": "标准版",
  "variantAttributes": { "外观": "曜石黑", "存储容量": "12GB+512GB", "选择版本": "标准版" },
  "variantOptions": {
    "外观": ["曜石黑", "零度白", "…"],
    "存储容量": ["12GB+512GB", "12GB+256GB", "…"]
  },
  "variants": [
    { "skuId": "100418660136", "color": "晶格绿", "size": "12GB+1TB", "spec": "标准版", "imageUrl": "https://img14.360buyimg.com/n0/jfs/t1/…" }
  ],
  "shortTitle": "HUAWEI Mate 90 麒麟9030",
  "spuId": "100418660168",
  "productId": "100320690657",
  "categoryIds": ["9987", "653", "655"],
  "saleDate": "2026-10-01 11:15:49",
  "skuStatus": 1,
  "weightKg": 0.55,
  "lengthMm": 189,
  "widthMm": 101,
  "heightMm": 68,
  "vat": { "input": 13, "output": 13, "consumption": 0 },
  "flags": { "sevenDayReturn": true, "newGoods": true, "prescription": false, "otc": false, "canUseDongQuan": true, "canUseJingQuan": false },
  "maxOrderQuantity": 999,
  "details": true,
  "scrapedAt": "2026-11-16T15:15:04Z"
}
```

#### Fields

Source: **JD** = JD's value unchanged. **Decoded** = JD's value turned into a number, date or full link. **Fixed** = the same in every row. Missing values are `null`, never an empty string.

| Field | Source | Meaning |
|---|---|---|
| `skuId` | JD | JD's SKU id; never changes |
| `title`, `shortTitle` | JD | Title and short title as JD shows them |
| `price` | Decoded | Price in yuan a shopper sees; checkout coupons not included |
| `currency` | Fixed | `CNY` |
| `url` | Decoded | The product page on JD.com |
| `imageUrl`, `images` | Decoded | Photos, full size |
| `brand`, `brandId`, `model` | JD | Brand and model |
| `upc` | JD | Barcode JD records for the SKU |
| `shopId`, `shopName`, `venderId` | JD | Shop and seller (the seller id is not always the shop id) |
| `reviewCountText` | JD | Review count as JD writes it ("1万+") |
| `goodRate` | Decoded | Share of good reviews, percent |
| `stockState` | JD | JD's stock code: 33 in stock, 40 available to order, 34 out of stock, 36 pre-order |
| `stockQuantity` | JD | Stock quantity JD shows; -1 when JD doesn't count it |
| `deliveryPromise`, `shippingText`, `returnPolicy`, `warranty` | JD | Delivery promise (none on pre-order products), shipping rule, return policy, warranty |
| `services` | JD | Services with JD's description |
| `serviceTags` | JD | Service badges with JD's tip and code |
| `salesRank` | JD | The sales list, the position on it and its id |
| `color`, `size`, `spec`, `variantAttributes` | JD | This SKU's variant values |
| `variantOptions` | JD | Every option JD offers for each attribute |
| `variants` | JD | Every variant SKU of the product with its color, size, spec and photo |
| `spuId`, `productId`, `seriesId`, `categoryIds` | JD | Product group, series and category ids |
| `saleDate`, `skuStatus` | JD | Sale date (China time) and JD's status (1 on sale) |
| `weightKg`, `lengthMm`, `widthMm`, `heightMm` | Decoded | Weight and package size |
| `vat` | Decoded | VAT rates: input, output, consumption |
| `flags` | Decoded | sevenDayReturn, overseasPurchase, newGoods, prescription, otc, dangerousGoods, canUseDongQuan, canUseJingQuan |
| `purchaseLimit`, `maxOrderQuantity` | JD | Per-customer limit and most units per order |
| `bankPromotion`, `videoIds` | JD | Bank promotion text, JD video ids |
| `badges`, `reviewTags`, `installments`, `promoTags`, `sellingPoint`, `listedAt` | JD | Shown on JD's search results: filled on rows found by a search in [JD.com Scraper](https://apify.com/sleepmodesystems/jd-com-scraper); `null` here |
| `searchTerm`, `fromShop`, `position` | Fixed | Filled on rows found by a search or a shop in [JD.com Scraper](https://apify.com/sleepmodesystems/jd-com-scraper); `null` here |
| `details` | Fixed | `true`: the row has the product page fields |
| `scrapedAt` | Fixed | When the run read the product (UTC) |

#### Run summary

Every run saves a `SUMMARY` record in its key-value store. This one is a list of 100 SKU ids:

```json
{
  "products": 100,
  "productsWithProductPage": 100,
  "productPageNotShownByJD": 0,
  "priceNotShownByJD": 0,
  "skuIdsNotOnJD": [],
  "durationSec": 29
}
```

`skuIdsNotOnJD` lists SKU ids JD no longer has: they are not charged. A run is suspect when `productPageNotShownByJD` or `priceNotShownByJD` is high: JD did not show those pages this time, and the rows came without those fields. Set `minItems` to make a short run fail outright.

#### 📝 Notes and limits

- **The price is the real one.** JD masks prices for signed-out visitors on product pages (`6??8`); every row carries the price JD's own price pages show, before checkout coupons.
- **A SKU is one variant.** The same phone in another color or storage size is another SKU; `variants` lists them and `variantOptions` names every option. Paste each SKU you want a full row for.
- **Review counts are JD's rounded text** ("1万+"), kept as JD writes it; `goodRate` is JD's share of good reviews.
- **Review texts** are shown to signed-in shoppers only; this actor never logs in.
- **Prices move during promotions** (618 in June, Double 11 in November): schedule runs as often as you need a fresh price.

### What can you do with JD.com product data?

#### 💴 [Track JD prices and stock every day](https://apify.com/sleepmodesystems/jd-com-product-details-scraper/examples/jd-sku-daily-price-stock-tracker)

Brands and resellers follow the SKUs they care about: their own listings, their resellers', their competitors'.

**Recipe:**

1. Paste the SKU ids or links in **Products** and save it as an Apify task.
2. Schedule it daily, and send each run's dataset to Google Sheets, your database or Slack.
3. Compare `price`, `stockState` and `deliveryPromise` by `skuId` with the previous day.

100 SKUs tracked every day for a month cost about $9.

#### 🔢 [Match JD listings to your catalogue by barcode](https://apify.com/sleepmodesystems/jd-com-product-details-scraper/examples/jd-barcode-catalogue-match)

Brands and distributors check that JD sells their products under the right barcode, brand and model.

**Recipe:**

1. Paste the SKUs that carry your brand.
2. Join the dataset to your catalogue on `upc`, then check `brand`, `model` and `title`.
3. Rows whose `upc` is missing or not yours are the listings to look at.

20 products cost about $0.06.

#### 🌏 [Compare China prices for a sourcing list](https://apify.com/sleepmodesystems/jd-com-product-details-scraper/examples/jd-china-price-check-sourcing)

Cross-border buyers and importers check what a list of products sells for in China before they buy or price it abroad.

**Recipe:**

1. Paste the products on your list.
2. Take `price`, `variantOptions`, `weightKg` and the package size for each, and convert yuan at today's rate.
3. Use `stockState` and `deliveryPromise` to keep only what JD can deliver now.

500 products cost about $1.50.

### JD.com product scrapers compared

| | JD.com Product Details Scraper | bakos_bence | silentflow |
|---|---|---|---|
| Price per 1,000 products (FREE) | $2.99 | $2.19 | $2.19 |
| Start fee per run | $0.00005 | $0.01 | $0.005 |
| Real price, not `6??8` | ✅ | ❌ | ✅ |
| 2 products by SKU id | 4.8 s | 18.1 s | – |
| Stock code read right (33 = in stock) | ✅ | ❌ | ✅ |
| Review count and good rate | ✅ | ❌ | ✅ |
| Every variant SKU, every option | ✅ | partly | ✅ |
| Services with JD's descriptions, service tips | ✅ | ❌ | ❌ |
| Barcode, size, weight, VAT | ✅ | ✅ | ✅ |

### Want to get other data from JD.com?

You can use the other dedicated JD.com scraper below:

<table>
<tr>
<td>🛒 <a href="https://apify.com/sleepmodesystems/jd-com-scraper">JD.com Scraper</a></td>
</tr>
</table>

> Want more Chinese marketplaces? [Taobao & Tmall Scraper](https://apify.com/sleepmodesystems/taobao-scraper) for Taobao and Tmall, [1688 Scraper](https://apify.com/sleepmodesystems/1688-scraper) for factory prices, [AliExpress Scraper](https://apify.com/sleepmodesystems/aliexpress-scraper) and [Alibaba Scraper](https://apify.com/sleepmodesystems/alibaba-scraper) for export, [Goofish Scraper](https://apify.com/sleepmodesystems/goofish-scraper) for second-hand (闲鱼).

### 🤖 AI agents and MCP

JD.com Product Details Scraper is a ready tool for AI agents through the [Apify MCP server](https://mcp.apify.com/). Add this server to Claude (desktop, web or Code), ChatGPT, Cursor or any MCP client:

```
https://mcp.apify.com/?tools=sleepmodesystems/jd-com-product-details-scraper
```

For a client that takes a JSON config:

```json
{
  "mcpServers": {
    "jd-com-product-details": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.apify.com/?tools=sleepmodesystems/jd-com-product-details-scraper"]
    }
  }
}
```

Then ask, for example:

- *"Here are 10 JD links: give me a table with the price, stock and delivery promise of each."*
- *"What is the barcode, model and weight of JD SKU 100320690657?"*
- *"Which variants does this JD product come in? https://item.jd.com/100320690657.html"*

The video shows how to connect Apify to Claude with MCP:

https://www.youtube.com/watch?v=BKu8H91uCTg

#### Why agents should choose JD.com Product Details Scraper

- **Complete in one call.** The real price, barcode, every variant, stock, delivery and reviews for each product.
- **Fast enough for a chat.** A couple of products in about 5 seconds; the run starts in about 0.1 seconds.
- **Links or bare SKU ids.** item.jd.com, mobile and JD Worldwide links, or the id.
- **Errors an agent can act on.** SKU ids JD no longer has are listed in the summary with nothing charged; a line that is not a JD product is named in the run's message.
- **Clear price.** $2.99 per 1,000 products (FREE tier), everything included.

#### Quick reference for AI agents

- **Actor:** `sleepmodesystems/jd-com-product-details-scraper`
- **Does:** one complete dataset row per JD.com product link or SKU id, prices in Chinese yuan (CNY).
- **Smallest input:** `{"products": ["100320690657"]}`.
- **Each row has:** `skuId`, `url`, `title`, `price`, `brand`, `model`, `upc`, `stockState`, `stockQuantity`, `deliveryPromise`, `variants`, `variantOptions`, `shopName`, `reviewCountText`, `goodRate`, `imageUrl`.
- **Fields that can be `null`:** `upc`, `model`, `warranty` and `salesRank` where JD has none; search-only fields (`badges`, `reviewTags`, `position`).
- **The run summary** is the `SUMMARY` record in the run's key-value store: products, products with their product page, SKU ids not on JD.

### ❓ Frequently Asked Questions

#### Do I need a JD account, a Chinese phone number or proxies?

No. The actor reads what any signed-out shopper sees and handles access to JD.com itself; there is nothing to set up.

#### Is the price the real one?

Yes. JD shows signed-out visitors a masked price on product pages (`6??8`); every row carries the price JD's own price pages show. Checkout coupons are not included.

#### Which links does it accept?

item.jd.com links, mobile links (`item.m.jd.com/product/…`), JD Worldwide links (`npcitem.jd.hk/…`) and bare SKU ids. A line that is not a JD product stops the run at once, before anything is charged, and the run's message names it so you can fix it.

#### Can I get review texts?

JD shows individual reviews only to signed-in shoppers, and this actor never logs in. Each row has what JD shows everyone: the review count and the good rate.

#### How fast is it?

A couple of products in about 5 seconds, 100 in about 30 seconds. A run starts in about 0.1 seconds.

#### Can I search JD or read a shop?

Use [JD.com Scraper](https://apify.com/sleepmodesystems/jd-com-scraper) to search by keyword, with JD's price, JD Logistics and national subsidy filters, or to read a shop, with the same complete rows.

#### Is it legal to scrape JD.com?

This actor reads product data JD.com shows publicly to anyone, without logging in. It collects no personal data about shoppers or reviewers. You are responsible for how you use the data, including JD's terms and any law that applies to you; see Apify's [guide to web scraping legality](https://blog.apify.com/is-web-scraping-legal/). JD.com Product Details Scraper is an independent tool by Sleep Mode Systems, not affiliated with, endorsed by or sponsored by JD.com; JD.com and 京东 are trademarks of their owner.

#### Can I integrate JD.com data with other apps?

Yes. Use Apify Schedules, and an integration or webhook to send each run's dataset to Google Sheets, Make, Zapier, n8n, Slack, Notion or your database.

#### Can I use JD.com Product Details Scraper with the Apify API?

Yes. Any Apify client (JavaScript, Python, REST) can start the actor and read the dataset; the API tab of this actor has ready code.

#### JD.com Product Details Scraper not working?

Write the run's link in the Issues tab of this actor, or to sleepmodesystems@proton.me; questions, a missing field or a custom pipeline on top of this data are welcome too. Did JD.com Product Details Scraper save you time? A review on its [Apify page](https://apify.com/sleepmodesystems/jd-com-product-details-scraper) takes a minute and helps other people find it. Thank you!

# Actor input Schema

## `products` (type: `array`):

JD product links or SKU ids, one per line: <code>100320690657</code>, <code>https://item.jd.com/100320690657.html</code>, mobile links (<code>item.m.jd.com/product/…</code>) and JD Worldwide links (<code>npcitem.jd.hk/…</code>). One complete row each. Up to 10,000.

## `minItems` (type: `integer`):

Fail the run when fewer products come back (for monitoring). 0 = never fail for a small result.

## Actor input object example

```json
{
  "products": [
    "https://item.jd.com/100320690657.html",
    "100066291366"
  ],
  "minItems": 0
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (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 = {
    "products": [
        "https://item.jd.com/100320690657.html",
        "100066291366"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sleepmodesystems/jd-com-product-details-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 = { "products": [
        "https://item.jd.com/100320690657.html",
        "100066291366",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("sleepmodesystems/jd-com-product-details-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 '{
  "products": [
    "https://item.jd.com/100320690657.html",
    "100066291366"
  ]
}' |
apify call sleepmodesystems/jd-com-product-details-scraper --silent --output-dataset

```

## MCP server setup

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