Category prediction resource

The category prediction resource was created to help sellers and developers predict under which category a certain item should be listed. It’s currently working for Argentina, Bolivia, Brasil, Chile, Colombia, Costa Rica, Dominicana, Ecuador, Honduras, Guatemala, México, Nicaragua, Paraguay, Panamá, Perú, Portugal, Salvador, Uruguay and Venezuela.

Parameters

Parameter Description
title The title of the item to predict. It must be a complete title in the language of the site. This parameter is mandatory.
category_from This parameter accepts a level 1 category, and it is used to limit the prediction to the subtree that spans from category_from to the root. This parameter is optional.
price The price of the item to predict. The purpose of this parameter is to provide additional information in order to improve the prediction. This parameter is optional.
seller_id Seller’s ID of the item to predict. The purpose of this parameter is to provide additional information in order to improve the prediction. This parameter is optional.

Predicting by GET

Using the GET method it’s possible to predict one item at a time:

`curl https://api.mercadolibre.com/sites/MLB/category_predictor/predict?title=Ipod%20Touch%20Apple%2016gb%205%20Gera%C3%A7%C3%A3o`


Predicting by POST

Using the POST method it’s possible to predict multiple (up to 1K) items at a time. When multiple items needs to be predicted, this method is recommended. To do this you need to send an array of JSON encoded titles and categories to predict, like in the following example:

curl -X POST -H "Content-Type: application/json" -d
'[{"title": "Ipod Touch Apple 16gb 5 Geração","category_from": "MLB1743"},{"title": "Ipod Touch Apple 16gb 5 Geração","category_from": "MLB1743"}]'
https://api.mercadolibre.com/sites/MLB/category_predictor/predict


Response fields

Parameter Description
id Id of predicted category for the item.
name Name of the predicted category.
prediction_probability Confidence of the prediction. This value ranges between [0, 1], values closer to zero indicate low confidence whereas values closer to 1 indicate high confidence.
path_from_root List with the categories from the root to the leaf (the predicted category). Every category is represented by ID and NAME attributes.
variations this field appears only when the predicted category supports variations.
shipping_modes Shipping modes supported by the predicted category.

Please rate this