Set categories for your products

Categories are a hierarchical set of groups in which items of a similar nature are listed, called “Category Tree”. Categories help buyers find the kind of items they want, as the buyer only needs to look into one or few categories to find items they are interested in. Sellers benefit from the use of categories by the increasing chances of selling due to better and faster access to items by buyers.
Each site has its own set of categories, which means that Argentina will have a unique set of categories, different from the ones in Brazil.
Before listing an item, you need to go through the category structure and choose the one in which you want to list. To help you make it, you can download the complete category hierarchy with ID and human-friendly names from our API.

Contents:

Categories by Site

The Sites resource can give you the category structure for a particular country, in this case Argentina.

https://api.mercadolibre.com/sites/MLA/categories
"categories": [
{
"id": "MLA5725",
"name": "Accesorios para Vehiculos",
},
{
"id": "MLA1071",
"name": "Animales y Mascotas",
},
{
"id": "MLA1367",
"name": "Antigüedades",
},
{
"id": "MLA1743",
"name": "Autos, Motos y Otros",
},

For a second level categories, or information related to specific categories, you have to use the Categories resource, sending the category Id as a URL parameter.
The next example shows the “Animales y Mascotas” category:

https://api.mercadolibre.com/categories/MLA1071
{
"id": "MLA1071",
"name": "Animales y Mascotas",
"permalink": "http://home.mercadolibre.com.ar/animales-y-mascotas",
"total_items_in_this_category": "30434",
"path_from_root": [
{
"id": "MLA1071",
"name": "Animales y Mascotas",
},
],
"children_categories": [
{
"id": "MLA1100",
"name": "Aves",
"total_items_in_this_category": "1430",
},
{
"id": "MLA1117",
"name": "Caballos",
"total_items_in_this_category": "1092",
},
.
.


As you can see, you get the “path_from_root” and children_categories attributes. Use these attributes to browse through the category tree and find the specific category for your item.
Categories JSON
Making a call to a particular category will let you know specific information and description that belongs to it. Following you’ll find the description of some of these attributes.

curl https://api.mercadolibre.com/categories/MLA9558
{
"id": "MLA9558",
"name": "Givenchy",
"picture": null,
"permalink": null,
"total_items_in_this_category": 706,
"path_from_root": [
{
"id": "MLA1246",
"name": "Salud y Belleza"
},
{
"id": "MLA1271",
"name": "Perfumes y Fragancias"
},
{
"id": "MLA1273",
"name": "Mujer"
},
{
"id": "MLA9558",
"name": "Givenchy"
}
],
"children_categories": [
],
"attribute_types": "none",
"settings": {
"adult_content": false,
"buying_allowed": true,
"buying_modes": [
"buy_it_now",
"auction"
],
"coverage_areas": "not_allowed",
"currencies": [
"ARS"
],
"fragile": false,
"immediate_payment": "optional",
"item_conditions": [
"used",
"not_specified",
"new"
],
"items_reviews_allowed": false,
"max_description_length": 50000,
"max_pictures_per_item": 12,
"max_sub_title_length": 70,
"max_title_length": 60,
"price": "required",
"restrictions": [
],
"rounded_address": false,
"seller_contact": "not_allowed",
"shipping_modes": [
"custom",
"not_specified",
"me2",
"me1"
],
"shipping_options": [
"custom",
"carrier"
],
"shipping_profile": "optional",
"show_contact_information": false,
"simple_shipping": "optional",
"stock": "required",
"tags": [
],
"vip_subdomain": "articulo",
"mirror_category": null,
"listing_allowed": true,
"maximum_price": null,
"minimum_price": null
},
"meta_categ_id": 38838,
"attributable": false
}

Name

This attribute shows a human-friendly label. You cannot use this label to search items. If you are interested in searching using categories ids, you can use the following request:

curl https://api.mercadolibre.com/sites/MLA/search?category=MLA5726



See more on search items by category article.

Path from root

When you are in a category you can know the path from root to the category selected.
Take a look how MercadoLibre uses this path to show the item’s category:image-category

Finding the best category for your item

A leaf category is the last category on the tree and those are the only categories where you can post items.
Choosing the right category for your item will determine how quickly buyers will find your item and will improve your chances of selling it. For this reason, we highly recommend to use our Category predictor tool before listing an item.

Maybe some categories won’t have a good suggestions, so you’ll have to make the user of your system to map manually the categories for his products. The simplest process could be to use the Category API and navigate the category tree to detect the best option. You must use only those categories retrieved from the API which don’t have subcategories related.

Another option could be to find similar items in MercadoLibre and use their category.



Next topic: List products



Related articles:

Use our Category predictor tool before listing an item.

Learn how to list products.

Please rate this