Documentação do Mercado Livre

Confira todas as informações necessárias sobre as APIs Mercado Livre.
circulos azuis em degrade

Documentação do

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

Items & search


Summary of available resources

Resource Description
/sites/$SITE_ID/search?category=$CATEGORY_ID Get items listed in a category.
/sites/$SITE_ID/search?q=Motorola%20G6 Get items from a search query.
/sites/$SITE_ID/search?nickname=$NICKNAME Get items from the listings by nickname.
/sites/$SITE_ID/search?seller_id=$SELLER_ID Can list items by seller.
/sites/$SITE_ID/search?seller_id=$SELLER_ID&category=$CATEGORY_ID Get items from listings by seller in a specific category
/users/$USER_ID/items/search Can list all a seller account´s items.
/items?ids=$ITEM_ID1,$ITEM_ID2 Multiget with multiple numbers of items.
/users?ids=$USER_ID1,$USER_ID2 Multiget with multiple numbers of users.
/items?ids=$ITEM_ID1,$ITEM_ID2&attributes=$ATTRIBUTE1,$ATTRIBUTE2,$ATTRIBUTE3 Multiget with multiple numbers of items selecting only the fields of interest.
/users/$USER_ID/items/search?search_type=scan Allows to get more than 1000 items corresponding to a user.

Search items by category

With the next call you will get the items that belong to a category.
We recommend read next API Docs:
- To know more details about the categories and the hierarchy, read how Set categories for your products.
- If you are interested in defining an answer with results pagination, check the Paging results guide.


Request:

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

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/MLA/search?category=MLA1055

Response:

