# Taobao Scraper — Search, Shops & Items in One Run (`thenetaji/taobao-scraper`) Actor

Paste keywords and any Taobao or Tmall links in one list: searches and categories return their listings, shops their listings and items the full item page. Enrichment adds every listing's item page: images, ship-from city, shop ratings and reviews.

- **URL**: https://apify.com/thenetaji/taobao-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 $3.40 / 1,000 rows

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 Scraper

The Taobao Scraper accepts one list of keywords and Taobao or Tmall links of any kind and returns structured rows for each entry. Keywords, search links and category links return their listings; shop links return the shop's listings; item links return the full item page. Each row carries a `record_type` of `search_listing`, `shop_listing` or `product`, so one dataset can hold all three without ambiguity.

No Taobao account, Chinese phone number or browser extension is involved.

### Accepted input

`startUrls` takes one entry per line. The Actor reads each entry as follows:

- An item link such as `https://item.taobao.com/item.htm?id=1079352038299` or `https://detail.tmall.com/item.htm?id=1079352038299`, or the item number on its own, returns one `product` row.
- A shop link such as `https://shop117548108.taobao.com` returns that shop's listings as `shop_listing` rows.
- A category link carrying `?cat=50005050` returns the category's top 20 listings.
- A search link carrying `?q=` is read as its keyword.
- Any other text is searched as a keyword. Chinese keywords match best, since sellers title their listings in Chinese.

A link that is none of these is listed in the log and skipped. `maxItems` bounds the number of rows saved across all entries; `0` disables the bound.

```json
{
  "startUrls": ["蓝牙耳机", "https://shop117548108.taobao.com", "https://item.taobao.com/item.htm?id=1079352038299"],
  "maxItems": 100,
  "enrichProductDetails": false
}
```

### Response fields

Listing rows carry `item_id`, `title`, `url`, `image_url`, `price`, `original_price`, `currency`, `price_hkd`, `price_twd`, `price_label`, `shop_id`, `shop_name`, `category_id`, `free_shipping`, `area_limit`, `description_match_score` and `review_tags`. Search rows add `search_input`, `page_keyword`, `total_results`, `category_path` and `position`; shop rows add the shop's `shop_description_score`, `shop_service_score`, `shop_delivery_score` and `shop_total_items`.

Item rows carry the item page: `platform` (`taobao` or `tmall`), `images`, `location`, `payment_methods`, `has_price_range`, the shop with `seller_type`, `seller_credit_level`, `shop_opened_at` and `shop_ratings`, and the reviews as `review_count_label`, `review_highlights` and `latest_reviews`.

```json
{
  "record_type": "search_listing",
  "search_input": "蓝牙耳机",
  "position": 1,
  "item_id": "1079352038299",
  "title": "爱国者蓝牙耳机半入耳式2026新款降噪高音质无线运动超长续航游戏",
  "price": 118,
  "currency": "CNY",
  "price_hkd": 140.56,
  "shop_name": "腔调会员精选旗舰店",
  "category_id": "50005050",
  "free_shipping": false
}
```

### Product details enrichment

With `enrichProductDetails` set, every listing row also receives its item page fields: `platform`, `images`, `location`, `payment_methods`, the shop's credit level and ratings, the review count, review themes and the newest review. The listing's own title, price and category are kept as they are. Enrichment costs one extra request per listing and is charged only when the item page is returned; a removed item leaves the listing row unchanged and uncharged.

### Behaviour on partial results

Taobao publishes the top 20 listings of a keyword or category page and no further pages, so each keyword or category returns at most 20 rows; `total_results` states how many Taobao counts. A keyword for which Taobao publishes no page, a removed item, and an unknown shop are each recorded in the log and skipped without failing the run or incurring a charge. Prices are in CNY, with Taobao's own HKD and TWD conversions alongside.

### Related Actors

The [Taobao Search Scraper](https://apify.com/thenetaji/taobao-search-scraper), [Taobao Shop Scraper](https://apify.com/thenetaji/taobao-shop-scraper) and [Taobao Product Scraper](https://apify.com/thenetaji/taobao-product-scraper) each handle one of these inputs with a narrower form.

# Actor input Schema

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

One entry per line, in any mix: a keyword such as 蓝牙耳机, a Taobao search link, a category link with ?cat=, a shop link such as https://shop117548108.taobao.com, or an item link such as https://item.taobao.com/item.htm?id=1079352038299. Keywords, searches and categories return their top 20 listings, shops their listings, and items the full item page.

## `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
{
  "startUrls": [
    "蓝牙耳机",
    "https://shop117548108.taobao.com",
    "https://item.taobao.com/item.htm?id=1079352038299"
  ],
  "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 = {
    "startUrls": [
        "蓝牙耳机",
        "https://item.taobao.com/item.htm?id=1079352038299"
    ],
    "maxItems": 40
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/taobao-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 = {
    "startUrls": [
        "蓝牙耳机",
        "https://item.taobao.com/item.htm?id=1079352038299",
    ],
    "maxItems": 40,
}

# Run the Actor and wait for it to finish
run = client.actor("thenetaji/taobao-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 '{
  "startUrls": [
    "蓝牙耳机",
    "https://item.taobao.com/item.htm?id=1079352038299"
  ],
  "maxItems": 40
}' |
apify call thenetaji/taobao-scraper --silent --output-dataset

```

## MCP server setup

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