Product category matching
This API intelligently matches product categories across platforms using a large language model (LLM). Input product information from a source platform to get the optimal leaf category path, ID, a confidence score (0–100), and a matching reason for the target platform. Currently, this service only supports TEMU as the target platform. This is a synchronous call.
Purpose and use cases
The primary challenge in cross-platform product listing is category selection. The category systems of a source platform (like 1688) and a target platform (like TEMU) are completely different. Manually mapping them requires familiarity with tens of thousands of leaf categories on the target platform, a time-consuming and error-prone process. Mismatched categories can directly harm product visibility and traffic.
This API automates this step and is ideal for the following scenarios:
-
Top sellers with custom systems: Make batch API calls to integrate with an Enterprise Resource Planning (ERP) system and automate category mapping.
-
ERP / SaaS platform integration: Incorporate this API as a step in an automated product listing workflow.
-
Quick single-item listing for SMBs: Merchants can submit products individually and get category suggestions in seconds.
If you also need to fill in the required attributes for a category (such as color or material), use Product Attribute Matching.
API
POST /rest/ai/category/match
The Product Category Matching API (OpenAPI Portal) on the Alibaba Cloud OpenAPI Developer Portal provides complete details on request signing, SDK examples for multiple languages (Java, Python, and Go), and online debugging.
Request parameters
|
Parameter |
Type |
Required |
Description |
|
|
String |
Yes |
The source platform, for example, |
|
|
String |
Yes |
The target platform. Currently, only |
|
|
String |
Yes |
The product title, which serves as the primary source of semantic information for the model. |
|
|
String |
Yes |
The product's original category on the source platform, which helps with disambiguation. |
|
|
String |
Yes |
A detailed product description. Providing more details, such as material, use cases, and specifications, improves matching accuracy. |
|
|
String |
No |
Product SKU titles, such as |
|
|
String |
No |
Key-value pairs for product attributes, for example, |
Response parameters
|
Parameter |
Type |
Description |
|
|
String |
The status code. A value of |
|
|
String |
The response message. For a successful request, the value is typically |
|
|
Boolean |
Indicates whether the API call was successful. |
|
|
String |
The request ID. |
|
|
Boolean |
Indicates whether a category was successfully matched. If |
|
|
String |
The ID of the matched leaf category on the target platform. You can pass this ID directly to the target platform's publishing API. |
|
|
String |
The full category path, separated by |
|
|
String |
The name of the leaf category, which is the last segment of the |
|
|
Number |
The confidence score, from 0 to 100. A score of 85 or higher is generally reliable for direct use. A score between 70 and 85 suggests a manual review. A score below 70 requires manual handling. |
|
|
String |
A natural language explanation of the matching reason, useful for traceability and tuning. |
|
|
Number |
The number of processing units consumed by this call, used for billing. |
Example
Request example
{
"SourcePlatform": "1688",
"TargetPlatform": "temu",
"Title": "Airtag Cat Collar, Anti-Loss Location Tracker with Reflective Strap and Bell",
"SourceCategory": "Tracker",
"Description": "Blue woven nylon collar with a built-in AirTag-compatible tracking module, reflective strip, and bell. Adjustable buckle fits different body sizes. Patent No. ZL 2022 3 0251055.5.",
"ItemSpec": "Material:Nylon/Silicone,Color:Blue,Target:Cat,Adjustable:Yes"
}
Response example
{
"Code": "Success",
"Message": "Success",
"Success": true,
"RequestId": "2157065A-D6C8-1F3E-A4D0-B1234567890",
"Data": {
"MatchSuccessful": true,
"CategoryId": "1522",
"CategoryPath": "Pet Supplies/Cat Supplies/Cat Collars, Harnesses & Leashes/Location & Activity Trackers",
"CategoryName": "Location & Activity Trackers",
"Confidence": 96,
"Reason": "The core product is a cat collar with AirTag tracking, which belongs to the 'Location & Activity Trackers' category. The leaf category semantically matches the product's tracking function and its use for cats.",
"UsageMap": { "ProcessingCount": 1 }
}
}
Best practices
-
Improve matching accuracy: Provide the
DescriptionandItemSpecparameters whenever possible. A request with only aTitletypically yields a confidence score 10–20 points lower. -
Implement a confidence threshold strategy: We recommend setting up a three-tier workflow on the client side: automatically accept results with a confidence score of 85 or higher, send results between 70 and 85 to a manual review queue, and fall back to a full manual process for results below 70.
-
Handle multi-language product titles: The model supports a mix of Chinese and English. However, for best results, the input language should match the language of the
SourcePlatform. If the source title is already in English (for example, from the international site of 1688), you can submit it as is. -
Combine with attribute matching: For bulk product listings, you typically need to provide both the category and its required attributes. Call the Product Attribute Matching API to get both in a single response, which is more cost-effective than calling two separate APIs.
Error codes
|
Error code |
Description |
|
|
A required field is missing, or the |
|
|
The input content triggered a security review. |
|
|
The downstream LLM service is temporarily unavailable. We recommend retrying the request using exponential backoff. |
|
|
The trial quota has been exhausted. |
|
|
An internal error occurred. Please save the |
For a complete list of error codes, see Error Codes.
Limits
-
Invocation mode: Synchronous call. Default QPS is 2, with a 30-second request timeout. For details, see Rate Limits.
-
Target platform: Currently, only TEMU is supported. More platforms will be added in the future.
-
Billing: The service is priced at CNY 0.015 per call, based on the
ProcessingCount. For details, see Product Asset Optimization Billing.
Next steps
-
Product Attribute Matching - Get both the category and its required attributes in a single call.
-
Product Asset Optimization Lite - An automated workflow that combines category matching and asset processing.