# Taobao Agent Link Converter (`teodor_banea/taobao-agent-link-converter-cnfans-hoobuy-oopbuy-superbuy`) Actor

Convert any Taobao, Tmall, 1688 or Weidian product link — raw URLs, short links, or links from 30+ shopping agents like CNFans, Hoobuy, OOPBuy, Superbuy, Kakobuy, Joyagoo and legacy Pandabuy — into the marketplace URL plus ready-to-open links for every major agent. Bulk, offline, instant.

- **URL**: https://apify.com/teodor\_banea/taobao-agent-link-converter-cnfans-hoobuy-oopbuy-superbuy.md
- **Developed by:** [Banea Teodor](https://apify.com/teodor_banea) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Taobao Agent Link Converter — CNFans, Hoobuy, OOPBuy, Superbuy & 20+ Agents

### What does Taobao Agent Link Converter do?

Paste any China product link and get it back in every form you need. It recognizes raw
**Taobao, Tmall, 1688, Weidian, JD and Xianyu** product URLs (desktop, mobile, app-share
and short links) and product links from **30+ shopping agents** — CNFans, Mulebuy, Orientdig,
Joyagoo, Lovegobuy, ACBuy, Hoobuy, Usfans, Ponybuy, OOPBuy, Ootdbuy, Hipobuy, Cnshopper,
CSSBuy, Superbuy, AllChinaBuy, Sugargoo, Kakobuy, Hubbuy, EastMallBuy, Loongbuy, iTaoBuy,
plus legacy Pandabuy, Wegobuy, Hagobuy, Joyabuy, Wemimi and Basetao links (old spreadsheets
convert too) — and returns the marketplace, the product ID, the canonical marketplace URL and a
**ready-to-open link for every current agent**. No login, no browser, no China IP.

### Why use this Actor?

- **Convert between agents in bulk**: turn a Pandabuy-era spreadsheet into CNFans or
  Hoobuy links in one run, or publish one list that works for every agent.
- **Recover the real Taobao / Weidian / 1688 URL** behind any agent link.
- **Short links resolved**: `m.tb.cn` share pages, `k.weidian.com` and `qr.1688.com`
  redirects are followed so app-shared links convert too (expired Taobao shares are reported
  as such).
- **Honest output**: every input gets a row; unrecognized or unresolvable links say why
  in the `error` column instead of disappearing.
- **Near-zero cost**: conversion is pure parsing — thousands of links finish in seconds.

### How much does it cost?

You pay per link processed. At **$0.50 per 1,000 links**, converting a 500-row spreadsheet
costs **$0.25**. Blank lines are skipped and not billed; rows that could not be converted
(`unrecognized` / `unresolved`) are still processed rows and count.

### Input

| Field | Type | Description |
|---|---|---|
| `links` | array | Product links, one per line. Raw marketplace URLs, agent links, or short links. |
| `resolveShortLinks` | boolean | Follow redirects for short links (default `true`). One HTTP request per short link. |
| `agents` | array | Agents to generate links for. Empty (default) means all supported agents. |

### Output

One dataset item per non-empty input link, in input order (blank lines are skipped and
surrounding whitespace is trimmed):

```json
{
    "inputUrl": "https://hoobuy.com/product/0/1025411009174",
    "status": "ok",
    "platform": "1688",
    "productId": "1025411009174",
    "rawUrl": "https://detail.1688.com/offer/1025411009174.html",
    "sourceAgent": "hoobuy",
    "inputType": "agent",
    "agentLinks": {
        "cnfans": "https://cnfans.com/product?id=1025411009174&platform=ALI_1688",
        "mulebuy": "https://mulebuy.com/product/?shop_type=ali_1688&id=1025411009174",
        "acbuy": "https://www.acbuy.com/product?id=1025411009174&source=AL",
        "hoobuy": "https://hoobuy.com/product/0/1025411009174",
        "oopbuy": "https://oopbuy.com/goods/details?id=1025411009174&channel=1688",
        "cssbuy": "https://www.cssbuy.com/item-1688-1025411009174.html",
        "superbuy": "https://www.superbuy.com/en/page/buy/?url=https%3A%2F%2Fdetail.1688.com%2Foffer%2F1025411009174.html",
        "allchinabuy": "https://www.allchinabuy.com/en/page/buy/?url=https%3A%2F%2Fdetail.1688.com%2Foffer%2F1025411009174.html",
        "sugargoo": "https://www.sugargoo.com/#/home/productDetail?productLink=https%3A%2F%2Fdetail.1688.com%2Foffer%2F1025411009174.html",
        "kakobuy": "https://www.kakobuy.com/item/details?url=https%3A%2F%2Fdetail.1688.com%2Foffer%2F1025411009174.html",
        "joyagoo": "https://joyagoo.com/product?id=1025411009174&platform=ALI_1688",
        "...": "one key per selected agent (22 by default)"
    },
    "error": null,
    "scrapedAt": "2026-09-10T14:30:00.000Z"
}
```

`status` is `ok`, `unrecognized` (no known pattern matched) or `unresolved` (a short link
that could not be followed). The **Agent links** dataset view flattens `agentLinks` into one
column per agent for spreadsheet export.

### Tips and tricks

- **Tmall items are Taobao items** to every agent: a Tmall link keeps `platform: "tmall"`
  and a Tmall `rawUrl`, but its agent links use the agents' Taobao channel.
- **Weidian, JD and Xianyu** are supported by fewer agents; agents that cannot open a
  platform get `null` in `agentLinks` rather than a guessed URL.
- **Legacy agents** (Pandabuy, Wegobuy, Hagobuy, Joyabuy, Wemimi, Basetao) are parsed so old
  spreadsheets convert, but no links are generated for them. Pandabuy `page.link` short links
  are reported as unresolvable — that shortener is gone for good.
- **Messy real-world links are fine**: double- or triple-encoded URLs, agent links wrapped in
  other agent links or login redirects, `.html` leaking into an ID, affiliate and `spm` tracking
  parameters, missing schemes — all handled.
- **Usfans and Ponybuy** only publish Taobao and Weidian product routes, so their links are
  `null` for 1688 items.
- **Taobao search tokens** (the 47-character IDs from CNFans/OOPBuy search results) are not
  product IDs and cannot be converted; use numeric item IDs.

### Integrations

Export the dataset as CSV/Excel from the Apify Console, connect it to Google Sheets, Zapier
or Make, or call the Actor from your own spreadsheet builder or Discord bot through the
Apify API.

# Actor input Schema

## `links` (type: `array`):

Enter one link per line (blank lines are skipped). Accepts raw Taobao, Tmall, 1688, Weidian, JD and Xianyu product URLs (desktop, mobile and short links) and product links from 30+ shopping agents — CNFans, Mulebuy, Orientdig, Joyagoo, Lovegobuy, ACBuy, Hoobuy, Usfans, Ponybuy, OOPBuy, Ootdbuy, Hipobuy, Cnshopper, CSSBuy, Superbuy, AllChinaBuy, Sugargoo, Kakobuy, Hubbuy, EastMallBuy, Loongbuy, iTaoBuy, plus legacy Pandabuy, Wegobuy, Hagobuy, Joyabuy, Wemimi and Basetao links.

## `resolveShortLinks` (type: `boolean`):

Follow redirects for shortened marketplace links (m.tb.cn, k.weidian.com, qr.1688.com) to find the product ID. Needs one HTTP request per short link.

## `agents` (type: `array`):

Select which shopping agents to generate links for. Leave empty for all supported agents.

## Actor input object example

```json
{
  "links": [
    "https://cnfans.com/product?platform=TAOBAO&id=889819872782",
    "https://hoobuy.com/product/0/1025411009174",
    "https://weidian.com/item.html?itemID=7305431890"
  ],
  "resolveShortLinks": true
}
```

# Actor output Schema

## `conversions` (type: `string`):

Every input link with its status, platform, product ID, canonical marketplace URL, source agent and the per-agent link matrix.

## `agentLinksTable` (type: `string`):

One column per shopping agent, one row per input link — ready to paste into a spreadsheet.

# 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 = {
    "links": [
        "https://cnfans.com/product?platform=TAOBAO&id=889819872782",
        "https://hoobuy.com/product/0/1025411009174",
        "https://weidian.com/item.html?itemID=7305431890"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("teodor_banea/taobao-agent-link-converter-cnfans-hoobuy-oopbuy-superbuy").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 = { "links": [
        "https://cnfans.com/product?platform=TAOBAO&id=889819872782",
        "https://hoobuy.com/product/0/1025411009174",
        "https://weidian.com/item.html?itemID=7305431890",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("teodor_banea/taobao-agent-link-converter-cnfans-hoobuy-oopbuy-superbuy").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 '{
  "links": [
    "https://cnfans.com/product?platform=TAOBAO&id=889819872782",
    "https://hoobuy.com/product/0/1025411009174",
    "https://weidian.com/item.html?itemID=7305431890"
  ]
}' |
apify call teodor_banea/taobao-agent-link-converter-cnfans-hoobuy-oopbuy-superbuy --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,teodor_banea/taobao-agent-link-converter-cnfans-hoobuy-oopbuy-superbuy"
        }
    }
}
```

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/yzbIAANjgXIzDaTMA/builds/mvxRIuZpXIq8rgSme/openapi.json