{
   "site_id": "MLA",
   "paging": {
       "total": 90591,
       "offset": 0,
       "limit": 50,
       "primary_results": 1039
   },
   "results": [
       {
           "id": "MLA811601010",
           "site_id": "MLA",
           "title": "Samsung Galaxy J4+ Dual Sim 32 Gb Negro (2 Gb Ram)",
           "seller": {
               "id": 451257294,
               "nickname": SELLER_123,
           },
           "price": 19609,
           "currency_id": "ARS",
           "available_quantity": 1,
           "buying_mode": "buy_it_now",
           "listing_type_id": "gold_pro",
           "stop_time": "2039-08-22T04:00:00.000Z",
           "condition": "new",
           "permalink": "https://www.mercadolibre.com.ar/p/MLA13550363",
           "thumbnail": "http://mla-s1-p.mlstatic.com/943469-MLA31002769183_062019-I.jpg",
           "accepts_mercadopago": true,
           "installments": {
               "quantity": 6,
               "amount": 3268.17,
               "rate": 0,
               "currency_id": "ARS"
           },
           "shipping": {
               "free_shipping": true,
               "mode": "me2",
               "tags": [
                   "mandatory_free_shipping"
               ],
               "logistic_type": "drop_off",
               "store_pick_up": false
           },
           "attributes": [
               {
                   "values": [
                       {
                           "source": 1,
                           "id": "206",
                           "name": "Samsung",
                           "struct": null
                       }
                   ],
                   "attribute_group_id": "OTHERS",
                   "attribute_group_name": "Otros",
                   "id": "BRAND",
                   "value_id": "206",
                   "value_name": "Samsung",
                   "value_struct": null,
                   "source": 1,
                   "name": "Marca"
               },
               {
                   "id": "CPU_MODEL",
                   "value_struct": null,
                   "values": [
                       {
                           "struct": null,
                           "source": 6587939990796619,
                           "id": "7657686",
                           "name": "4x1.4 GHz Cortex-A53"
                       }
                   ],
                   "attribute_group_name": "Otros",
                   "name": "Modelo de CPU",
                   "value_id": "7657686",
                   "value_name": "4x1.4 GHz Cortex-A53",
                   "attribute_group_id": "OTHERS",
                   "source": 6587939990796619
               },
               {
                   "value_name": "Adreno 308",
                   "value_struct": null,
                   "values": [
                       {
                           "source": 4709228965570453,
                           "id": "7531831",
                           "name": "Adreno 308",
                           "struct": null
                       }
                   ],
                   "attribute_group_id": "OTHERS",
                   "attribute_group_name": "Otros",
                   "id": "GPU_MODEL",
                   "name": "Modelo de GPU",
                   "value_id": "7531831",
                   "source": 4709228965570453
               },
               {
                   "values": [
                       {
                           "id": "2230284",
                           "name": "Nuevo",
                           "struct": null,
                           "source": 8342579661593500
                       }
                   ],
                   "id": "ITEM_CONDITION",
                   "value_struct": null,
                   "value_name": "Nuevo",
                   "attribute_group_id": "OTHERS",
                   "attribute_group_name": "Otros",
                   "source": 8342579661593500,
                   "name": "Condición del ítem",
                   "value_id": "2230284"
               },
               {
                   "value_id": "195973",
                   "value_name": "Galaxy J",
                   "attribute_group_id": "OTHERS",
                   "attribute_group_name": "Otros",
                   "source": 1,
                   "id": "LINE",
                   "name": "Línea",
                   "value_struct": null,
                   "values": [
                       {
                           "source": 1,
                           "id": "195973",
                           "name": "Galaxy J",
                           "struct": null
                       }
                   ]
               },
               {
                   "value_name": "J4+ Duos",
                   "values": [
                       {
                           "id": "6047739",
                           "name": "J4+ Duos",
                           "struct": null,
                           "source": 1
                       }
                   ],
                   "id": "MODEL",
                   "name": "Modelo",
                   "value_id": "6047739",
                   "source": 1,
                   "value_struct": null,
                   "attribute_group_id": "OTHERS",
                   "attribute_group_name": "Otros"
               },
               {
                   "values": [
                       {
                           "struct": null,
                           "source": 6587939990796619,
                           "id": "2087879",
                           "name": "Snapdragon 425"
                       }
                   ],
                   "attribute_group_name": "Otros",
                   "name": "Modelo del procesador",
                   "value_name": "Snapdragon 425",
                   "value_struct": null,
                   "attribute_group_id": "OTHERS",
                   "source": 6587939990796619,
                   "id": "PROCESSOR_MODEL",
                   "value_id": "2087879"
               }
           ],
           "differential_pricing": {
               "id": 33669181
           },
           "original_price": null,
           "category_id": "MLA1055",
           "official_store_id": null,
           "catalog_product_id": "MLA13550363",
           "catalog_listing": true
       },
       {
           "id": "MLA816019440",
           "site_id": "MLA",
           "title": "Apple iPhone Xr Dual Sim 128 Gb Blanco",
           "seller": {
               "id": 70894521,
               "power_seller_status": null,
               "car_dealer": false,
               "real_estate_agency": false,
               "tags": []
           },
           "price": 79470,
           "currency_id": "ARS",
           "available_quantity": 1,
           "buying_mode": "buy_it_now",
           "listing_type_id": "gold_special",
           "stop_time": "2039-09-15T04:00:00.000Z",
           "condition": "new",
           "permalink": "https://www.mercadolibre.com.ar/p/MLA12866684",
           "thumbnail": "http://mla-s1-p.mlstatic.com/980849-MLA31002261498_062019-I.jpg",
           "accepts_mercadopago": true,
           "installments": {
               "quantity": 12,
               "amount": 10845.67,
               "rate": 63.77,
               "currency_id": "ARS"
           },
           "shipping": {
               "free_shipping": true,
               "mode": "me2",
               "tags": [
                   "mandatory_free_shipping"
               ],
               "logistic_type": "drop_off",
               "store_pick_up": false
           },
           "attributes": [
               {
                   "source": 1,
                   "id": "BRAND",
                   "value_name": "Apple",
                   "attribute_group_id": "OTHERS",
                   "attribute_group_name": "Otros",
                   "name": "Marca",
                   "value_id": "9344",
                   "value_struct": null,
                   "values": [
                       {
                           "struct": null,
                           "source": 1,
                           "id": "9344",
                           "name": "Apple"
                       }
                   ]
               },
               {
                   "name": "Modelo de CPU",
                   "attribute_group_id": "OTHERS",
                   "source": 1,
                   "id": "CPU_MODEL",
                   "value_id": "6927770",
                   "value_name": "2x2.5 GHz Vortex/4x1.6 GHz Tempest",
                   "value_struct": null,
                   "values": [
                       {
                           "id": "6927770",
                           "name": "2x2.5 GHz Vortex/4x1.6 GHz Tempest",
                           "struct": null,
                           "source": 1
                       }
                   ],
                   "attribute_group_name": "Otros"
               },
               {
                   "values": [
                       {
                           "name": "Nuevo",
                           "struct": null,
                           "source": 6808261514773724,
                           "id": "2230284"
                       }
                   ],
                   "source": 6808261514773724,
                   "value_id": "2230284",
                   "value_name": "Nuevo",
                   "value_struct": null,
                   "attribute_group_name": "Otros",
                   "id": "ITEM_CONDITION",
                   "name": "Condición del ítem",
                   "attribute_group_id": "OTHERS"
               },
               {
                   "value_id": "58993",
                   "value_struct": null,
                   "values": [
                       {
                           "struct": null,
                           "source": 1,
                           "id": "58993",
                           "name": "iPhone"
                       }
                   ],
                   "attribute_group_id": "OTHERS",
                   "attribute_group_name": "Otros",
                   "source": 1,
                   "id": "LINE",
                   "name": "Línea",
                   "value_name": "iPhone"
               },
               {
                   "name": "Modelo",
                   "value_struct": null,
                   "values": [
                       {
                           "id": "5414260",
                           "name": "iPhone XR",
                           "struct": null,
                           "source": 1
                       }
                   ],
                   "attribute_group_id": "OTHERS",
                   "attribute_group_name": "Otros",
                   "id": "MODEL",
                   "value_id": "5414260",
                   "value_name": "iPhone XR",
                   "source": 1
               },
               {
                   "id": "PROCESSOR_MODEL",
                   "attribute_group_id": "OTHERS",
                   "values": [
                       {
                           "id": "6927771",
                           "name": "Apple A12 Bionic",
                           "struct": null,
                           "source": 1
                       }
                   ],
                   "attribute_group_name": "Otros",
                   "source": 1,
                   "name": "Modelo del procesador",
                   "value_id": "6927771",
                   "value_name": "Apple A12 Bionic",
                   "value_struct": null
               }
           ],
           "original_price": null,
           "category_id": "MLA1055",
           "official_store_id": null,
           "catalog_product_id": "MLA12866684",
           "catalog_listing": true
       }
     }
   ]
}

Value in available_quantity fields

In the public resources of Items and Searches, the information of the "available_quantity" fields will be referential with the following values:


available_quantity

Real data Reference
RANGO_1_50 1
RANGO_51_100 50
RANGO_101_150 100
RANGO_151_200 150
RANGO_201_250 200
RANGO_251_500 250
RANGO_501_5000 500
RANGO_5001_50000 5000
RANGO_50001_99999 50000

Get items by a search query

With the parameter “q” you can perform a search by word, phrases or tribute keys of search. It is important to bear in mind that in this field you can send as many details of the attributes of the publication as necessary, in this way in the answer you will obtain more accurate searches. If you want to separate terms you can use %20 which corresponds to the ASCII code.


Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/$SITE_ID/search?q=Motorola%20G6

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/MLA/search?q=Motorola%20G6

Response:

{
   "site_id": "MLA",
   "query": "Motorola G6",
   "paging": {
       "total": 916,
       "offset": 0,
       "limit": 50,
       "primary_results": 916
   },
   "results": [
       {
           "id": "MLA810645375",
           "site_id": "MLA",
           "title": "Motorola G6 Plus 64 Gb Nimbus",
           "price": 17999,
           "currency_id": "ARS",
           "available_quantity": 100,
           "buying_mode": "buy_it_now",
           "listing_type_id": "gold_special",
           "stop_time": "2039-08-17T04:00:00.000Z",
           "condition": "new",
           "permalink": "https://www.mercadolibre.com.ar/p/MLA9452524",
           "thumbnail": "http://mla-s2-p.mlstatic.com/795558-MLA31003306206_062019-I.jpg",
           "accepts_mercadopago": true,
           "installments": {
               "quantity": 12,
               "amount": 2456.41,
               "rate": 63.77,
               "currency_id": "ARS"
           },
           "shipping": {
               "free_shipping": false,
               "mode": "custom",
               "tags": [],
               "logistic_type": "custom",
               "store_pick_up": true
           },
           "attributes": [
               {
                   "name": "Marca",
                   "value_id": "2503",
                   "value_name": "Motorola",
                   "value_struct": null,
                   "attribute_group_id": "OTHERS",
                   "attribute_group_name": "Otros",
                   "source": 1,
                   "id": "BRAND"
               },
               {
                   "attribute_group_name": "Otros",
                   "source": 1,
                   "id": "CPU_MODEL",
                   "name": "Modelo de CPU",
                   "value_id": "7070889",
                   "value_name": "4x2.2 GHz Cortex-A53/4x1.8 GHz Cortex-A53",
                   "value_struct": null,
                   "attribute_group_id": "OTHERS"
               },
           ],
           "original_price": null,
           "category_id": "MLA1055",
           "official_store_id": 229,
           "catalog_product_id": "MLA9452524",
           "catalog_listing": true
       },
       {
           "id": "MLA805330648",
           "site_id": "MLA",
           "title": "Motorola G6 32 Gb Plata",
           "seller": {
               "id": 185702920,
               "power_seller_status": "platinum",
               "car_dealer": false,
               "real_estate_agency": false,
               "tags": []
           },
           "price": 14899,
           "currency_id": "ARS",
           "available_quantity": 1,
           "buying_mode": "buy_it_now",
           "listing_type_id": "gold_special",
           "stop_time": "2039-07-28T17:33:48.000Z",
           "condition": "new",
           "permalink": "https://www.mercadolibre.com.ar/p/MLA9652755",
           "thumbnail": "http://mla-s1-p.mlstatic.com/685061-MLA31003463570_062019-I.jpg",
           "accepts_mercadopago": true,
           "installments": {
               "quantity": 12,
               "amount": 2033.34,
               "rate": 63.77,
               "currency_id": "ARS"
           },
           "shipping": {
               "free_shipping": true,
               "mode": "me2",
               "tags": [
                   "fulfillment",
                   "mandatory_free_shipping"
               ],
               "logistic_type": "fulfillment",
               "store_pick_up": false
           },
               "state": {
                   "id": "AR-C",
                   "name": "Capital Federal"
               },
               "city": {
                   "id": null,
                   "name": "Once"
               },
               "latitude": "",
               "longitude": ""
           },
           "attributes": [
               {
                   "name": "Marca",
                   "value_id": "2503",
                   "value_name": "Motorola",
                   "value_struct": null,
                   "attribute_group_id": "OTHERS",
                   "attribute_group_name": "Otros",
                   "source": 1,
                   "id": "BRAND"
               },
               {
                   "value_id": "6936760",
                   "value_name": "8x1.8 GHz Cortex-A53",
                   "value_struct": null,
                   "attribute_group_id": "OTHERS",
                   "attribute_group_name": "Otros",
                   "source": 1,
                   "id": "CPU_MODEL",
                   "name": "Modelo de CPU"
               },
               {
                   "value_name": "Snapdragon 450",
                   "value_struct": null,
                   "attribute_group_id": "OTHERS",
                   "attribute_group_name": "Otros",
                   "source": 1,
                   "id": "PROCESSOR_MODEL",
                   "name": "Modelo del procesador",
                   "value_id": "6936759"
               }
           ],
           "original_price": null,
           "category_id": "MLA1055",
           "official_store_id": null,
           "catalog_product_id": "MLA9652755",
           "catalog_listing": true
       }
     }
   ]
}

