Statistics API

Endpoint

GET https://code.21wiz.com/api/web2.php

Parameters (GET)

ParameterRequiredFormatDefaultDescription
dateStartnoYYYY-MM-DDtodayPeriod start, inclusive
dateEndnoYYYY-MM-DDtodayPeriod end, inclusive
keynostring—Filter by a specific placement. If omitted, all placements in the account are returned.
groupBynocomma-separated listcountry,domain,platform,originAdditional levels after date and placement. Their order defines nesting. Pass groupBy= for totals without breakdown.

Groupings

Base levels date → placement are always present. Additional levels appear in the order supplied in groupBy; metrics are placed at the deepest level.

ValueDescriptionPossible values
countryImpression countryCountry ISO code (RU, AZ, …) or undefined
domainSite URL or identifierAccount value or undefined
platformDevice typedesktop, mobile:smart, tablet, undefined
originSource domain detected by the system or received through RTBDomain or undefined

Response

Content-Type: application/json

Default: groupBy=country,domain,platform,origin

{
  "status": "success",
  "code": 200,
  "data": {
    "2026-05-26": {
      "1224a281e3bee0e5eec0b9e3f047b38b": {
        "RU": {
          "example.com": {
            "desktop": {
              "origin-example.com": { "imps": 264, "clicks": 3, "revenue": 17.17 }
            },
            "mobile:smart": {
              "origin-example.com": { "imps": 302, "clicks": 12, "revenue": 19.63 }
            },
            "tablet": {
              "undefined": { "imps": 8, "clicks": 0, "revenue": 0.52 }
            }
          }
        },
        "AZ": {
          "example.com": {
            "desktop": {
              "origin-example.com": { "imps": 4, "clicks": 0, "revenue": 0.26 }
            }
          }
        }
      }
    }
  }
}

groupBy=country — country only

{
  "status": "success",
  "code": 200,
  "data": {
    "2026-05-26": {
      "1224a281e3bee0e5eec0b9e3f047b38b": {
        "RU": { "imps": 596, "clicks": 16, "revenue": 38.74 },
        "AZ": { "imps": 4, "clicks": 0, "revenue": 0.26 }
      }
    }
  }
}

groupBy= — no additional grouping

{
  "status": "success",
  "code": 200,
  "data": {
    "2026-05-26": {
      "1224a281e3bee0e5eec0b9e3f047b38b": { "imps": 600, "clicks": 16, "revenue": 39.00 },
      "bc5950df574f62ba2304131587a5aa13": { "imps": 59, "clicks": 1, "revenue": 3.84 }
    }
  }
}

Metric fields

FieldTypeDescription
impsintImpressions
clicksintClicks
revenuefloatRevenue, rounded to two decimal places

Examples

All placements for one day with the full default breakdown

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://code.21wiz.com/api/web2.php?dateStart=2026-05-26&dateEnd=2026-05-26"

Country breakdown for one week

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://code.21wiz.com/api/web2.php?dateStart=2026-05-20&dateEnd=2026-05-26&groupBy=country"

Specific placement grouped by platform, country and origin

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://code.21wiz.com/api/web2.php?dateStart=2026-05-26&dateEnd=2026-05-26&key=1224a281e3bee0e5eec0b9e3f047b38b&groupBy=platform,country,origin"

Placement totals without a breakdown

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://code.21wiz.com/api/web2.php?dateStart=2026-05-26&dateEnd=2026-05-26&groupBy="