Paging results

Overview

You can define the page size of the result list. There are 2 parameters: Limit and Offset. Both parameters define the size block of the results. This article is based on the search example, but you can use paging on every resource that presents on its response information about “paging”, like follows:

.....
"paging": {
"total": 285,
"offset": 0,
"limit": 50,
}
.....

Contents:

Default values

Limit

Offset

Define a range of results

Default values

Default values are offset=0 and limit=50.

curl https://api.mercadolibre.com/sites/MLA/search?q=ipod nano

In the paging section of the JSON response, you can see the total number of items that match the search and the offset value with the default limit applied.

.....
"paging": {
"total": 285,
"offset": 0,
"limit": 50,
}
.....

Limit

To reduce the page size you can change the limit parameter. For example, if you are interested in retrieving just the first 3 items: