# 1688 Wholesale Analyzer - AI Insights & Smart Labels (`loongge/1688-wholesale-analyzer`) Actor

Extract and analyze 50+ fields per product from 1688.com with AI-powered smart labels (hot/profitable/new), data cleaning, and enriched supplier intelligence. Search by keyword or offer IDs. Better than raw scraping — get actionable insights for your sourcing decisions.

- **URL**: https://apify.com/loongge/1688-wholesale-analyzer.md
- **Developed by:** [Wa Da](https://apify.com/loongge) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 1688 Wholesale Analyzer — Sourcing Intelligence Engine

> One-click 1688 product analysis: AI labels, supplier trust scoring, cross-platform price comparison, MOQ optimization, and profit calculation — everything a cross-border seller needs.

### Why This Actor?

Other 1688 scrapers dump raw data. **This actor is a complete sourcing decision engine** built on top of the best scraping API:

- 🏷️ **AI Smart Labels** — Auto-tag products as 🔥 Hot, 💰 High-Profit, 🆕 New Arrival, ⭐ Best Value, 📦 Volume Seller
- 🛡️ **Supplier Trust Score** — 0-100 score with A/B/C/D grade based on years, ratings, verification, repurchase rate, scale
- 📊 **Scoring Engine** — `profitScore` (0-100), `competitionScore` (0-100), `riskLevel`, and natural-language `summary`
- 💱 **Cross-Platform Comparison** — Compare 1688 wholesale prices vs Taobao & AliExpress retail, with margin analysis
- 📦 **MOQ Advisor** — Analyze quantity pricing tiers, recommend optimal order quantity with marginal ROI
- 💰 **Profit Calculator** — Estimate net profit after shipping, platform fees, and customs for cross-border resale
- 🧠 **LLM Deep Analysis** — Optional AI-generated English summary, market positioning, and sourcing advice
- 🧹 **Data Cleaning** — Deduplication, price normalization, invalid item filtering

### Input

| Parameter | Type | Default | Description |
|---|---|---|---|
| **keywords** | string[] | `["手机壳"]` | Search keywords (Chinese or English) |
| **offerIds** | string[] | `[]` | Specific product IDs to fetch directly |
| **maxResults** | integer | 20 | Max products to return (1-500) |
| **sortBy** | select | relevance | Sort order: relevance / sale / price_asc / price_desc / credit |
| **includeSkuDetails** | boolean | false | Extract SKU variants with stock & tier pricing |
| **priceMin** | number | 0 | Minimum price in CNY (0 = no limit) |
| **priceMax** | number | 0 | Maximum price in CNY (0 = no limit) |
| **enableAiLabels** | boolean | true | Apply AI smart labels & scoring |
| **enableDataCleaning** | boolean | true | Clean & deduplicate results |
| **enableLlmAnalysis** | boolean | false | Enhance with LLM-generated insights (requires API key) |
| **llmApiKey** | string | "" | OpenAI-compatible API key (or set LLM_API_KEY env var) |
| **llmBaseUrl** | string | https://api.openai.com/v1 | API base URL (change for DeepSeek, etc.) |
| **llmModel** | string | gpt-4o-mini | Model name (gpt-4o-mini, deepseek-chat, etc.) |
| **enableCrossPlatformComparison** | boolean | false | Compare 1688 prices vs Taobao & AliExpress |
| **compareTaobao** | boolean | true | Include Taobao retail prices in comparison |
| **compareAliexpress** | boolean | true | Compare with AliExpress retail prices |
| **productWeightGrams** | integer | 50 | Product weight (grams) for profit calculation |
| **shippingRatePerGram** | number | 0.35 | Shipping cost per gram (CNY) for profit calculation |
| **platformFeePercent** | number | 0.12 | Platform commission (0.12 = 12%) for profit calculation |
| **customsPercent** | number | 0 | Customs duty rate (0 = no duty) for profit calculation |

### Output Example

```json
{
  "offerId": "1234567890",
  "title": "LDNIO Bluetooth Earbuds TWS Wireless",
  "price": {"min": 62.8, "max": 62.8, "currency": "CNY"},
  "saledCount": 2500,
  "wantBuyCount": 180,
  "supplier": {
    "name": "LDNIO Official Store",
    "verified": true,
    "years": 5
  },
  "aiLabels": {
    "isHot": true,
    "isProfitable": false,
    "isNew": false,
    "tags": ["🔥 Hot Product", "🔄 High Repurchase"],
    "profitScore": 0,
    "competitionScore": 90,
    "riskLevel": "low",
    "summary": "Strong seller with high demand and verified supplier."
  },
  "llmInsights": {
    "englishSummary": "Established TWS earbuds with proven 2500+ sales and strong buyer interest — a reliable sourcing choice.",
    "marketInsight": "The TWS earbuds segment on 1688 is highly competitive. This product's 2500+ sales signal validated demand, but the high competition score means margins may be thin without differentiation.",
    "sourcingAdvice": "Negotiate bulk pricing — at 2500+ units sold, the supplier likely offers better tier prices. Consider custom packaging to differentiate from competitors.",
    "riskFactors": ["High competition in TWS segment may compress margins", "Verify Bluetooth certification before bulk order"]
  }
}
````

### AI Label Rules

| Label | Criteria |
|---|---|
| 🔥 Hot Product | Sales > 1,000 & WantBuy > 100 |
| 🔥 Rising Star | Sales > 500 & WantBuy > 50 |
| 💰 High Profit | Price range ratio > 50% |
| 🆕 New Arrival | Sales < 10 & has supplier |
| ⭐ Best Value | Price < ¥20, rating ≥ 4.5, sales > 100 |
| 📦 Volume Seller | Price < ¥5, sales > 500 |
| 🔄 High Repurchase | Repurchase rate > 30% |
| ⚠️ High Risk | Multiple risk factors (out-of-stock, no supplier, low rating) |

### Use Cases

- **Dropshippers** — Find hot products with low competition before they trend
- **Wholesale Buyers** — Compare factory-direct pricing with AI scoring
- **Market Researchers** — Clean, deduplicated data ready for analysis
- **E-commerce Operators** — Source products with profit & risk scores built in

### LLM Deep Analysis (Phase 2)

Enable `enableLlmAnalysis` to get LLM-generated insights for each product:

- **englishSummary** — Concise English summary of sourcing potential with key specs
- **marketInsight** — Market positioning, demand signals, competitive landscape with data references
- **sourcingAdvice** — Clear buy/avoid/negotiate recommendation considering supplier trust, MOQ, and profit margin
- **riskFactors** — Array of specific risks to watch out for (e.g., "High MOQ requires significant upfront investment")

The LLM receives full context including supplier trust grade, MOQ tiers, profit analysis, and cross-platform comparison data — so its advice is grounded in real numbers, not generic observations.

#### Supported Providers

| Provider | llmBaseUrl | llmModel | Cost |
|---|---|---|---|
| OpenAI | `https://api.openai.com/v1` | gpt-4o-mini | ~$0.15/1K products |
| DeepSeek | `https://api.deepseek.com/v1` | deepseek-chat | ~$0.01/1K products |
| Any OpenAI-compatible | Your URL | Your model | Varies |

Products are batched (8 per call) to minimize token usage. Features automatic retry on rate limits (429) and robust JSON parsing. If the LLM call fails, the actor falls back gracefully — you still get rule-based labels.

### Cross-Platform Price Comparison (Phase 3)

Enable `enableCrossPlatformComparison` to see how 1688 wholesale prices compare against retail:

- **Taobao** — Same currency (CNY), direct price comparison
- **AliExpress** — USD prices auto-converted to CNY for margin analysis

#### Output

Each product gets a `crossPlatformComparison` field:

```json
{
  "crossPlatformComparison": {
    "searchQuery": "M10TWS Bluetooth Earbuds",
    "taobao": [
      {"title": "M10 TWS Earbuds...", "price": 89.0, "sales": 1200}
    ],
    "aliexpress": [
      {"title": "M10 TWS Earbuds...", "price": 8.99, "currency": "USD", "sales": 500}
    ],
    "priceAnalysis": {
      "margins": {
        "taobao": {"avgRetailPrice": 89.0, "wholesalePrice": 16.5, "marginPercent": 439.4},
        "aliexpress": {"avgRetailPriceUSD": 8.99, "avgRetailPriceCNY": 64.7, "marginPercent": 292.1}
      },
      "bestPlatform": "taobao",
      "bestMarginPercent": 439.4,
      "verdict": "excellent"
    }
  }
}
```

#### Verdict Scale

| Verdict | Margin |
|---|---|
| excellent | ≥ 100% |
| good | ≥ 50% |
| fair | ≥ 20% |
| thin | ≥ 0% |
| loss | < 0% |

> **Note:** Cross-platform comparison runs Taobao + AliExpress scrapers in parallel (~30s total, not per product).

### Supplier Trust Score

Every product gets a `supplierTrust` field with a 0-100 score and A/B/C/D grade:

```json
{
  "supplierTrust": {
    "score": 80,
    "grade": "A",
    "tags": ["🏭 10+ Years", "⭐ Top Rated", "✅ Verified Super Factory", "🔄 High Repurchase"],
    "breakdown": {
      "years": 6,
      "rating": 4.9,
      "verified": true,
      "repurchaseRate": 0.6,
      "salesVolume": 2000,
      "wantBuyCount": 150
    }
  }
}
```

#### Scoring Weights

| Signal | Weight | Source Field |
|---|---|---|
| Years in business | 25pts | `supplier.tpYear` |
| Platform rating | 25pts | `supplier.scores.composite` |
| Verification | 15pts | `supplier.flags.isSuperFactory/isFactory` |
| Repurchase rate | 15pts | `repurchaseRate` / `supplier.stats.repeatRate` |
| Sales volume | 10pts | `saledCount` |
| Demand signals | 10pts | `wantBuyCount` |
| Scale (fans + offers) | 10pts | `supplier.fans`, `supplier.stats.totalOffers` |

### MOQ Advisor

Analyzes quantity pricing tiers and recommends the optimal order quantity:

```json
{
  "moqAdvisor": {
    "recommended": {"quantity": 500, "price": 3.8, "totalCost": 1900, "dropFromBase": "24.0%", "savingPerUnit": 1.2},
    "basePrice": 5.0,
    "bestPrice": 3.5,
    "maxSaving": "30.0%",
    "tiers": [
      {"quantity": 10, "price": 5.0, "totalCost": 50, "dropFromBase": "0.0%", "savingPerUnit": 0},
      {"quantity": 100, "price": 4.2, "totalCost": 420, "dropFromBase": "16.0%", "savingPerUnit": 0.8},
      {"quantity": 500, "price": 3.8, "totalCost": 1900, "dropFromBase": "24.0%", "savingPerUnit": 1.2}
    ]
  }
}
```

### Profit Calculator

Estimates cross-border resale profit based on wholesale cost, shipping, platform fees, and customs:

```json
{
  "profitAnalysis": {
    "profitable": true,
    "retailPrice": {"cny": 38.82, "source": "aliexpress"},
    "costBreakdown": {
      "product": 1.6,
      "shipping": 4.0,
      "platformFee": 4.66,
      "customs": 0,
      "total": 10.26
    },
    "profit": {
      "grossCNY": 28.56,
      "roiPercent": 278.4,
      "marginPercent": 73.6
    },
    "assumptions": {
      "shippingRatePerGram": 0.2,
      "platformFeePercent": 0.12,
      "customsPercent": 0,
      "productWeightGrams": 20
    }
  }
}
```

Adjust cost assumptions via input parameters: `productWeightGrams`, `shippingRatePerGram`, `platformFeePercent`, `customsPercent`.

### Tips

- **English keywords** tend to return more stable results on 1688 (e.g., `"bluetooth earbuds"` vs `"蓝牙耳机"`)
- Use **offerIds** for precise product lookups when you already know what you want
- Enable **includeSkuDetails** to get variant-level pricing for margin analysis
- Set **priceMin/priceMax** to filter out irrelevant price tiers

### Pricing

This actor runs on the Apify platform. Usage is billed per compute unit based on your Apify plan. No hidden API fees — the upstream scraping is handled internally.

### Support

Found a bug or need a feature? Open an issue on the Actor page or contact the developer.

# Actor input Schema

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

Keywords to search on 1688.com. Supports Chinese and English. English keywords tend to return more stable results.

## `offerIds` (type: `array`):

Specific 1688 product IDs to fetch directly. Leave empty to use keyword search instead.

## `maxResults` (type: `integer`):

Maximum number of products to return per keyword.

## `sortBy` (type: `string`):

How to sort search results on 1688.

## `includeSkuDetails` (type: `boolean`):

Extract SKU/variant details including stock levels and tier pricing.

## `priceMin` (type: `number`):

Minimum price filter in CNY. Set to 0 for no lower limit.

## `priceMax` (type: `number`):

Maximum price filter in CNY. Set to 0 for no upper limit.

## `enableAiLabels` (type: `boolean`):

Auto-tag products with smart labels (Hot, High-Profit, New, Best Value, etc.) and generate profitScore, competitionScore, riskLevel, and summary.

## `enableDataCleaning` (type: `boolean`):

Clean data: remove duplicates, normalize prices, filter invalid items.

## `enableLlmAnalysis` (type: `boolean`):

Enhance each product with LLM-generated insights: English summary, market positioning, and sourcing advice. Requires llmApiKey.

## `llmApiKey` (type: `string`):

API key for OpenAI-compatible LLM service (OpenAI, DeepSeek, etc.). Also accepts LLM\_API\_KEY env variable.

## `llmBaseUrl` (type: `string`):

Base URL for OpenAI-compatible API. Change this for DeepSeek (https://api.deepseek.com/v1) or other providers.

## `llmModel` (type: `string`):

Model name for LLM analysis. Examples: gpt-4o-mini, deepseek-chat, gpt-4o.

## `enableCrossPlatformComparison` (type: `boolean`):

Compare 1688 wholesale prices against Taobao and AliExpress retail prices. Shows margin analysis for sourcing decisions. Note: increases Actor run time and compute usage.

## `compareTaobao` (type: `boolean`):

Include Taobao (淘宝) retail prices in comparison. Same currency (CNY) as 1688.

## `compareAliexpress` (type: `boolean`):

Include AliExpress retail prices in comparison. Auto-converts USD to CNY for margin calculation.

## `productWeightGrams` (type: `integer`):

Estimated product weight in grams for shipping cost calculation. Used by Profit Calculator. Default: 50g (small electronics).

## `shippingRatePerGram` (type: `number`):

Shipping cost per gram in CNY. Default: 0.35 (economy cross-border). Used by Profit Calculator.

## `platformFeePercent` (type: `number`):

Platform commission as decimal (0.12 = 12%). Covers AliExpress/Amazon/Shopify fees. Used by Profit Calculator.

## `customsPercent` (type: `number`):

Customs duty as decimal (0 = no duty). Varies by country and product category. Used by Profit Calculator.

## Actor input object example

```json
{
  "keywords": [
    "bluetooth earbuds"
  ],
  "offerIds": [],
  "maxResults": 20,
  "sortBy": "relevance",
  "includeSkuDetails": false,
  "priceMin": 0,
  "priceMax": 0,
  "enableAiLabels": true,
  "enableDataCleaning": true,
  "enableLlmAnalysis": false,
  "llmApiKey": "",
  "llmBaseUrl": "https://api.openai.com/v1",
  "llmModel": "gpt-4o-mini",
  "enableCrossPlatformComparison": false,
  "compareTaobao": true,
  "compareAliexpress": true,
  "productWeightGrams": 50,
  "shippingRatePerGram": 0.35,
  "platformFeePercent": 0.12,
  "customsPercent": 0
}
```

# 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": [
        "bluetooth earbuds"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("loongge/1688-wholesale-analyzer").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": ["bluetooth earbuds"] }

# Run the Actor and wait for it to finish
run = client.actor("loongge/1688-wholesale-analyzer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "bluetooth earbuds"
  ]
}' |
apify call loongge/1688-wholesale-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=loongge/1688-wholesale-analyzer",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "1688 Wholesale Analyzer - AI Insights & Smart Labels",
        "description": "Extract and analyze 50+ fields per product from 1688.com with AI-powered smart labels (hot/profitable/new), data cleaning, and enriched supplier intelligence. Search by keyword or offer IDs. Better than raw scraping — get actionable insights for your sourcing decisions.",
        "version": "0.1",
        "x-build-id": "SjUCzgM3Smo65JNJk"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/loongge~1688-wholesale-analyzer/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-loongge-1688-wholesale-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/loongge~1688-wholesale-analyzer/runs": {
            "post": {
                "operationId": "runs-sync-loongge-1688-wholesale-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/loongge~1688-wholesale-analyzer/run-sync": {
            "post": {
                "operationId": "run-sync-loongge-1688-wholesale-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "keywords"
                ],
                "properties": {
                    "keywords": {
                        "title": "Search Keywords",
                        "type": "array",
                        "description": "Keywords to search on 1688.com. Supports Chinese and English. English keywords tend to return more stable results.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "offerIds": {
                        "title": "Offer IDs",
                        "type": "array",
                        "description": "Specific 1688 product IDs to fetch directly. Leave empty to use keyword search instead.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of products to return per keyword.",
                        "default": 20
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "relevance",
                            "sale",
                            "price_asc",
                            "price_desc",
                            "credit"
                        ],
                        "type": "string",
                        "description": "How to sort search results on 1688.",
                        "default": "relevance"
                    },
                    "includeSkuDetails": {
                        "title": "Include SKU Details",
                        "type": "boolean",
                        "description": "Extract SKU/variant details including stock levels and tier pricing.",
                        "default": false
                    },
                    "priceMin": {
                        "title": "Min Price (CNY)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Minimum price filter in CNY. Set to 0 for no lower limit.",
                        "default": 0
                    },
                    "priceMax": {
                        "title": "Max Price (CNY)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Maximum price filter in CNY. Set to 0 for no upper limit.",
                        "default": 0
                    },
                    "enableAiLabels": {
                        "title": "AI Smart Labels & Scoring",
                        "type": "boolean",
                        "description": "Auto-tag products with smart labels (Hot, High-Profit, New, Best Value, etc.) and generate profitScore, competitionScore, riskLevel, and summary.",
                        "default": true
                    },
                    "enableDataCleaning": {
                        "title": "Data Cleaning & Dedup",
                        "type": "boolean",
                        "description": "Clean data: remove duplicates, normalize prices, filter invalid items.",
                        "default": true
                    },
                    "enableLlmAnalysis": {
                        "title": "LLM Deep Analysis",
                        "type": "boolean",
                        "description": "Enhance each product with LLM-generated insights: English summary, market positioning, and sourcing advice. Requires llmApiKey.",
                        "default": false
                    },
                    "llmApiKey": {
                        "title": "LLM API Key",
                        "type": "string",
                        "description": "API key for OpenAI-compatible LLM service (OpenAI, DeepSeek, etc.). Also accepts LLM_API_KEY env variable.",
                        "default": ""
                    },
                    "llmBaseUrl": {
                        "title": "LLM API Base URL",
                        "type": "string",
                        "description": "Base URL for OpenAI-compatible API. Change this for DeepSeek (https://api.deepseek.com/v1) or other providers.",
                        "default": "https://api.openai.com/v1"
                    },
                    "llmModel": {
                        "title": "LLM Model",
                        "type": "string",
                        "description": "Model name for LLM analysis. Examples: gpt-4o-mini, deepseek-chat, gpt-4o.",
                        "default": "gpt-4o-mini"
                    },
                    "enableCrossPlatformComparison": {
                        "title": "Cross-Platform Price Comparison",
                        "type": "boolean",
                        "description": "Compare 1688 wholesale prices against Taobao and AliExpress retail prices. Shows margin analysis for sourcing decisions. Note: increases Actor run time and compute usage.",
                        "default": false
                    },
                    "compareTaobao": {
                        "title": "Compare with Taobao",
                        "type": "boolean",
                        "description": "Include Taobao (淘宝) retail prices in comparison. Same currency (CNY) as 1688.",
                        "default": true
                    },
                    "compareAliexpress": {
                        "title": "Compare with AliExpress",
                        "type": "boolean",
                        "description": "Include AliExpress retail prices in comparison. Auto-converts USD to CNY for margin calculation.",
                        "default": true
                    },
                    "productWeightGrams": {
                        "title": "Product Weight (grams)",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Estimated product weight in grams for shipping cost calculation. Used by Profit Calculator. Default: 50g (small electronics).",
                        "default": 50
                    },
                    "shippingRatePerGram": {
                        "title": "Shipping Rate (CNY/gram)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Shipping cost per gram in CNY. Default: 0.35 (economy cross-border). Used by Profit Calculator.",
                        "default": 0.35
                    },
                    "platformFeePercent": {
                        "title": "Platform Fee (%)",
                        "minimum": 0,
                        "maximum": 0.5,
                        "type": "number",
                        "description": "Platform commission as decimal (0.12 = 12%). Covers AliExpress/Amazon/Shopify fees. Used by Profit Calculator.",
                        "default": 0.12
                    },
                    "customsPercent": {
                        "title": "Customs/Duty Rate (%)",
                        "minimum": 0,
                        "maximum": 1,
                        "type": "number",
                        "description": "Customs duty as decimal (0 = no duty). Varies by country and product category. Used by Profit Calculator.",
                        "default": 0
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
