Documentation Mercado Libre

Check out all the necessary information about APIs Mercado Libre.
circulos azuis em degrade

Documentation

Last update 15/12/2025

Location

The following examples will be used to obtain the locations available.

Resource Description Example
/countries Returns country information. GET
/countries/$COUNTRY_ID Returns country information by country_id. GET
/states/$STATE_ID Returns state information by state_id. GET
/cities/$CITY_ID Returns city information by city_id. GET

Response fields

Countries response fields

Field Description
id Country identifier (ISO 3166-1 alpha-2 code).
name Country name.
locale Locale code for the country (language and region).
site Mercado Libre site identifier (e.g., MLA for Argentina, MLB for Brazil, MLM for Mexico). Empty for countries without a marketplace.
currency_id Default currency for the country.
decimal_separator Character used as decimal separator.
thousands_separator Character used as thousands separator.
time_zone Time zone offset (e.g., GMT-03:00).
time_zone_name Time zone name (e.g., America/Buenos_Aires).
geo_information Geographic coordinates containing latitude and longitude.
states List of states/provinces with their id and name.

States response fields

Field Description
id State identifier (format: COUNTRY-STATE code).
name State/province name.
country Parent country object with id and name.
site Mercado Libre site identifier. Empty for states in countries without a marketplace.
geo_information Geographic coordinates containing latitude and longitude.
time_zone Time zone offset. Can be null.
time_zone_name Time zone name. Can be empty.
cities List of cities with their id and name.

Cities response fields

Field Description
id City identifier (encoded string).
name City name.
site Mercado Libre site identifier. Empty for cities in countries without a marketplace.
state Parent state object with id and name.
country Parent country object with id and name.
geo_information Geographic coordinates. Can be null if not available.

HTTP response code references

Successful responses

Code Description
200 OK Request processed successfully. Returns the location information.

Error responses

Code Error Description Possible cause
400 invalid_id Invalid country ID The country_id provided is not a valid ISO country code.
404 not_found Country not found The specified country_id does not exist.
404 not_found State not found The specified state_id does not exist.
404 not_found City not found The specified city_id does not exist.
404 not_found Resource not found The resource path is invalid (e.g., /states/ or /cities/ without an ID).

Error response examples

Invalid country ID (400)

{
    "message": "Validation errors",
    "error": "invalid_id",
    "status": 400,
    "cause": [
        "Invalid country ID"
    ]
}

Country not found (404)

{
    "message": "Country not found",
    "error": "not_found",
    "status": 404,
    "cause": []
}

State not found (404)

{
    "message": "State not found",
    "error": "not_found",
    "status": 404,
    "cause": []
}

City not found (404)

{
    "message": "City not found",
    "error": "not_found",
    "status": 404,
    "cause": []
}

Resource path not found (404)

{
    "message": "Resource /states/ not found.",
    "error": "not_found",
    "status": 404,
    "cause": []
}