Search items by seller

Depending on the type of resource you use, you will obtain the following data:
Public resource: /sites/{site_id}/search? You can get the results of active items directly from the Mercado Libre listings. Private resource: /users/{user_id}/items/search You can obtain a list of the items published by a specific seller from your account.



Get items from the listings by seller

This search conforms to the rules of the platform listings. The results will always be of active items.


By seller ID

If you already know the seller's ID, just do the following:

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

By nickname

When you do not know the seller_id of a user but the nickname, you can try the following search:

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

You can also apply different filters and systems.


Into /sites/{site_id}/search? are "available_sorts" and "available_filters" fields when you add a parameter.


How filter? For example, to filter items with free shipping, you will find the "shipping" ID available among the "available_filters" and within it the value with "free" ID.

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/$SITE_ID/search?seller_id=$SELLER_ID&shipping_cost=free

How order? In this case, you must add “sort” with the available ID of the order you want to apply, for example: “price_asc”.

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/$SITE_ID/search?seller_id=$SELLER_ID&sort=price_asc

Note: By default the search in the listings already comes with a defined order of relevance.



By seller ID to a specific category

Using the following example you can search within a specific category.
With the next call you can check the publications of specific categories.

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/$SITE_ID/search?seller_id=$SELLER_ID&category=$CATEGORY_ID

