Get statistics
Gets the overall community statistics for a period
Function GetStatistics(Val StartDate, Val EndDate, Val Parameters = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| StartDate | --datefrom | Date | ✔ | Start date of the period |
| EndDate | --dateto | Date | ✔ | End date of the period |
| Parameters | --auth | Structure Of String | ✖ | Authorization JSON or path to .json |
Returns: Map Of KeyAndValue - serialized JSON response from VK
1C:Enterprise/OneScript code example
Parameters = GetVKParameters();
CurrentDate = OPI_Tools.GetCurrentDate();
StartDate = BegOfDay(CurrentDate);
EndDate = EndOfDay(StartDate);
Result = OPI_VK.GetStatistics(StartDate, EndDate, Parameters);
- Bash
- CMD/Bat
oint vk GetStatistics \
--datefrom ""2025-09-15T00:00:00"" \
--dateto ""2025-09-15T23:59:59"" \
--auth ""/tmp/wnqhhjg0.vdr.json""
oint vk GetStatistics ^
--datefrom ""2025-09-15T00:00:00"" ^
--dateto ""2025-09-15T23:59:59"" ^
--auth ""/tmp/wnqhhjg0.vdr.json""
Result
{
"response": [
{
"activity": {
"comments": 8,
"likes": 8
},
"period_from": 1757894400,
"period_to": 1757980799,
"reach": {
"age": [
{
"value": "12-18",
"count": 0
},
{
"value": "18-21",
"count": 0
},
{
"value": "21-24",
"count": 0
},
{
"value": "24-27",
"count": 1
},
{
"value": "27-30",
"count": 0
},
{
"value": "30-35",
"count": 0
},
{
"value": "35-45",
"count": 0
},
{
"value": "45-100",
"count": 0
}
],
"cities": [],
"countries": [
{
"code": "BY",
"count": 1,
"name": "Беларусь",
"value": 3
}
],
"mobile_reach": 1,
"reach": 1,
"reach_subscribers": 1,
"sex": [
{
"value": "f",
"count": 0
},
{
"value": "m",
"count": 1
}
],
"sex_age": [
{
"value": "f;12-18",
"count": 0
},
{
"value": "f;18-21",
"count": 0
},
{
"value": "f;21-24",
"count": 0
},
{
"value": "f;24-27",
"count": 0
},
{
"value": "f;27-30",
"count": 0
},
{
"value": "f;30-35",
"count": 0
},
{
"value": "f;35-45",
"count": 0
},
{
"value": "f;45-100",
"count": 0
},
{
"value": "m;12-18",
"count": 0
},
{
"value": "m;18-21",
"count": 0
},
{
"value": "m;21-24",
"count": 0
},
{
"value": "m;24-27",
"count": 1
},
{
"value": "m;27-30",
"count": 0
},
{
"value": "m;30-35",
"count": 0
},
{
"value": "m;35-45",
"count": 0
},
{
"value": "m;45-100",
"count": 0
}
]
},
"visitors": {
"cities": [],
"countries": [
{
"code": "IN",
"count": 1,
"name": "Индия",
"value": 80
}
],
"mobile_views": 0,
"views": 1,
"visitors": 1
}
},
{
"activity": {
...