Documentación Mercado Libre
Descubre toda la información que debes conocer sobre las APIs de Mercado Libre.Documentación
Localização de veículos
Ao publicar um anúncio, você só precisa enviar o ID de localização folha. Isto significa que apenas o envio do ID do bairro é suficiente para que nossa API preencha os IDs de Estado e Cidade correspondentes. Caso a cidade escolhida não tenha nenhum bairro, você só precisará enviar o ID da Cidade. É obrigatório enviar o ID do bairro ou o ID da cidade. Se você enviar somente o ID do Estado, nossa API não permitirá a publicação do anúncio (de qualquer maneira, você nunca deve enviar o ID do Estado porque ele será preenchido automaticamente segundo o ID do Bairro ou da Cidade). O recurso fará com que você possa explorar as possíveis localizações, classificadas por país, estado, cidade e bairro.
Explorar todos os países
Exemplo:curl -X GET https://api.mercadolibre.com/classified_locations/countries
Resposta:
[
{
"id": "AR",
"name": "Argentina",
"locale": "es_AR",
"currency_id": "ARS"
},
{
"id": "BR",
"name": "Brasil",
"locale": "pt_BR",
"currency_id": "BRL"
},
{
"id": "CO",
"name": "Colombia",
"locale": "es_CO",
"currency_id": "COP"
},
{
"id": "CR",
"name": "Costa Rica",
"locale": "es_CR",
"currency_id": "CRC"
},
{
"id": "CL",
"name": "Chile",
"locale": "es_CL",
"currency_id": "CLP"
},
{
"id": "EC",
"name": "Ecuador",
"locale": "es_EC",
"currency_id": "USD"
},
{
"id": "MX",
"name": "Mexico",
"locale": "es_MX",
"currency_id": "MXN"
},
{
"id": "PA",
"name": "Panamá",
"locale": "es_PA",
"currency_id": "USD"
},
{
"id": "PE",
"name": "Peru",
"locale": "es_PE",
"currency_id": "PEN"
},
{
"id": "DO",
"name": "República Dominicana",
"locale": "es_DO",
"currency_id": "DOP"
},
{
"id": "UY",
"name": "Uruguay",
"locale": "es_UY",
"currency_id": "UYU"
},
{
"id": "VE",
"name": "Venezuela",
"locale": "es_VE",
"currency_id": "VEF"
}
]
Explorar informações do país
Chamada:curl -X GET https://api.mercadolibre.com/classified_locations/countries/$COUNTRY_ID
Exemplo:
curl -X GET https://api.mercadolibre.com/classified_locations/countries/AR
Resposta:
{
"id": "AR",
"name": "Argentina",
"locale": "es_AR",
"currency_id": "ARS",
"decimal_separator": ",",
"thousands_separator": ".",
"time_zone": "GMT-03:00",
"geo_information": {
"location": {
"latitude": -38.416097,
"longitude": -63.616672
}
},
"states": [
{
"id": "TUxBUEJSQWwyMzA1",
"name": "Brasil"
},
{
"id": "TUxBUENPU2ExMmFkMw",
"name": "Bs.As. Costa Atlántica"
},
{
"id": "TUxBUEdSQWU4ZDkz",
"name": "Bs.As. G.B.A. Norte"
},
{
"id": "TUxBUEdSQWVmNTVm",
"name": "Bs.As. G.B.A. Oeste"
},
{
"id": "TUxBUEdSQXJlMDNm",
"name": "Bs.As. G.B.A. Sur"
},
{
"id": "TUxBUFpPTmFpbnRl",
"name": "Buenos Aires Interior"
},
{
"id": "TUxBUENBUGw3M2E1",
"name": "Capital Federal"
},
{
"id": "TUxBUENBVGFiY2Fm",
"name": "Catamarca"
},
{
"id": "TUxBUENIQW8xMTNhOA",
"name": "Chaco"
},
{
"id": "TUxBUENIVXQxNDM1MQ",
"name": "Chubut"
},
{
"id": "TUxBUENPUnM5MjI0",
"name": "Corrientes"
},
{
"id": "TUxBUENPUmFkZGIw",
"name": "Córdoba"
},
{
"id": "TUxBUEVOVHMzNTdm",
"name": "Entre Ríos"
},
{
"id": "TUxBUEZPUmE1OTk5",
"name": "Formosa"
},
{
"id": "TUxBUEpVSnk3YmUz",
"name": "Jujuy"
},
{
"id": "TUxBUExBWmE1OWMy",
"name": "La Pampa"
},
{
"id": "TUxBUExBWmEyNzY0",
"name": "La Rioja"
},
{
"id": "TUxBUE1FTmE5OWQ4",
"name": "Mendoza"
},
{
"id": "TUxBUE1JU3MzNjIx",
"name": "Misiones"
},
{
"id": "TUxBUE5FVW4xMzMzNQ",
"name": "Neuquén"
},
{
"id": "TUxBUFJFUDQyMjQ4Ng",
"name": "República Dominicana"
},
{
"id": "TUxBUFLNT29iZmZm",
"name": "Río Negro"
},
{
"id": "TUxBUFNBTGFjMTJi",
"name": "Salta"
},
{
"id": "TUxBUFNBTm5lYjU4",
"name": "San Juan"
},
{
"id": "TUxBUFNBTnM0ZTcz",
"name": "San Luis"
},
{
"id": "TUxBUFNBTno3ZmY5",
"name": "Santa Cruz"
},
{
"id": "TUxBUFNBTmU5Nzk2",
"name": "Santa Fe"
},
{
"id": "TUxBUFNBTm9lOTlk",
"name": "Santiago del Estero"
},
{
"id": "TUxBUFRJRVoxM2M5YQ",
"name": "Tierra del Fuego"
},
{
"id": "TUxBUFRVQ244NmM3",
"name": "Tucumán"
},
{
"id": "TUxBUFVTQWl1cXdlMg",
"name": "USA"
},
{
"id": "TUxBUFVSVXllZDVl",
"name": "Uruguay"
}
]
}
Explorar informações de estados
Chamada:curl -X GET https://api.mercadolibre.com/classified_locations/states/$STATE_ID
Exemplo:
curl -X GET https://api.mercadolibre.com/classified_locations/states/TUxBUENBUGw3M2E1
Resposta:
{
"id": "TUxBUENBUGw3M2E1",
"name": "Capital Federal",
"country": {
"id": "AR",
"name": "Argentina"
},
"geo_information": {
"location": {
"latitude": -34.6143048,
"longitude": -58.4401655
}
},
"cities": [
{
"id": "TUxBQ0NBUGZlZG1sYQ",
"name": "Capital Federal"
}
]
}
Explorar informações da cidade
Chamada:curl -X GET https://api.mercadolibre.com/classified_locations/cities/$CITY_ID
Exemplo:
curl -X GET https://api.mercadolibre.com/classified_locations/cities/TUxBQ0NBUGZlZG1sYQ
Resposta:
{
"id": "TUxBQ0NBUGZlZG1sYQ",
"name": "Capital Federal",
"state": {
"id": "TUxBUENBUGw3M2E1",
"name": "Capital Federal"
},
"country": {
"id": "AR",
"name": "Argentina"
},
"geo_information": {
"location": {
"latitude": -34.6084175,
"longitude": -58.3731613
}
},
"neighborhoods": [
{
"id": "TUxBQkFHUjk3NjJa",
"name": "Agronomía"
},
{
"id": "TUxBQkFMTTMwNTBa",
"name": "Almagro"
},
{
"id": "TUxBQkJBTDMxMDZa",
"name": "Balvanera"
},
{
"id": "TUxBQkJBUjM0MDha",
"name": "Barracas"
},
{
"id": "TUxBQkJBUjQwMDQ3MA",
"name": "Barrio Norte"
},
{
"id": "TUxBQkJFTDcyNTJa",
"name": "Belgrano"
},
{
"id": "TUxBQkJFTDkwNjNa",
"name": "Belgrano Barrancas"
},
{
"id": "TUxBQkJFTDk4MDRa",
"name": "Belgrano C"
},
{
"id": "TUxBQkJFTDU0ODda",
"name": "Belgrano Chico"
},
{
"id": "TUxBQkJFTDU5NzNa",
"name": "Belgrano R"
},
{
"id": "TUxBQkJPRTQ0OTRa",
"name": "Boedo"
},
{
"id": "TUxBQkJPVDQ2NTFa",
"name": "Botánico"
},
{
"id": "TUxBQkNBQjM4MDda",
"name": "Caballito"
},
{
"id": "TUxBQkNIQTM5NjBa",
"name": "Chacarita"
},
{
"id": "TUxBQkNPRzY5MTZa",
"name": "Coghlan"
},
{
"id": "TUxBQkNPTDI3NDNa",
"name": "Colegiales"
},
{
"id": "TUxBQkNPTjgyODY1Mg",
"name": "Congreso"
},
{
"id": "TUxBQkNPTjExMDBa",
"name": "Constitución"
},
{
"id": "TUxBQkZMTzMwNzRa",
"name": "Flores"
},
{
"id": "TUxBQkZMTzg5MjFa",
"name": "Floresta"
},
{
"id": "TUxBQkxBQjk1ODJa",
"name": "La Boca"
},
{
"id": "TUxBQkxBUzIxNTJa",
"name": "Las Cañitas"
},
{
"id": "TUxBQkxJTjEzNTha",
"name": "Liniers"
},
{
"id": "TUxBQk1BVDMwMDJa",
"name": "Mataderos"
},
{
"id": "TUxBQk1PTjUxOTJa",
"name": "Monserrat"
},
{
"id": "TUxBQk1PTjE2OTBa",
"name": "Monte Castro"
},
{
"id": "TUxBQk5VRTc3MTZa",
"name": "Nueva Pompeya"
},
{
"id": "TUxBQk7a0TcwOTRa",
"name": "Núñez"
},
{
"id": "TUxBQk9OQzM1Mjk5Ng",
"name": "Once"
},
{
"id": "TUxBQlBBTDI1MTVa",
"name": "Palermo"
},
{
"id": "TUxBQlBBTDg3OTha",
"name": "Palermo Chico"
},
{
"id": "TUxBQlBBTDg1NjJa",
"name": "Palermo Hollywood"
},
{
"id": "TUxBQlBBTDgwMjla",
"name": "Palermo Nuevo"
},
{
"id": "TUxBQlBBTDg3MDda",
"name": "Palermo Soho"
},
{
"id": "TUxBQlBBTDE5ODla",
"name": "Palermo Viejo"
},
{
"id": "TUxBQlBBUjQ1NDda",
"name": "Parque Avellaneda"
},
{
"id": "TUxBQlBBUjUyOTZa",
"name": "Parque Chacabuco"
},
{
"id": "TUxBQlBBUjYwMzZa",
"name": "Parque Patricios"
},
{
"id": "TUxBQlBBVDI0ODFa",
"name": "Paternal"
},
{
"id": "TUxBQlBVRTQ5NjBa",
"name": "Puerto Madero"
},
{
"id": "TUxBQlJFQzkyMTVa",
"name": "Recoleta"
},
{
"id": "TUxBQlJFVDgyMDVa",
"name": "Retiro"
},
{
"id": "TUxBQlNBQTM3Mzda",
"name": "Saavedra"
},
{
"id": "TUxBQlNBTjkwNTZa",
"name": "San Cristóbal"
},
{
"id": "TUxBQlNBTjgzMjRa",
"name": "San Nicolás"
},
{
"id": "TUxBQlNBTjgxMzNa",
"name": "San Telmo"
},
{
"id": "TUxBQlNBTjEyMjNa",
"name": "Santa Rita"
},
{
"id": "TUxBQlZFTDIwNDha",
"name": "Velez Sarsfield"
},
{
"id": "TUxBQlZFUjY3MDFa",
"name": "Versailles"
},
{
"id": "TUxBQlZJTDQyMjBa",
"name": "Villa Crespo"
},
{
"id": "TUxBQlZJTDYzNzZa",
"name": "Villa Devoto"
},
{
"id": "MLA1071",
"name": "Villa Gral. Mitre"
},
{
"id": "TUxBQlZJTDQ4MzBa",
"name": "Villa Lugano"
},
{
"id": "TUxBQlZJTDI3MDJa",
"name": "Villa Luro"
},
{
"id": "TUxBQlZJTDQyMjFa",
"name": "Villa Ortúzar"
},
{
"id": "TUxBQlZJTDE2MDBa",
"name": "Villa Pueyrredón"
},
{
"id": "TUxBQlZJTDM3Mzda",
"name": "Villa Real"
},
{
"id": "TUxBQlZJTDU5MTFa",
"name": "Villa Riachuelo"
},
{
"id": "TUxBQlZJTDM5MjZa",
"name": "Villa Soldati"
},
{
"id": "TUxBQlZJTDcwOTla",
"name": "Villa Urquiza"
},
{
"id": "TUxBQlZJTDc4MDda",
"name": "Villa del Parque"
}
]
}
Explorar bairros
Chamada:curl -X GET https://api.mercadolibre.com/classified_locations/neighborhoods/$NEIGHBORHOOD_ID
Exemplo:
curl -X GET https://api.mercadolibre.com/classified_locations/neighborhoods/TUxBQkNBQjM4MDda
Resposta:
{
"id": "TUxBQkNBQjM4MDda",
"name": "Caballito",
"city": {
"id": "TUxBQ0NBUGZlZG1sYQ",
"name": "Capital Federal"
},
"state": {
"id": "TUxBUENBUGw3M2E1",
"name": "Capital Federal"
},
"country": {
"id": "AR",
"name": "Argentina"
},
"geo_information": {
"location": {
"latitude": -34.6166667,
"longitude": -58.45
}
},
"subneighborhoods": [
]
}
Próxima: Gerenciamento de pacotes.