Taobao APIs require an active paid subscription. The 7-day free trial includes 1688 and Weidian only. Calls without the required subscription return HTTP 403 with PAID_SUBSCRIPTION_REQUIRED. Upgrade in the developer center and continue using the same API key.
Agent API & MCP
Audience: LLM agents, tool-calling runtimes, and MCP clients (Cursor, Claude Desktop). For human backends and storefronts, use
/v1/*+ OpenAPI .
AI integrations: MCP and the
hiobuy-agent-apiSkill expose live China sourcing tools on 1688, Taobao, and Weidian to LLM agents — keyword search, image search, and bilingual product detail for shopping agent workflows in Cursor and Claude Desktop.
Related: Authentication · Products · Response format · Errors · Rate limits
When to use which surface
| Integration | Base path | Key | Notes |
|---|---|---|---|
| Storefront / backend REST | /v1/* | hio_live_* | Documented across this site; optional response_format=upstream on /v1 only |
| Agent tool calling (HTTP) | /ai/v1/* | hio_live_* only | Standard JSON envelope; maps to existing API Key scopes |
| MCP (Streamable HTTP) | /mcp | hio_live_* only | Same tools as /ai/v1; adds prompts, resources, SSE session |
| OpenAPI codegen | /v1/* | hio_live_* | Does not describe /ai/v1 or /mcp |
Tool data payloads match the standard shapes from Product response models and list endpoints — never upstream raw format.
Prerequisites (Live key)
Before calling /ai/v1 or /mcp:
- Register, verify your email and complete the required account details in the developer center. The system creates your first application automatically. Open that application and explicitly create an API key; the full key is shown once. Product queries use real 1688, Taobao and Weidian data without manual application review or personal marketplace OAuth. Allow the system to finish preparing channel access before the first request.
- Use the API key issued by the developer center, with the current
hio_live_prefix, inAuthorization: Bearer <API_KEY>. Base URL:https://api.hiobuy.com. Store credentials on your server. Keep API keys, marketplace tokens, warehouse credentials and Portal session tokens out of browser code, public repositories and logs. - Create a Live API key under API Keys (
hio_live_*— shown once at creation). - Grant scopes for Phase 1 tools at minimum:
product:detail—product.get_detailproduct:search—product.search,product.upload_image,product.search_by_image
Missing channel auth or scope → 401 / 403. Live calls consume channel quota and are logged like /v1.
Base URL & authentication
Same host as Public API, e.g. https://api.hiobuy.com.
Authorization: Bearer hio_live_<your_key>Each tool maps to an existing API Key scope — there is no separate tools:* scope.
HTTP endpoints (/ai/v1)
| Method | Path | Purpose |
|---|---|---|
| GET | /ai/v1/tools | List tools your key may call (includes input_schema) |
| POST | /ai/v1/tools/call | Invoke a tool by tool_id + arguments |
List tools
curl -s https://api.hiobuy.com/ai/v1/tools \
-H "Authorization: Bearer hio_live_xxx"Returns only tools allowed by the key’s scopes. Each entry includes id, version, domain, description, and JSON Schema input_schema.
Call a tool
POST /ai/v1/tools/call
Authorization: Bearer hio_live_xxx
Content-Type: application/json
{
"tool_id": "product.get_detail",
"arguments": {
"channel": "1688",
"product_id": "554456348334",
"language": "en"
}
}Success envelope (all tools):
| Field | Description |
|---|---|
tool_id | Echo of request |
ok | Always true on success |
data | Tool payload (see below) |
request_id | Trace id — include in support tickets |
Failure: HTTP 4xx/5xx with { "error": { "code", "message", "request_id" } } — no ok field. See Errors for shared codes (INVALID_API_KEY, FORBIDDEN, RATE_LIMITED, …).
Phase 1 tools (products)
tool_id | Scope | Maps to (conceptually) |
|---|---|---|
product.get_detail | product:detail | Product detail |
product.search | product:search | Keyword search |
product.upload_image | product:search | Upload image |
product.search_by_image | product:search | Image search |
fulfillment.list_shipping_channels | warehouse:read or shipment:create | Shipping channels |
fulfillment.quote_shipping | shipment:create | Freight estimate |
Fulfillment tools require a connected fulfillment warehouse in Live mode. If none is connected, the tool stays discoverable and returns WAREHOUSE_NOT_CONNECTED with action_required.type = CONNECT_WAREHOUSE. Freight estimates are read-only budgets, not locked prices; preserve completeness, warnings, known_total, total, and pending charges instead of recalculating them client-side.
product.get_detail
- Channel:
taobao|1688|weidian - Required:
channel+ one ofid|product_id|url|mi_id|tao_password - Optional:
language(defaulten) data:{ "product": StandardProduct }- Taobao
id/mi_idrotates periodically — do not cache long-term; re-fetch before checkout.
product.search
- Required:
channel,keyword - Optional:
page,page_size,language,sort_field,sort_order,price_start,price_end,ship_within_hours,category_ids,product_collection_id,experience_score_level,product_attrs,filter,sale_filters,keyword_translate,response_format data: StandardProductList (same asPOST /v1/products/search)- See Product keyword search for field details and channel differences.
product.upload_image
- Channel:
1688|taobao - 1688:
image_base64orimage_url - Taobao:
image_base64required data:{ "channel", "image_id" }— reuseimage_idfor paginated image search
product.search_by_image
- Channel:
1688|taobao(not Weidian) - Input:
image_id|image_url|image_base64 - Recommended flow for pagination:
product.upload_imageonce → multipleproduct.search_by_imagecalls withimage_idonly
Agent workflow (HTTP)
1. GET /ai/v1/tools → cache tool metadata / input_schema
2. Model picks tool_id + arguments from user intent
3. POST /ai/v1/tools/call (Bearer hio_live_…)
4. Summarize data for the userTypical chains:
- One-shot image search:
product.search_by_imagewithimage_urlorimage_base64 - Paginated image search:
product.upload_image→product.search_by_image(image_id+page) - After user picks an item:
product.get_detail
MCP server (/mcp) — China sourcing for AI agents
In Cursor, Claude Desktop, and other MCP clients, agents call tools for China sourcing and proxy shopping on 1688 (wholesale), Taobao (retail), and Weidian — keyword search, image upload, image search, and bilingual product detail. Typical shopping agent chains: compare factory quotes on 1688, find Taobao alternatives, browse Weidian catalogs, then drill into SKU/stock via product.get_detail.
The same tool runtime is exposed as an MCP Server over Streamable HTTP (Cursor, Claude Desktop, other MCP clients).
| Method | Path | MCP usage |
|---|---|---|
| POST | /mcp | JSON-RPC: initialize, tools/list, tools/call, prompts/*, resources/*, … |
| GET | /mcp | SSE long poll (requires Mcp-Session-Id) |
Auth: same Authorization: Bearer hio_live_* header.
Capabilities:
- Tools —
tools/list,tools/call(sametool_idvalues as/ai/v1) - Prompts — built-in product search / image search / research workflows
- Resources —
hiobuy://agent/*URIs (resources/list,resources/read, templates) - Subscriptions —
resources/subscribe→ SSEnotifications/resources/updated - Streaming —
GET /mcpopens SSE;POSTwithAccept: text/event-streammay stream JSON-RPC - Sampling — server may send
sampling/createMessageover SSE; client replies viaPOST /mcp(202)
Recommended session flow:
POST initialize→ store response headerMcp-Session-IdGET /mcpwith session → open SSE listenerPOST notifications/initializedPOST tools/list/tools/call
On success, tools/call → result.content[0].text is the same JSON envelope as /ai/v1/tools/call.
Cursor configuration (shopping agent MCP)
Add to Settings → MCP or .cursor/mcp.json to give Cursor live 1688 / Taobao / Weidian China sourcing tools:
{
"mcpServers": {
"hiobuy": {
"url": "https://api.hiobuy.com/mcp",
"headers": {
"Authorization": "Bearer hio_live_xxx"
}
}
}
}Replace hio_live_xxx with your Live key. Keep keys server-side — do not commit them to public repos.
Cursor Agent Skill (hiobuy-agent-api) — China shopping agent
The optional hiobuy-agent-api Cursor Agent Skill helps coding agents wire 1688, Taobao, and Weidian China sourcing flows — Live-key scopes, /ai/v1 envelopes, MCP session headers, and search → image search → detail tool chains. For REST storefronts on /v1/*, use OpenAPI instead.
It teaches the model:
- Live-key prerequisites and scopes for 1688 / Taobao / Weidian product tools
/ai/v1request/response envelopes and Phase 1 tool arguments- MCP session headers and Cursor
mcp.jsonwiring for China shopping workflows - Error codes and sourcing tool chains (search → image search → detail)
Install from the public repo hiobuy-agent-skills — clone or copy SKILL.md into your Cursor skills path (see Cursor Agent Skills ).
git clone https://github.com/hubinjie/hiobuy-agent-skills.gitThe skill complements this page — this site remains the canonical API reference for scopes, quotas, and product field semantics.
Quick reference
BASE=https://api.hiobuy.com
KEY=hio_live_xxx
curl -s "$BASE/ai/v1/tools" -H "Authorization: Bearer $KEY"
curl -s "$BASE/ai/v1/tools/call" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"tool_id":"product.search","arguments":{"channel":"1688","keyword":"phone case","page":1,"page_size":5}}'Get Support
Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days