---
sidebar_position: 1
description: Get statistics and other functions to work with VK in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, VK]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# 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 | &#x2714; | Start date of the period |
  | EndDate | --dateto | Date | &#x2714; | End date of the period |
  | Parameters | --auth | Structure Of String | &#x2716; | Authorization parameters. See GetAuthParameters |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from VK



```bsl title="1C:Enterprise/OneScript code example"
    Parameters = GetVKParameters();

    CurrentDate = OPI_Tools.GetCurrentDate();
    StartDate   = BegOfDay(CurrentDate);
    EndDate     = EndOfDay(StartDate);

    Result = OPI_VK.GetStatistics(StartDate, EndDate, Parameters);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            # JSON data can also be passed as a path to a .json file
            
            oint vk GetStatistics \
             --datefrom "2025-12-10T00:00:00" \
             --dateto "2025-12-10T23:59:59" \
             --auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            :: JSON data can also be passed as a path to a .json file
            
            oint vk GetStatistics ^
             --datefrom "2025-12-10T00:00:00" ^
             --dateto "2025-12-10T23:59:59" ^
             --auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "response": [
  {
   "activity": {
    "comments": 7,
    "likes": 7
   },
   "period_from": 1765324800,
   "period_to": 1765411199,
   "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": [],
    "mobile_views": 0,
    "views": 0,
    "visitors": 0
   }
  },
  {
   "activity": {
    "comments": 5,
    "likes": 5
   },
   "period_from": 1765238400,
   "period_to": 1765324799,
   "reach": {
    "age": [
...
```
