Recursos Cross

Confira os principais recursos das nossas APIs
circulos azuis em degrade

Documentação do

Você pode usar esta documentação para as seguintes unidades de negócio:

Última atualização em 26/12/2023

Set categories for your products

The categories are a hierarchical set of groups in which items of a similar nature are listed, called “Category Tree”. Before create listings use our categories predictor to select, in the best way, which category you should select for your product. Also, you can download the complete category hierarchy with ID and human-friendly names from our API.


Categories predictor

Make a GET request to predict one article at a time and thus, you will be able to recognize the category with the attributes that you must load in order for the publication to have quality. Keep in mind that the answer will be made up of a list of predictions from the title provided, the first being the one with the highest probability.


Mandatory parameters

site_id: the site where you make the publication.
q: the title of the article to be predicted and must be completely in the language of the site.


Optional parameters

limit: By default, the limit will be 4 with a maximum of 8, so you could define a limit between 1 to 8.
target: It can be composed of core (Product) or classified (Classified) depending on the vertical in which you are publishing.


Note:
We recommend the use of the "limit=3" parameter so that the seller can have more category options when using the predictor, as we have in the Mercado Libre front-end experience.

Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/$SITE_ID/domain_discovery/search?q=$Q

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/MLA/domain_discovery/search?limit=1&q=celular%20iphone

Response:

[
  {
    "domain_id": "MLA-CELLPHONES",
    "domain_name": "Celulares",
    "category_id": "MLA1055",
    "category_name": "Celulares y Smartphones",
    "attributes": [
      {
        "id": "BRAND",
        "value_id": "9344",
        "value_name": "Apple"
      },
      {
        "id": "LINE",
        "value_id": "58993",
        "value_name": "iPhone"
      },
      {
        "id": "MODEL",
        "value_id": "14608",
        "value_name": "iPhone"
      }
    ]
  }
]

Response fields

domain_id: ID of the domain you predict for the article.
domain_name: domain name you predict.
category_id: ID of the category you predict for the article.
category_name: name of the category you predict.
attributes: list of attributes for the predicted category.


To get more information about path_from_root, shipping_modes and variations fields,check the /categories resource.


Categories by site

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

Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/$SITE_ID/categories

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/MLA/categories

Response:

[
  {
    "id": "MLA5725",
    "name": "Accesorios para Vehículos"
  },
  {
    "id": "MLA1512",
    "name": "Agro"
  },
  {
    "id": "MLA1403",
    "name": "Alimentos y Bebidas"
  },
  {
    "id": "MLA1071",
    "name": "Animales y Mascotas"
  },
  {
    "id": "MLA1367",
    "name": "Antigüedades y Colecciones"
  },
  {
    "id": "MLA1368",
    "name": "Arte, Librería y Mercería"
  },
  {
    "id": "MLA1743",
    "name": "Autos, Motos y Otros"
  },
  {
    "id": "MLA1384",
    "name": "Bebés"
  },
  {
    "id": "MLA1246",
    "name": "Belleza y Cuidado Personal"
  },
  {
    "id": "MLA1039",
    "name": "Cámaras y Accesorios"
  },
  {
    "id": "MLA1051",
    "name": "Celulares y Teléfonos"
  },
  {
    "id": "MLA1648",
    "name": "Computación"
  },
  {
    "id": "MLA1144",
    "name": "Consolas y Videojuegos"
  },
  {
    "id": "MLA1500",
    "name": "Construcción"
  },
  {
    "id": "MLA1276",
    "name": "Deportes y Fitness"
  },
  {
    "id": "MLA5726",
    "name": "Electrodomésticos y Aires Ac."
  },
  {
    "id": "MLA1000",
    "name": "Electrónica, Audio y Video"
  },
  {
    "id": "MLA2547",
    "name": "Entradas para Eventos"
  },
  {
    "id": "MLA407134",
    "name": "Herramientas"
  },
  {
    "id": "MLA1574",
    "name": "Hogar, Muebles y Jardín"
  },
  {
    "id": "MLA1499",
    "name": "Industrias y Oficinas"
  },
  {
    "id": "MLA1459",
    "name": "Inmuebles"
  },
  {
    "id": "MLA1182",
    "name": "Instrumentos Musicales"
  },
  {
    "id": "MLA3937",
    "name": "Joyas y Relojes"
  },
  {
    "id": "MLA1132",
    "name": "Juegos y Juguetes"
  },
  {
    "id": "MLA3025",
    "name": "Libros, Revistas y Comics"
  },
  {
    "id": "MLA1168",
    "name": "Música, Películas y Series"
  },
  {
    "id": "MLA1430",
    "name": "Ropa y Accesorios"
  },
  {
    "id": "MLA409431",
    "name": "Salud y Equipamiento Médico"
  },
  {
    "id": "MLA1540",
    "name": "Servicios"
  },
  {
    "id": "MLA9304",
    "name": "Souvenirs, Cotillón y Fiestas"
  },
  {
    "id": "MLA1953",
    "name": "Otras categorías"
  }
]

