Product category matching

Updated at:

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

Request parameters

Parameter

Type

Required

Description

SourcePlatform

String

Yes

The source platform, for example, 1688.

TargetPlatform

String

Yes

The target platform. Currently, only temu is supported. More platforms will be added in the future.

Title

String

Yes

The product title, which serves as the primary source of semantic information for the model.

SourceCategory

String

Yes

The product's original category on the source platform, which helps with disambiguation.

Description

String

Yes

A detailed product description. Providing more details, such as material, use cases, and specifications, improves matching accuracy.

Sku

String

No

Product SKU titles, such as "0:0:Color:Black;0:1:Color:Blue;...", which help the model understand products with multiple variations.

ItemSpec

String

No

Key-value pairs for product attributes, for example, "Material:Polyester,Target:Unisex,Brand:Aimason". Providing this information significantly improves leaf category matching accuracy.

Response parameters

Parameter

Type

Description

Code

String

The status code. A value of Success indicates a successful operation.

Message

String

The response message. For a successful request, the value is typically ok or "Success".

Success

Boolean

Indicates whether the API call was successful.

RequestId

String

The request ID.

Data.MatchSuccessful

Boolean

Indicates whether a category was successfully matched. If false, other fields in the Data object might be empty.

Data.CategoryId

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.

Data.CategoryPath

String

The full category path, separated by /. For example, Pet Supplies/Cat Supplies/Cat Collars, Harnesses & Leashes/Location & Activity Trackers.

Data.CategoryName

String

The name of the leaf category, which is the last segment of the CategoryPath.

Data.Confidence

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.

Data.Reason

String

A natural language explanation of the matching reason, useful for traceability and tuning.

Data.UsageMap.ProcessingCount

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 Description and ItemSpec parameters whenever possible. A request with only a Title typically 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

InvalidParameter

A required field is missing, or the TargetPlatform is not temu.

InputContentBlocked

The input content triggered a security review.

DownstreamUnavailable

The downstream LLM service is temporarily unavailable. We recommend retrying the request using exponential backoff.

FreeQuotaExhausted

The trial quota has been exhausted.

InternalError

An internal error occurred. Please save the RequestId and contact technical support.

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