Visits
Contenidos
→Parameter description →Total visits by user →Total visits by article →Total visits by item between date ranges →Total visits by item MULTIGET →Dated visits by user →Dated visits by item →Dated visits by item MULTIGET
Parameter description
Type | Parameter | Description |
---|---|---|
Integer | user_id | User ID. |
String | item_id | Item ID. |
Date | date_from | Date, ISO format, that defines the start of the query. The maximum is one year. |
Date | date_to | Date, ISO format, that defines the end of the query. The maximum is one year. |
Date | ending | Optional. Date, ISO format, which states the time of completion of the sample, by default it’s the current date and time. |
String | unit | Query unit, possible values: [ “day”]. |
Integer | last | Optional. How many last days define the test. |
Integer | total_visits | Total visits on an item. |
Array | visits_detail | Visits detailed by country and site. |
Array | results | Visits detail grouped by time intervals. The length is defined by the parameter Unit. |
Total visits by user
Retrieves the total visits a user receives between date ranges.
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/items_visits?date_from=$DATE_FROM&date_to=$DATE_TO
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/1000011398/items_visits?date_from=2018-01-01T00:00:00.000-00:00&date_to=2018-08-01T00:00:00.000-00:00
Response:
{
"user_id": 1000011398,
"date_from": "2018-01-01T00:00:00Z",
"date_to": "2018-08-01T00:00:00Z",
"total_visits": 323690,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 323690
}
]
}
Total visits by article
Retrieve total visits to an article.
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/items_visits?date_from=$DATE_FROM&date_to=$DATE_TO
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/visits/items?ids=MLB9992242141
Response:
{
"MLB9992242141": 552
}
Total visits by item between date ranges
Retrieves total visits on an item between date ranges and by site.
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/visits?ids=$ID1,$ID2&date_from=$DATE_FROM&date_to=$DATE_TO
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/visits?ids=MCO473861358,MCO472253403,MCO471870973&date_from=2018-05-26T00:00:00.000-00:00&date_to=2018-08-08T00:00:00.000-00:00
Response:
[
{
"item_id": "MCO473861358",
"date_from": "2018-05-26T00:00:00Z",
"date_to": "2018-08-08T00:00:00Z",
"total_visits": 536,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 536
}
]
}
Total visits by item MULTIGET
Retrieves the total visitas according to an array of items concatenated within a date range, by site.
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/visits?ids=$ID1,$ID2&date_from=$DATE_FROM&date_to=$DATE_TO
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/visits?ids=MCO473861358,MCO472253403,MCO471870973&date_from=2018-05-26T00:00:00.000-00:00&date_to=2018-08-08T00:00:00.000-00:00
Response:
[
{
"item_id": "MCO472253403",
"date_from": "2018-05-26T00:00:00Z",
"date_to": "2018-08-08T00:00:00Z",
"total_visits": 431,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 431
}
]
},
{
"item_id": "MCO471870973",
"date_from": "2018-05-26T00:00:00Z",
"date_to": "2018-08-08T00:00:00Z",
"total_visits": 459,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 459
}
]
},
{
"item_id": "MCO473861358",
"date_from": "2018-05-26T00:00:00Z",
"date_to": "2018-08-08T00:00:00Z",
"total_visits": 536,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 536
}
]
}
]
Dated visits by user
Retrieves visits on every item of an user for a certain time window, by site. The information detail it’s grouped by time intervals.
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/items_visits/time_window?last=$LAST&unit=$UNIT&ending=$ENDING
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/1000011398/items_visits/time_window?last=2&unit=day
Response:
{
"user_id": 1000011398,
"date_from": "2018-08-08T00:00:00Z",
"date_to": "2018-08-10T00:00:00Z",
"total_visits": 2923,
"last": 2,
"unit": "day",
"results": [
{
"date": "2018-08-08T00:00:00Z",
"total": 2205,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 2205
}
]
},
{
"date": "2018-08-09T00:00:00Z",
"total": 718,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 718
}
]
}
]
}
Dated visits by item
Retrieves visits on an item for a certain time window, by site. The information detail it’s grouped by time intervals.
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/$ITEM_ID/visits/time_window?last=$LAST&unit=$UNIT&ending=$ENDING
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/MCO471870973/visits/time_window?last=2&unit=day&ending=2018-08-06
Response:
{
"item_id": "MCO471870973",
"date_from": "2018-08-04T00:00:00Z",
"date_to": "2018-08-06T00:00:00Z",
"total_visits": 26,
"last": 2,
"unit": "day",
"results": [
{
"date": "2018-08-04T00:00:00Z",
"total": 16,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 16
}
]
},
{
"date": "2018-08-05T00:00:00Z",
"total": 10,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 10
}
]
}
]
}
Dated visits by item MULTIGET
Retrieves the visits according to an item array (max 10), by site. The information detail it’s grouped by time intervals.
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/visits/time_window?ids=$ID1, ID2last=$LAST&unit=$UNIT&ending=$ENDING
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/visits/time_window?ids=MCO473861358,MCO472253403,MCO471870973&last=3&unit=day
Response:
[
{
"item_id": "MCO471870973",
"date_from": "2018-08-07T00:00:00Z",
"date_to": "2018-08-10T00:00:00Z",
"total_visits": 15,
"last": 3,
"unit": "day",
"results": [
{
"date": "2018-08-07T00:00:00Z",
"total": 8,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 8
}
]
},
{
"date": "2018-08-08T00:00:00Z",
"total": 1,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 1
}
]
},
{
"date": "2018-08-09T00:00:00Z",
"total": 6,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 6
}
]
}
]
},
{
"item_id": "MCO473861358",
"date_from": "2018-08-07T00:00:00Z",
"date_to": "2018-08-10T00:00:00Z",
"total_visits": 21,
"last": 3,
"unit": "day",
"results": [
{
"date": "2018-08-07T00:00:00Z",
"total": 12,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 12
}
]
},
{
"date": "2018-08-08T00:00:00Z",
"total": 1,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 1
}
]
},
{
"date": "2018-08-09T00:00:00Z",
"total": 8,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 8
}
]
}
]
},
{
"item_id": "MCO472253403",
"date_from": "2018-08-07T00:00:00Z",
"date_to": "2018-08-10T00:00:00Z",
"total_visits": 12,
"last": 3,
"unit": "day",
"results": [
{
"date": "2018-08-07T00:00:00Z",
"total": 9,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 9
}
]
},
{
"date": "2018-08-08T00:00:00Z",
"total": 1,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 1
}
]
},
{
"date": "2018-08-09T00:00:00Z",
"total": 2,
"visits_detail": [
{
"company": "mercadolibre",
"quantity": 2
}
]
}
]
}
]