Items with loss of exposure

Important:
Currently, this functionality is available in Mexico and Chile, and as of December 21, 2020 it will be available in Brazil.

With the following filter, you will be able to recognize those items that are losing or could lose exposure due to claims or cancellations. You can use:
unhealthy: to identify items that are already losing exposure.
warning: for those who could lose it and that it is still possible to recover.
healthy: for items that were not impacted.


Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$SELLER_ID/items/search?reputation_health_gauge=unhealthy

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/123456789/items/search?reputation_health_gauge=unhealthy

Response:

{
   "seller_id":"123456789",
   "query":null,
   "paging":{
      "limit":50,
      "offset":0,
      "total":1
   },
   "results":[
      "MLA844702264"
   ],
   "orders":[
      {
         "id":"stop_time_asc",
         "name":"Order by stop time ascending"
      }
   ],
   "available_orders":[
      {
         "id":"stop_time_asc",
         "name":"Order by stop time ascending"
      },
      {
         "id":"stop_time_desc",
         "name":"Order by stop time descending"
      },
      {
         "id":"start_time_asc",
         "name":"Order by start time ascending"
      },
      {
         "id":"start_time_desc",
         "name":"Order by start time descending"
      },
      {
         "id":"available_quantity_asc",
         "name":"Order by available quantity ascending"
      },
      {
         "id":"available_quantity_desc",
         "name":"Order by available quantity descending"
      },
      {
         "id":"price_asc",
         "name":"Order by price ascending"
      },
      {
         "id":"price_desc",
         "name":"Order by price descending"
      },
      {
         "id":"last_updated_desc",
         "name":"Order by lastUpdated descending"
      },
      {
         "id":"last_updated_asc",
         "name":"Order by last updated ascending"
      },
      {
         "id":{
            "id":"inventory_id_asc",
            "field":"inventory_id",
            "missing":"_last",
            "order":"asc"
         },
         "name":"Order by inventory id ascending"
      }
   ]
}

Get items from a seller account

We no longer display the block corresponding to the filters and available_filters fields to improve response times. If you require this information, send the parameter include_filters=true in the search.


By user_id

If you already know the user_id, just do the following:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/items/search

