# JD.com Products Scraper — Search by Keyword (京东) (`nice_dev/jd-products-scraper`) Actor

Scrape JD.com (京东) products by keyword: title, price in CNY, shop, brand, categories, review count, good-review rate, image and links. No login. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/nice_dev/jd-products-scraper.md
- **Developed by:** [Nice Dev](https://apify.com/nice_dev) (community)
- **Categories:** E-commerce, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.32 / 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

### 🛒 What is JD.com Products Scraper?

**JD.com Products Scraper** extracts **products from [JD.com](https://www.jd.com) (京东) search results**: **title, price in CNY, shop, brand, categories, review count, good-review rate, image and links**, for any keyword, in English or in Chinese. It works as a **JD.com API alternative**: run it on a schedule, call it from your code, or plug it into Make, Zapier or n8n.

Type a **keyword** (`laptop`, `手机`) or paste a JD.com search link, click **Start**, and download the products in JSON, CSV or Excel. No JD account, no cookie, nothing to set up. Each product is returned once, even when JD lists it twice in the same page or under several of your keywords.

### 📋 What data can you extract from JD.com?

One item per product, 30 fields:

| Category | What you get |
| --- | --- |
| 🏷️ **Product** | title, JD product number, desktop and mobile links, main image |
| 💰 **Price** | price as a number, in Chinese yuan — `3999 CNY` |
| 🏬 **Shop** | shop name, shop number, shop link, and whether JD itself sells and ships the product (京东自营) |
| 🗂️ **Brand and categories** | brand number and the 3 category numbers (top, middle, lowest level) |
| ⭐ **Reviews** | review count as JD shows it (`1万+`) and as a number (10000), share of positive reviews (96 %), the words buyers use most |
| 🎁 **Offers** | interest-free instalments, gift or promotion tag, lowest-price, 10-billion-subsidy, flash-sale, presale and JD Worldwide flags |
| 🕒 **Dates and rank** | date the product was put on sale, rank in the search, number of results JD announces for the keyword |

Every field, with an example, is listed in the **Output** section below.

### ✅ Why use JD.com Products Scraper?

- 🎯 **Type the keyword, in English or Chinese**: or paste a JD.com search link, its keyword is read for you.
- 🧩 **Nothing twice**: JD often lists the same product at two places of a page; each product is saved (and charged) once, across pages and across keywords.
- 🔢 **Numbers you can sort and filter**: the price is a number, `1万+` reviews also comes as 10000, the good-review rate is a percentage.
- 🧹 **Filters JD search links do not carry**: price range, sold by JD only, minimum good-review rate, minimum number of reviews, shop, brand, category, listing date, excluded words.
- 🗂️ **Several keywords in one run**: with a cap of products and of pages for each keyword.
- 🔔 **Monitoring built in**: tick **Only new products**, schedule the Actor, and each run returns only the products it has never delivered before.
- 🔌 API, scheduling, monitoring, integrations (Make, Zapier, n8n, Google Sheets…) and JSON/CSV/Excel export via the Apify platform.

### 🚀 How to scrape JD.com

1. Create an Apify account.
2. Open **JD.com Products Scraper** and type a **Search keyword** (e.g. `laptop` or `手机`).
3. Or paste JD.com search links into **JD.com search links**: the keyword of each link is searched.
4. Set **Max products** (100 by default, 0 = no limit) — and **Max products per keyword** or **Max pages per keyword** when you run several keywords — then click **Start**.
5. Download the dataset in JSON, CSV, Excel or via API.

### 💰 How much does it cost to scrape JD.com?

This Actor uses **pay per event** pricing. You pay for:

- each **run start** (`apify-actor-start`);
- each **page of results read** (`search-page`): one page holds up to 48 results, charged before the page is read, whatever the filters keep afterwards;
- each **product saved** to the dataset;
- each product **dropped by one of your filters** (`filter-check`), a small fraction of the price of a product.

The current price of each event is on the **Pricing** tab of this page; higher Apify plans pay less. Platform usage (compute) is included.

If a page cannot be read after several tries, its charge is carried over to the next page the run reads: you never pay twice for the same page. It is lost only when the run reads no other page.

JD often lists the same product twice in a page: count on about 35 different products per page of 48 results, fewer on the deep pages of a keyword. A keyword without any result still costs its first page.

**Free Apify plan**: one sample per 24 hours — the first page of results of your first keyword (up to 48 results). The same keyword run again within 24 hours returns that same sample; another keyword returns nothing until 24 hours have passed. A paid Apify plan reads every page.

### ⚙️ Input

```json
{
    "query": "laptop",
    "maxItems": 100
}
```

Several keywords, a cap for each, JD's own offers only, well-rated products only, only the ones not delivered before:

```json
{
    "searchQueries": ["手机", "蓝牙耳机"],
    "maxItemsPerQuery": 200,
    "maxPagesPerQuery": 10,
    "jdSelfOperatedOnly": true,
    "minGoodRate": 95,
    "minReviewCount": 1000,
    "onlyNew": true,
    "stateKey": "phones-daily"
}
```

Or with JD.com search links and a price range:

```json
{
    "startUrls": [
        { "url": "https://search.jd.com/Search?keyword=laptop" },
        { "url": "https://so.m.jd.com/ware/search.action?keyword=%E6%89%8B%E6%9C%BA" }
    ],
    "minPrice": 2000,
    "maxPrice": 8000,
    "maxItems": 500
}
```

| Field | Notes |
| --- | --- |
| `query`, `searchQueries` | Keyword, as typed in JD's search box: `laptop`, `手机`. `searchQueries` adds more keywords (one search each, up to 100 keywords in the list). |
| `startUrls` | JD.com search links such as `https://search.jd.com/Search?keyword=laptop`. Only the keyword of the link is read: its sort, filters and page number are ignored. A product link or a shop link is refused with a message. |
| `maxItems` | Stop after this many products for the whole run (`0` = unlimited). |
| `maxItemsPerQuery`, `maxPagesPerQuery` | Caps for EACH keyword: products saved, and pages of results read (every page read is charged). `0` = no cap. |
| `minPrice`, `maxPrice` | Price range in Chinese yuan (CNY). Products without a price are dropped. |
| `shopIds` | Only these shops, by their number: `1000164941` (the shop number of the results). |
| `shopNames` | Only the shops whose name contains one of these texts: `华为`. Shop names are in Chinese. |
| `categoryIds`, `brandIds` | Only these categories (`655`: any of the 3 category numbers of a product matches) or these brands, by the numbers given in the results. |
| `jdSelfOperatedOnly` | Only the products sold and shipped by JD itself (京东自营). |
| `minGoodRate`, `minReviewCount` | Share of positive reviews of at least this percentage (`95`), and at least this many reviews. Products that show no rate or no count are dropped. |
| `excludeKeywords` | Drop the products whose title contains one of these words: `case`, `二手`. |
| `postedAfter`, `postedBefore` | Date the product was put on sale: `2026-09-01` (a day in Beijing time), or a period before now (`7 days`, `2 weeks`, `1 month`, `24 hours`). |
| `onlyNew`, `stateKey`, `resetState` | Monitoring: only the products never delivered under this memory key (`laptops-daily`); `resetState` forgets the memory. |
| Advanced | `maxRequestRetries`, `debugLog`. |

### 📦 Output

```json
{
    "id": "100286262170",
    "url": "https://item.jd.com/100286262170.html",
    "mobileUrl": "https://item.m.jd.com/product/100286262170.html",
    "title": "realme手机OPPO 真我GT8 Pro 第五代骁龙8至尊 2亿长焦 拍照手机AI手机游戏手机国家补贴12+256白",
    "price": 3999,
    "currency": "CNY",
    "imageUrl": "https://img14.360buyimg.com/n0/jfs/t1/553163/16/993/52099/6ad8303bF0cddd66b/0083320320ea1e35.jpg",
    "shopId": "1000164941",
    "shopName": "真我realme京东自营旗舰店",
    "shopUrl": "https://mall.jd.com/index-1000164941.html",
    "vendorId": "1000164941",
    "isSelfOperated": true,
    "brandId": "438621",
    "categoryIds": ["9987", "653", "655"],
    "reviewCountText": "1万+",
    "reviewCountMin": 10000,
    "goodRate": 96,
    "reviewTags": ["手感一流", "还原度高", "时尚简约"],
    "installmentOffer": "3期免息",
    "promoTag": "赠品",
    "isLowestPrice": false,
    "isBillionSubsidy": false,
    "isFlashSale": false,
    "isPresale": false,
    "isGlobal": false,
    "listedAt": "2025-10-21T08:35:04.000Z",
    "position": 1,
    "searchQuery": "手机",
    "searchTotal": 7685,
    "scrapedAt": "2026-11-10T12:00:00.000Z"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV or Excel.

#### All 30 fields

| Fields | What you get |
| --- | --- |
| `id`, `url`, `mobileUrl` | **Product**: JD product number `100286262170`, desktop link, mobile link |
| `title`, `imageUrl` | title as shown in the search, link of the main image |
| `price`, `currency` | **Price**: `3999`, `CNY` |
| `shopId`, `shopName`, `shopUrl`, `vendorId` | **Shop**: `1000164941`, `真我realme京东自营旗舰店`, link of the shop, seller number |
| `isSelfOperated` | `true` when JD itself sells and ships the product (京东自营) |
| `brandId`, `categoryIds` | **Brand and categories**: `438621`, `["9987", "653", "655"]` (top, middle, lowest level; numbers only, JD's search gives no names) |
| `reviewCountText`, `reviewCountMin` | **Reviews**: the count as JD shows it (`1万+`) and its lower bound as a number (`10000`; 万 = 10,000) |
| `goodRate`, `reviewTags` | share of positive reviews, 0 to 100 (`96`); the words buyers use most (`["手感一流", "还原度高"]`) |
| `installmentOffer`, `promoTag` | **Offers**: `3期免息` (3 instalments without interest), `赠品` (gift) |
| `isLowestPrice`, `isBillionSubsidy`, `isFlashSale`, `isPresale`, `isGlobal` | JD's badges: lowest price, 10-billion subsidy (百亿补贴), flash sale (秒杀), presale, JD Worldwide (京东国际) |
| `listedAt` | **Dates and rank**: `2025-10-21T08:35:04.000Z`, when the product was put on sale (what the date filters read) |
| `position`, `searchQuery`, `searchTotal` | rank in the search (`1`), the keyword it was found with, the number of results JD announces for it (`7685`) |
| `scrapedAt` | ISO timestamp of the run's reading |

A value JD does not show is `null`, never a missing column.

### 💡 Tips

#### How to get more results

Set `maxItems` to `0` and leave `maxPagesPerQuery` at `0`: the Actor reads the pages of a keyword until JD has no more (a broad keyword such as `手机` announces about 7,700 results over 161 pages). A search also stops after 2 pages in a row that bring no product the run has not already found, under this keyword or another one of the run. For more, use several precise keywords (`华为手机`, `小米手机`…) rather than one broad word: products found twice are saved once.

#### How to reduce costs

Pages and products are both charged, so the levers are `maxItems`, `maxItemsPerQuery` and `maxPagesPerQuery`. Filters are applied after a page is read: a page whose products are all filtered out still costs its page, and each product dropped costs the small filter fee. A precise keyword is cheaper than a broad keyword with strict filters. For recurring runs, `onlyNew` saves the price of the products you already have (their pages are still read and charged).

#### Several keywords in one run

Fill `searchQueries`: the Actor runs one search per keyword, one after the other (up to 100 keywords in the list). The single `query` field still works and is added to the list. A product found by several keywords is saved — and charged — once, under the first keyword that found it. Set `maxItemsPerQuery` to give every keyword its own cap: without it the first keywords can use up the whole `maxItems` budget.

#### Monitoring: only the new products

Tick **Only new products** (`onlyNew`) and schedule the Actor. The first run returns everything; each later run skips the products already delivered: they are not saved and not charged as products. The memory lives in a named key-value store of your account (`jd-products-scraper-seen`, up to 150,000 products per key) and is only updated with products that really reached the dataset, so a failed run never hides anything. Give each schedule its own `stateKey` (two schedules sharing a key would hide each other's products), and tick `resetState` once to start over. JD's search has no "newest first" order: each run reads the same first pages again (and pays for them), so cap them with `maxPagesPerQuery`. Under a cap (`maxItems` or `maxItemsPerQuery`), a later run stops once it has met most of the products the earlier runs delivered for that keyword: it returns what is new among those pages and does not go on to deeper pages. To go deeper into a keyword, run it once with a higher cap and `resetState`, or without `onlyNew`.

#### Filter by listing date

`postedAfter` and `postedBefore` take a date (`2026-09-01`: the whole day, in Beijing time, UTC+8 — the `listedAt` column is in UTC) or a period before now (`7 days`, `2 weeks`, `1 month`; via the API also `24 hours` or a full ISO date-time). The filter reads `listedAt`; a product without a listing date is dropped as soon as a date bound is set. Filtered-out products are not saved and do not count in `maxItems`; the run summary tells how many were filtered. Results come in JD's default order, not by date: the run reads every page allowed and filters.

### 🔌 Integrations and API

Call the Actor via the Apify API, the JavaScript or Python clients, or connect it with integrations and webhooks (Make, Zapier, n8n, Google Sheets, Slack, Airtable…). The dataset can be fetched as JSON or CSV from any tool.

### 🤖 Use with AI agents (MCP)

AI agents (Claude, ChatGPT, Cursor…) can find and run this Actor through the [Apify MCP server](https://mcp.apify.com), billed to their Apify account like any run. It returns one item per JD.com product found for a keyword. Actor id: `nice_dev/jd-products-scraper`; MCP server with this Actor only: `https://mcp.apify.com/?tools=fetch-actor-details,nice_dev/jd-products-scraper`.

Smallest input, for a cheap first call (one page of results):

```json
{
    "query": "laptop",
    "maxItems": 10,
    "maxPagesPerQuery": 1
}
```

Key output fields: `url`, `title`, `price`, `currency`, `shopName`, `isSelfOperated`, `reviewCountMin`, `goodRate`.

Cost: per run start, per page of results read and per product saved, at the prices of the Pricing tab (see the pricing section above). Cap each call with `maxItems`, `maxPagesPerQuery` and, through the API, with the run option `maxTotalChargeUsd`.

### ❓ FAQ

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

The Actor only returns what JD.com shows publicly to any visitor of its search results: products, prices and shops. It uses no JD account and no cookie. Search results hold no personal data of buyers. You are responsible for using the data in compliance with JD.com's Terms of Use and applicable law. This Actor is not affiliated with JD.com.

#### Does it need a login, a cookie or a proxy?

No. There is nothing to set up: no JD account, no cookie, no proxy.

#### Is the data safe to open in Excel or to show on a web page?

Titles and shop names are the sellers' own words, copied as they are. A text can begin with `-`, `+`, `=` or `@`: Excel and Google Sheets may read such a cell of a CSV file as a formula. The Actor leaves the text as it is, so that the JSON and the API give the real value: when you open a CSV, import these columns as text. On a web page, escape every field like any text written by a stranger. Every link field holds an http(s) link or `null`.

#### Known limitations

- Search by keyword only: no product page (description, variants, stock), no buyer reviews, no complete catalog of a shop.
- Results come in JD's default order; JD's sort orders and its own filters are not available, the filters of the form are applied by the Actor on each page read.
- Brands and categories come as JD numbers, without their names.
- The review count is the rounded figure JD shows (`500+`, `1万+`), not an exact count; no sales figure.
- `onlyNew` remembers product numbers, not their content: a product whose price changed is not returned again.
- Two runs sharing the same `stateKey` at the same time may both return the same new product.
- Product search can be paused for a short time (maintenance on our side): the run then ends *Succeeded* with a message that says so, and no further page is charged; the page being asked when the pause starts may already be charged.

**A run that reaches its timeout** stops itself before it: no new page is asked, what it read is saved and, with `onlyNew`, remembered, and the run ends *Succeeded*. Resurrect it to go on from there, or give the next run a longer timeout (Run options). A page is asked only while enough of the run's timeout is left (about 2 minutes; 2.5 for a run of 10 minutes or more): give a run at least 3 minutes.

**A run the platform stops without warning** (out of memory)

- Resurrect it: it goes on from where it stood at most a minute before the stop. The pages it had read since are read again but not charged a second time, and the products already saved are skipped: none is delivered or charged twice, and `maxItems` still counts them.
- With `onlyNew`, the memory is saved after each write (at most once every 2 seconds): resurrect the stopped run and the products it had saved meanwhile join the memory.

#### Something doesn't work?

The last line of the log counts the products saved and filtered out, and the pages that could not be read. A keyword whose page cannot be read is stopped where it stands: what was read before is kept, and the last message of the run says so.

If the data changes shape, you are told instead of paying for blank rows. If the first 20 products read all lack their title, price, image, shop name, categories or listing date, the run saves nothing more, stops and fails, and its last message names the missing field: at most those first products are charged. A run of fewer products is checked at its end, from 5 products.

### 🛟 Support

Open an issue in the **Issues** tab with a link to your run: the run log shows which keyword and which page stopped, and why.

# Actor input Schema

## `query` (type: `string`):

Keyword to search on JD.com, as you would type it in the search box. English words work (e.g. `laptop`), and so do Chinese ones (e.g. `手机` = mobile phone).

## `searchQueries` (type: `array`):

Several keywords in one run: one search per keyword. Added to **Search keyword**; a product found by several searches is saved once.

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

JD.com search links, such as `https://search.jd.com/Search?keyword=laptop` or `https://so.m.jd.com/ware/search.action?keyword=laptop`. Only the keyword of each link is read: a sort, a filter or a page number set in the link is ignored (use the **Filters** below). The keyword is searched like one typed in **Search keyword**, and added to it. Product links (`item.jd.com/…`) and shop links (`mall.jd.com/…`) are not accepted: this Actor searches by keyword. Max 100 links.

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

Maximum number of products to save for the whole run (after deduplication and filters). Results are read page by page: the run stops reading pages as soon as this number is reached. 0 = no limit.

## `maxItemsPerQuery` (type: `integer`):

Cap for EACH keyword, so that the first keyword cannot use up the whole **Max products** budget. 0 = no per-keyword cap.

## `maxPagesPerQuery` (type: `integer`):

Most result pages read for EACH keyword. One page holds up to 48 products (a product listed twice in a page is saved once), and every page read is charged, whatever the filters keep. 0 = no cap: the run reads pages until **Max products** is reached or the keyword has no more results.

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

Only products from this price, in Chinese yuan (CNY). Products without a price are dropped.

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

Only products up to this price, in Chinese yuan (CNY). Empty or 0 = no maximum. Products without a price are dropped.

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

Only products sold by one of these shops. A shop ID is the number in the `shopId` column of the results (e.g. `1000164941`).

## `shopNames` (type: `array`):

Only products whose shop name CONTAINS one of these texts (case ignored), e.g. `华为` for every Huawei shop. Shop names are in Chinese.

## `categoryIds` (type: `array`):

Only products in one of these categories. A category ID is one of the 3 numbers in the `categoryIds` column of the results (top level, middle level, lowest level): a product matches when ANY of its three equals one of your IDs.

## `brandIds` (type: `array`):

Only products of one of these brands. A brand ID is the number in the `brandId` column of the results.

## `jdSelfOperatedOnly` (type: `boolean`):

Keep only the products sold and shipped by JD itself (京东自营, `isSelfOperated` = true), and drop those of third-party shops.

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

Only products whose share of positive reviews (`goodRate`) is at least this percentage, from 0 to 100. Products that show no rate (no review yet) are dropped.

## `minReviewCount` (type: `integer`):

Only products with at least this many reviews. JD shows an approximate count (`500+`, `1万+`): the figure compared is the one in the `reviewCountMin` column (500, 10000). Products that show no count are dropped.

## `excludeKeywords` (type: `array`):

Drop the products whose title contains one of these WHOLE words (case and accents ignored): `case` drops "Phone case" but keeps "Showcase". Several words in one entry (`power bank`) must appear together, in that order. Chinese, Japanese, Korean, Thai, Lao, Khmer and Burmese words are found anywhere in the title (no spaces there), e.g. `手机壳` drops every title containing it.

## `postedAfter` (type: `string`):

Only products put on sale on or after this date (the `listedAt` column): `2026-09-01` (a day is read in Beijing time, UTC+8), or a period before now such as `7 days`, `2 weeks`, `1 month` (API: `24 hours` and full ISO date-times work too). Products without a listing date are dropped.

## `postedBefore` (type: `string`):

Only products put on sale on or before this date (a day is read in Beijing time, UTC+8; the `listedAt` column; the whole day is included), or older than a period such as `30 days`.

## `onlyNew` (type: `boolean`):

Skip the products that a previous run (same **Memory key**) already delivered: they are not saved and not charged as products. The result pages that contain them are still read, and charged as pages. First run = everything is new.

## `stateKey` (type: `string`):

Name of the memory used by **Only new products**. Give each schedule / task its own key (e.g. `laptops-daily`) so that they do not share their memory. Letters, digits, `-` and `_`.

## `resetState` (type: `boolean`):

Forget everything remembered under this **Memory key** before the run: this run returns (and charges) every product again. Untick it afterwards.

## `maxRequestRetries` (type: `integer`):

Retries of a failed request before the page is given up.

## `debugLog` (type: `boolean`):

Include debug messages in the run log.

## Actor input object example

```json
{
  "query": "laptop",
  "searchQueries": [],
  "startUrls": [],
  "maxItems": 30,
  "maxItemsPerQuery": 0,
  "maxPagesPerQuery": 0,
  "shopIds": [],
  "shopNames": [],
  "categoryIds": [],
  "brandIds": [],
  "jdSelfOperatedOnly": false,
  "excludeKeywords": [],
  "onlyNew": false,
  "stateKey": "default",
  "resetState": false,
  "maxRequestRetries": 5,
  "debugLog": false
}
```

# Actor output Schema

## `results` (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 = {
    "query": "laptop",
    "maxItems": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("nice_dev/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 = {
    "query": "laptop",
    "maxItems": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("nice_dev/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 '{
  "query": "laptop",
  "maxItems": 30
}' |
apify call nice_dev/jd-products-scraper --silent --output-dataset

```

## MCP server setup

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