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
→Categories JSON
→Path from root


Categories by site

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

Request:

curl -X GET https://api.mercadolibre.com/sites/CBT/categories

Response:

[
   {
      "id":"CBT1071",
      "name":"Animals and Pets"
   },
   {
      "id":"CBT1367",
      "name":"Antiques and Collectibles"
   },
   {
      "id":"CBT5726",
      "name":"Appliances"
   },
   {
      "id":"CBT1368",
      "name":"Art, Craft and School Supplies"
   },
   {
      "id":"CBT1384",
      "name":"Babies"
   },
   {
      "id":"CBT1246",
      "name":"Beauty and Personal Care"
   },
   {
      "id":"CBT3025",
      "name":"Books, Magazines and Comics"
   },
   {
      "id":"CBT1039",
      "name":"Cameras and Accessories"
   },
   {
      "id":"CBT1743",
      "name":"Cars, Motorcycles and Others"
   },
   {
      "id":"CBT1051",
      "name":"Cell Phones and Phones"
   },
   {
      "id":"CBT1430",
      "name":"Clothing and Accessories"
   },
   {
      "id":"CBT1648",
      "name":"Computers"
   },
   {
      "id":"CBT1144",
      "name":"Consoles and Video Games"
   },
   {
      "id":"CBT1000",
      "name":"Electronics, Audio and Video"
   },
   {
      "id":"CBT1403",
      "name":"Food and Drinks"
   },
   {
      "id":"CBT1132",
      "name":"Games and Toys"
   },
   {
      "id":"CBT409431",
      "name":"Health and Health Supplies"
   },
   {
      "id":"CBT1574",
      "name":"Home, Furniture and Garden"
   },
   {
      "id":"CBT1499",
      "name":"Industries and Offices"
   },
   {
      "id":"CBT3937",
      "name":"Jewels and Watches"
   },
   {
      "id":"CBT1168",
      "name":"Music, Movies and Series"
   },
   {
      "id":"CBT1182",
      "name":"Musical Instruments"
   },
   {
      "id":"CBT1459",
      "name":"Real Estate"
   },
   {
      "id":"CBT1540",
      "name":"Services"
   },
   {
      "id":"CBT9304",
      "name":"Souvenirs, Favours and Parties"
   },
   {
      "id":"CBT1276",
      "name":"Sports and Fitness"
   },
   {
      "id":"CBT2547",
      "name":"Tickets"
   },
   {
      "id":"CBT407134",
      "name":"Tools and Construction"
   },
   {
      "id":"CBT5725",
      "name":"Vehicle Accessories"
   },
   {
      "id":"CBT1953",
      "name":"Other categories"
   }
]

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 “Beauty and Personal Care" category:

Example:

curl -X GET https://api.mercadolibre.com/categories/CBT1246

Response:

{
   "id":"CBT1246",
   "name":"Beauty and Personal Care",
   "picture":"http://resources.mlstatic.com/category/images/d1c445e9-f3bb-49e8-8cd3-3cfa81e57cf9.png",
   "permalink":null,
   "total_items_in_this_category":0,
   "path_from_root":[
      {
         "id":"CBT1246",
         "name":"Beauty and Personal Care"
      }
   ],
   "children_categories":[
      {
         "id":"CBT417575",
         "name":"Beard & Mustache Care",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT409558",
         "name":"Beauty Appliances",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT417770",
         "name":"Beauty Treatments",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT391873",
         "name":"Body Sprays",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT29884",
         "name":"Foot, Hand & Nail Care",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT1271",
         "name":"Fragance",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT1263",
         "name":"Hair Care",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT43673",
         "name":"Hair Removal",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT431642",
         "name":"Hair Salon Listings",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT1248",
         "name":"Makeup",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT1275",
         "name":"Other",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT393366",
         "name":"Personal Care",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT431646",
         "name":"Pharmacy",
         "total_items_in_this_category":0
      },
      {
         "id":"CBT1253",
         "name":"Skin Care",
         "total_items_in_this_category":0
      }
   ],
   "attribute_types":"attributes",
   "settings":{
      "adult_content":false,
      "buying_allowed":true,
      "buying_modes":[
         "auction",
         "buy_it_now"
      ],
      "catalog_domain":"CBT-BEAUTY_AND_PERSONAL_CARE_SUPPLIES",
      "coverage_areas":"not_allowed",
      "currencies":[
         "USD"
      ],
      "fragile":false,
      "immediate_payment":"required",
      "item_conditions":[
         "new"
      ],
      "items_reviews_allowed":false,
      "listing_allowed":false,
      "max_description_length":50000,
      "max_pictures_per_item":12,
      "max_pictures_per_item_var":10,
      "max_sub_title_length":70,
      "max_title_length":60,
      "maximum_price":null,
      "minimum_price":1,
      "mirror_category":null,
      "mirror_master_category":null,
      "mirror_slave_categories":[

      ],
      "price":"required",
      "reservation_allowed":"not_allowed",
      "restrictions":[

      ],
      "rounded_address":false,
      "seller_contact":"not_allowed",
      "shipping_modes":[
         "custom",
         "not_specified"
      ],
      "shipping_options":[
         "carrier",
         "custom"
      ],
      "shipping_profile":"optional",
      "show_contact_information":false,
      "simple_shipping":"optional",
      "stock":"required",
      "sub_vertical":"health_beauty",
      "subscribable":false,
      "tags":[

      ],
      "vertical":"consumer_goods",
      "vip_subdomain":"articulo",
      "buyer_protection_programs":null,
      "status":"enabled"
   },
   "meta_categ_id":null,
   "attributable":false,
   "date_created":"2018-04-25T08:12:56.000Z"
}

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

Make a request to a specific category will allow you to know the information and specific description of it. Below you will find the description of some of these attributes.

Request:

curl -X GET https://api.mercadolibre.com/categories/$CATEGORY_ID

Example:

curl -X GET https://api.mercadolibre.com/categories/CBT11796

Response:

{
   "id":"CBT11796",
   "name":"Footwear",
   "picture":null,
   "permalink":null,
   "total_items_in_this_category":0,
   "path_from_root":[
      {
         "id":"CBT1430",
         "name":"Clothing and Accessories"
      },
      {
         "id":"CBT1455",
         "name":"Baby Clothes & Shoes"
      },
      {
         "id":"CBT11796",
         "name":"Footwear"
      }
   ],
   "children_categories":[

   ],
   "attribute_types":"variations",
   "settings":{
      "adult_content":false,
      "buying_allowed":true,
      "buying_modes":[
         "auction",
         "buy_it_now"
      ],
      "catalog_domain":"CBT-BABIES_FOOTWEAR",
      "coverage_areas":"not_allowed",
      "currencies":[
         "USD"
      ],
      "fragile":false,
      "immediate_payment":"required",
      "item_conditions":[
         "new"
      ],
      "items_reviews_allowed":false,
      "listing_allowed":true,
      "max_description_length":50000,
      "max_pictures_per_item":12,
      "max_pictures_per_item_var":10,
      "max_sub_title_length":70,
      "max_title_length":60,
      "maximum_price":null,
      "minimum_price":1,
      "mirror_category":null,
      "mirror_master_category":null,
      "mirror_slave_categories":[

      ],
      "price":"required",
      "reservation_allowed":"not_allowed",
      "restrictions":[

      ],
      "rounded_address":false,
      "seller_contact":"not_allowed",
      "shipping_modes":[
         "custom",
         "not_specified"
      ],
      "shipping_options":[
         "custom",
         "carrier"
      ],
      "shipping_profile":"optional",
      "show_contact_information":false,
      "simple_shipping":"optional",
      "stock":"required",
      "sub_vertical":"clothes",
      "subscribable":false,
      "tags":[

      ],
      "vertical":"apparel",
      "vip_subdomain":"articulo",
      "buyer_protection_programs":null,
      "status":"enabled"
   },
   "meta_categ_id":null,
   "attributable":false,
   "date_created":"2019-09-10T14:12:56.000Z"
}


Path from root

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


Next: Attributes.