By SKU

  • Seller_custom_field: if the item contains a SKU in the “seller_custom_field” field, you can try as follows:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/items/search?sku=$SELLER_CUSTOM_FIELD
 
  • Seller_sku: If the item contains a SKU in the “SELLER_SKU” field /attribute, you can try like this:
curl -H 'Authorization: Bearer $ACCESS_TOKEN' -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/items/search?seller_sku=$SELLER_SKU

By status

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/items/search?status=active

With/without product identifier

Using the parameters:
- missing_product_identifiers=true get items that not have a Product Identifier loaded or submitting. Thus, you identify which listings you can improve by complying with one of the most important quality requirements.
- missing_product_identifiers=false you get the list of listings with PIs uploaded or sending.

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/items/search?missing_product_identifiers=true

Filter and sort the results of the seller's items

Inside the resource /users/{user_id}/items/search? there are the "available_orders" and "available_filters" fields.

How order? In this case, you must add “orders” with the available ID of the order you want to apply, for example: “start_time_desc”.

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/items/search?orders=start_time_desc

Note: By default it already comes with a stop_time_asc order applied.
How filter? For example, to filter items with listing_type "gold_pro" you will find the "listing_type_id" available among the "available_filters" and within it the value with "gold_pro" ID.

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/items/search?listing_type_id=gold_pro
Note:
The use of our item search resource from a seller does not replace the use of item notifications. This is always to have the most consistent and up-to-date integration about the publication data of the vendors that work with your application.

Multiget

Use the Multiget function to improve the interaction with the resources of items and users, and thus be able to access with a single call to a maximum of 20 results. Keep in mind that the response using multiget will be returned in verb format, which means that in addition to the json with the information, we will respond with a code that will indicate if the query was successful or not for each of the searches.


Request to /items:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items?ids=$ITEM_ID1,$ITEM_ID2

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items?ids=MLA599260060,MLA594239600

Response:

[
     {
      "code": 200,
      "body": {

                "id": "MLA599260060",
                "site_id": "MLA",
                "title": "Item De Test - Por Favor No Ofertar",
                "subtitle": null,
                "seller_id": 303888594,
                "category_id": "MLA401685",
                "official_store_id": null,
                "price": 130,
                "base_price": 130,
                "original_price": null,
                "currency_id": "ARS",
                "initial_quantity": 1,
                "available_quantity": 1,
                "sale_terms": [],
                [...]
                "automatic_relist": false,
                "date_created": "2018-02-26T18:15:05.000Z",
                "last_updated": "2018-03-29T04:14:39.000Z",
                "health": null
              }
    },
    {
          "code": 200,
           "body": {

                "id": "MLA594239600",
                "site_id": "MLA",
                "title": "Item De Test - Por Favor No Ofertar",
                "subtitle": null,
                "seller_id": 303888594,
                "category_id": "MLA401685",
                "official_store_id": null,
                "price": 120,
                "base_price": 120,
                "original_price": null,
                "currency_id": "ARS",
                "initial_quantity": 1,
                "available_quantity": 1,
                "sale_terms": [],
                [...]
                "automatic_relist": false,
                "date_created": "2018-02-26T18:15:05.000Z",
                "last_updated": "2018-03-29T04:14:39.000Z",
                "health": null
              }
    }
]

Request to /users:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users?ids=$USER_ID1,$USER_ID2

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users?ids=401114259,287440999

Response:

[
  {
    "code": 200,
    "body": {

      "id": 401114259,
      "nickname": "user_test234",
      "registration_date": "2019-02-05T10:38:03.000-04:00",
      "country_id": "BR",
      "address": {
        "city": null,
        "state": null
      },
      "user_type": "normal",
      "tags": [
        "normal"
      ],
      "logo": null,
      "points": 0,
      "site_id": "MLB",
      "permalink": "http://perfil.mercadolivre.com.br/user_test234",
      "seller_reputation": {
        "level_id": null,
        "power_seller_status": null,
        "transactions": {
          "canceled": 0,
          "completed": 0,
          "period": "historic",
          "ratings": {
            "negative": 0,
            "neutral": 0,
            "positive": 0
          },
          "total": 0
        }
      },
      "buyer_reputation": {
        "tags": [
        ]
      },
      "status": {
        "site_status": "guest"
      }
    }
  },
  {
    "code": 200,
    "body": {
      "id": 287440999,
      "nickname": "user_test111",
      "registration_date": "2019-03-06T00:16:08.000-04:00",
      "country_id": "MX",
      "address": {
        "city": null,
        "state": null
      },
      "user_type": "normal",
      "tags": [
        "normal"
      ],
      "logo": null,
      "points": 0,
      "site_id": "MLM",
      "permalink": "http://perfil.mercadolibre.com.mx/user_test111",
      "seller_reputation": {
        "level_id": null,
        "power_seller_status": null,
        "transactions": {
          "canceled": 0,
          "completed": 0,
          "period": "historic",
          "ratings": {
            "negative": 0,
            "neutral": 0,
            "positive": 0
          },
          "total": 0
        }
      },
      "buyer_reputation": {
        "tags": [
        ]
      },
      "status": {
        "site_status": "active"
      }
    }
  }
]

Fields selection

Another alternative that you can implement in the GET to items is the selection of fields to receive only those that are necessary.


In order to define the fields you want to receive, you must add the attributes parameter as shown in the example. Learn more about how to work with Attributes in the documentation.


Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items?ids=$ITEM_ID1,$ITEM_ID2&attributes=$ATTRIBUTE1,$ATTRIBUTE2,$ATTRIBUTE3

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items?ids=MLA599260060,MLA594239600&attributes=id,price,category_id,title

Response:

[
     {
          "code": 200,
           "body": {

    "id": "MLA599260060",
    "title": "Item De Test - Por Favor No Ofertar",
    "category_id": "MLA401685",
    "price": 130
              }
        }

 {
          "code": 200,
           "body": {

    "id": "MLA594239600",
    "title": "Item De Test - Por Favor No Ofertar",
    "category_id": "MLA401685",
    "official_store_id": null,
    "price": 120,
              }
        }

]

Search mode above 1000 records

Work with Scan + Hash

All searches performed in the Items, Questions and Answers API of the form users/{user_id}/items/search or /questions/search greater than 1000 must have the new search_type = scan parameter without using the offset parameter.

Note:
If you want to consult data less than 1.000, you can continue doing it as before (with offset).

The steps to consult more than 1,000 results are as follows:

  • Add search_type=scan to query and quit the offset.
  • In the result, you will get a scroll_id field that expires after 5 minutes.
  • To obtain the results for scroll_id, you must update the parameter with each call. If you continue to use the same scroll_id for all calls, the result will be the same.
  • You will get the results from 1.000.
  • If the limit parameter is not used, 50 items of the total will be returned by default. You can add a maximum limit of 100.
  • To continue to obtain the next pages of results, just make the same GET to the call until you reach the end of the list.

You can learn how do it:

  • Add search_type=scan
    To get the scroll_id:

Items:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/items/search?search_type=scan

Questions:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/questions/search?search_type=scan&item=$ITEM_ID

Response:

"scroll_id": "YXBpY29yZS1pdGVtcw==:ZHMtYXBpY29yZS1pdGVtcy0wMQ==:DXF1ZXJ5QW5kRmV0Y2gBAAAAABIu7AgWMXl6anF3SU5SMVNaQXFxTkZubHBqQQ=="
  • We add the scroll_id= obtained in the previous step:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/items/search?search_type=scan&scroll_id=YXBpY29yZS1pdGVtcw==:ZHMtYXBpY29yZS1pdGVtcy0wMQ==:DXF1ZXJ5QW5kRmV0Y2gBAAAAABIu7AgWMXl6anF3SU5SMVNaQXFxTkZubHBqQQ==

To continue to obtain the next pages of results, just make the same GET to the call until you reach the end of the list. You will know when it reaches the end when it returns null said GET.