Category Dump

What is the Category Tree

The category tree is a structure where MercadoLibre organizes its listings. Each country has its own category tree that is different from each other. Listings can only be posted on the leaf categories of the tree.

Category Tree changes

Sometimes, the category tree changes because a new category is created, or an existing category is split in two or more categories. All the listings posted in the old category are automatically moved to the new category.

Why should I synchronize the Category Tree?

It is recommended making a dump of the whole category tree for a given country site for offline processing on a daily basis, so you are up to date with new categories. It is very useful when you are giving your user the possibility of mapping categories from his side to MercadoLibre’s category tree.

Working with Category Tree dump

This API returns the category tree in JSON format within a gzip-encoded response.
To get the categories for Brazil, for example, use this URL:

curl  > categoriesMLB.gz

This URL contains 2 headers that can be used to check when the last dump was generated.

  • X-Content-Created: contains the date of the last generation.
  • X-Content-MD5: contains the MD5 checksum of the last generation.

~$ curl -I
HTTP/1.1 200 OK
Server: nginx/1.0.4
Date: Tue, 24 Jul 2012 15:14:58 GMT
Content-Type: application/json;charset=UTF-8
Connection: keep-alive
X-MLAPI-Version: 1.9.5
Content-Encoding: gzip
X-Content-Created: 2012-07-24T14:00:59.716Z
X-Content-MD5: 943541196986770119b4af1e66bda2dc

Category dump with attributes

Since categories have attributes of their own that you also need to map, by making the following call you can get a file that contains the category tree with each of it’s attributes.

curl > mla.gz

Please rate this