Category detail

Importante:
As of December 14, 2022, the maximum number of variations allowed (max_variations_allowed) per category will be 100. Except for Fashion, Mobile Accessories and Auto Parts categories which will have a limit of 250. In addition, all existing variations can be edited.

Make a GET request for a specific category will allow you to know the specific information and description of the category.


Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/categories/$CATEGORY_ID

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/categories/MLA3530

Response:

{
  "id": "MLA3530",
  "name": "Otros",
  "picture": "http://resources.mlstatic.com/category/images/985c3a8d-ea5b-4266-a0cf-a3dc51f6e12f.png",
  "permalink": null,
  "total_items_in_this_category": 180778,
  "path_from_root": [
    {
      "id": "MLA1953",
      "name": "Otras categorías"
    },
    {
      "id": "MLA3530",
      "name": "Otros"
    }
  ],
  "children_categories": [
  ],
  "attribute_types": "attributes",
  "settings": {
    "adult_content": false,
    "buying_allowed": true,
    "buying_modes": [
      "buy_it_now",
      "auction"
    ],
    "catalog_domain": "MLA-UNCLASSIFIED_PRODUCTS",
    "coverage_areas": "not_allowed",
    "currencies": [
      "ARS"
    ],
    "fragile": false,
    "immediate_payment": "required",
    "item_conditions": [
      "new",
      "not_specified",
      "used"
    ],
    "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,
    "max_variations_allowed": 100,
    "maximum_price": null,
    "maximum_price_currency": "ARS",
    "minimum_price": 99,
    "minimum_price_currency": "ARS",
    "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": null,
    "shipping_options": [
      "custom",
      "carrier"
    ],
    "shipping_profile": "optional",
    "show_contact_information": false,
    "simple_shipping": "optional",
    "stock": "required",
    "sub_vertical": "other",
    "subscribable": false,
    "tags": [
      "others"
    ],
    "vertical": "other",
    "vip_subdomain": "articulo",
    "buyer_protection_programs": [
      "delivered",
      "undelivered"
    ],
    "status": "enabled"
  },
  "channels_settings": [
    {
      "channel": "private",
      "settings": {
        "minimum_price": null,
        "price": "optional",
        "status": "enabled",
        "stock": "optional"
      }
    },
    {
      "channel": "mshops",
      "settings": {
        "minimum_price": 0
      }
    },
    {
      "channel": "proximity",
      "settings": {
        "status": "disabled"
      }
    },
    {
      "channel": "mp-merchants",
      "settings": {
        "buying_modes": [
          "buy_it_now"
        ],
        "immediate_payment": "required",
        "minimum_price": 1,
        "status": "enabled"
      }
    }
  ],
  "meta_categ_id": null,
  "attributable": false,
  "date_created": "2018-04-25T08:12:56.000Z"
}
Note:
In case of exceeding the maximum allowed number of variations, you will receive an error 400 "Variations should not exceed max size of 100".

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 -X GET 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 Mercado Libre uses this path to show the item’s category:
image-category (1)


Next: List products.