Statistics

This endpoint can be used to retrieve statistics for a selection of ads within a given period.

When submitting multiple adId's, the result will contain the combined result of the selection. To retrieve the result for an individual ad, submit a single adId value.

Reference

POST /statistics/

Get statistics


Search parameters

field type description/constraints Req W U
adId int/array A list of adId's or a single adId Yes No No
dateStart yyyy-mm-dd The start date of the selection Yes No No
dateEnd yyyy-mm-dd The end date of the selection Yes No No
showDaily boolean Show daily statistics?
Default: true
No No No
showTotals boolean Show totals?
Default: true
No No No
portal string Only show data for the specified portal No No No


Fields result

field type description/constraints Req W U
adId array A list of adId's Yes No No
dateStart yyyy-mm-dd The start date of the selection Yes No No
dateEnd yyyy-mm-dd The end date of the selection Yes No No
showDaily boolean Show daily statistics?
Default: true
Yes No No
showTotals boolean Show totals?
Default: true
Yes No No
statistics_marktplaats array List of statistics per day No No No
totals_marktplaats array List of statisticsTotals with min / max / total and averages of this selection.
statistics_tweedehands array List of statistics per day No No No
totals_tweedehands array List of statisticsTotals with min / max / total and averages of this selection. No No No


Fields statistics

field type description/constraints Req W U
date yyyy-mm-dd The date Yes No No
views int Number of views Yes No No
asqs int Number of 'ask seller questions' Yes No No
bids int Number of bids Yes No No
url int Number of URL clicks Yes No No
phone int Number of phone clicks Yes No No
favorites int Number of favorite clicks Yes No No


Fields statisticsTotals

field type description/constraints Req W U
type string The type of totals

Available options:
  • views
  • asqs
  • bids
  • url
  • phone
  • favorites
Yes No No
minimum int The minimum amount in this period Yes No No
maximum int The maximum amount in this period Yes No No
total int The total amount in this period Yes No No
average int The average amount in this period Yes No No


Example retrieving statistics

Request

POST /rest/v1/statistics/ HTTP/2
{
  "adId": [
    972031
  ],
  "dateStart": "2015-05-01",
  "dateEnd": "2015-06-01",
  "showDaily": true,
  "showTotals": true
}

Response

{
  "result": true,
  "errors": [],
  "data": {
    "adId": [
      972031
    ],
    "dateStart": "2015-05-01",
    "dateEnd": "2015-06-01",
    "showDaily": true,
    "showTotals": true,
    "statistics_marktplaats": [
      {
        "date": "2015-05-21",
        "views": 27,
        "asqs": 0,
        "bids": 0,
        "url": 0,
        "phone": 0,
        "favorites": 0
      },
      {
        "date": "2015-05-22",
        "views": 0,
        "asqs": 0,
        "bids": 0,
        "url": 0,
        "phone": 0,
        "favorites": 0
      },
      {
        "date": "2015-05-23",
        "views": 0,
        "asqs": 0,
        "bids": 0,
        "url": 0,
        "phone": 0,
        "favorites": 0
      },
      {
        "date": "2015-05-24",
        "views": 0,
        "asqs": 0,
        "bids": 0,
        "url": 0,
        "phone": 0,
        "favorites": 0
      },
      {
        "date": "2015-05-25",
        "views": 0,
        "asqs": 0,
        "bids": 0,
        "url": 0,
        "phone": 0,
        "favorites": 0
      },
      {
        "date": "2015-05-26",
        "views": 1,
        "asqs": 0,
        "bids": 0,
        "url": 0,
        "phone": 0,
        "favorites": 0
      },
      {
        "date": "2015-05-27",
        "views": 0,
        "asqs": 0,
        "bids": 0,
        "url": 0,
        "phone": 0,
        "favorites": 0
      },
      {
        "date": "2015-05-28",
        "views": 0,
        "asqs": 0,
        "bids": 0,
        "url": 0,
        "phone": 0,
        "favorites": 0
      }
    ],
    "totals_marktplaats": {
      "views": {
        "type": "views",
        "minimum": 0,
        "maximum": 27,
        "total": 28,
        "average": 3
      },
      "asqs": {
        "type": "asqs",
        "minimum": 0,
        "maximum": 0,
        "total": 0,
        "average": 0
      },
      "bids": {
        "type": "bids",
        "minimum": 0,
        "maximum": 0,
        "total": 0,
        "average": 0
      },
      "url": {
        "type": "url",
        "minimum": 0,
        "maximum": 0,
        "total": 0,
        "average": 0
      },
      "phone": {
        "type": "phone",
        "minimum": 0,
        "maximum": 0,
        "total": 0,
        "average": 0
      },
      "favorites": {
        "type": "favorites",
        "minimum": 0,
        "maximum": 0,
        "total": 0,
        "average": 0
      }
    },
    "statistics_tweedehands": false,
    "totals_tweedehands": false
  }
}