# Taobao Search Scraper — Tmall Prices, Shops & Categories (`thenetaji/taobao-search-scraper`) Actor

Search Taobao and Tmall by keyword or category id and export each listing's price in CNY, HKD and TWD, the shop, category, free shipping flag and buyer review tags. Many keywords per run, no login and no Chinese phone number.

- **URL**: https://apify.com/thenetaji/taobao-search-scraper.md
- **Developed by:** [The Netaji](https://apify.com/thenetaji) (community)
- **Categories:** E-commerce, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.98 / 1,000 listings

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

## Taobao Search Scraper

The Taobao Search Scraper returns the listings Taobao and Tmall show for a keyword or a category id: title, price in CNY with Taobao's HKD and TWD conversions, the shop, the category, the free shipping flag and the review phrases buyers use most. Many keywords and categories can be searched in one run, and each row records which input produced it and its position in Taobao's order.

### Accepted input

- `keywords`: one keyword per line. Chinese keywords match best, because sellers title their listings in Chinese.
- `categoryIds`: Taobao category ids such as `50005050`, or links carrying `?cat=`. Every row of a keyword search carries `category_id`, which makes a first search a convenient way to find one.
- `maxItems`: the number of rows saved across all inputs; `0` disables the bound.
- `enrichProductDetails`: adds each listing's item page, described below.

```json
{
  "keywords": ["蓝牙耳机", "手机壳"],
  "categoryIds": ["50005050"],
  "maxItems": 40
}
```

### Response fields

Every row carries `search_input`, `search_type`, `page_keyword`, `total_results`, `category_path`, `position`, `item_id`, `title`, `url`, `image_url`, `price`, `original_price`, `currency`, `price_hkd`, `price_twd`, `price_label`, `selling_points`, `shop_id`, `shop_name`, `category_id`, `root_category_id`, `free_shipping`, `area_limit`, `description_match_score` and `review_tags`.

```json
{
  "search_input": "蓝牙耳机",
  "search_type": "keyword",
  "page_keyword": "蓝牙耳机",
  "total_results": 35583,
  "position": 1,
  "item_id": "1079352038299",
  "title": "爱国者蓝牙耳机半入耳式2026新款降噪高音质无线运动超长续航游戏",
  "url": "https://item.taobao.com/item.htm?id=1079352038299",
  "price": 118,
  "currency": "CNY",
  "price_hkd": 140.56,
  "price_twd": 583.76,
  "shop_id": "503709453",
  "shop_name": "腔调会员精选旗舰店",
  "category_id": "50005050",
  "description_match_score": 4.91
}
```

### Product details enrichment

With `enrichProductDetails` set, each row also receives the item page: `platform`, `images`, `location`, `payment_methods`, `has_price_range`, the shop's `seller_type`, `seller_credit_level` and `shop_ratings`, and the reviews as `review_count_label`, `review_highlights` and `latest_reviews`. The listing's title and price are kept. The add-on costs one request per listing and is charged only when the item page is returned.

### Limits

Taobao publishes the top 20 listings for each keyword and category and offers no further pages to visitors, so each input yields at most 20 rows; `total_results` reports Taobao's full count. Taobao publishes pages for common keywords only; a keyword without a page is logged and skipped without a charge. `page_keyword` shows the name Taobao gave the page, which can differ from the keyword searched.

### Related Actors

The [Taobao Scraper](https://apify.com/thenetaji/taobao-scraper) accepts keywords together with shop and item links in one list. `shop_id` from any row can be passed to the [Taobao Shop Scraper](https://apify.com/thenetaji/taobao-shop-scraper), and `url` to the [Taobao Product Scraper](https://apify.com/thenetaji/taobao-product-scraper).

# Actor input Schema

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

Words to search Taobao for, one per line. Chinese keywords match best, since that is how sellers title their listings. Taobao shows the top 20 listings of each keyword.

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

Taobao category ids, one per line, such as 50005050 for Bluetooth earphones. Every row of a search carries its category_id, so a keyword search is a quick way to find one. Each category returns its top 20 listings.

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

Maximum number of listings to save across all inputs. Set 0 for no limit.

## `enrichProductDetails` (type: `boolean`):

Open each listing's item page and add what a listing card cannot show: Tmall or Taobao, every image, ship-from city, payment methods, the shop's credit level and ratings, review count and themes, and the newest review. One extra request per listing, billed per enriched listing.

## Actor input object example

```json
{
  "keywords": [
    "蓝牙耳机"
  ],
  "categoryIds": [
    "50005050"
  ],
  "maxItems": 40,
  "enrichProductDetails": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

All records scraped by this run

# 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": [
        "蓝牙耳机",
        "手机壳"
    ],
    "maxItems": 40
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/taobao-search-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": [
        "蓝牙耳机",
        "手机壳",
    ],
    "maxItems": 40,
}

# Run the Actor and wait for it to finish
run = client.actor("thenetaji/taobao-search-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": [
    "蓝牙耳机",
    "手机壳"
  ],
  "maxItems": 40
}' |
apify call thenetaji/taobao-search-scraper --silent --output-dataset

```

## MCP server setup

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