---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.2
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/reference/CreateNewWordstatReport.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/reference/CreateNewWordstatReport.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt

# CreateNewWordstatReport
Generates a search query statistics report on the server.
The method returns the ID of the future report. You can use the ID to find out whether the report is ready (using the [GetWordstatReportList](https://yandex.com/dev/direct/doc/dg-v4/en/reference/GetWordstatReportList.md) method) and download the report (using the [GetWordstatReport](https://yandex.com/dev/direct/doc/dg-v4/en/reference/GetWordstatReport.md) method). Generating a report usually takes less than a minute.


{% note info %}

The method returns the same information that is available in the [Keyword Statistics](https://wordstat.yandex.ru/)[Keyword Statistics](https://wordstat.yandex.com/) service. Statistics are calculated for the last month.

{% endnote %}


## Restrictions

A single user can get search query statistics for 1000 keywords per day.

Points are used when this method is invoked (see [<Usage limitations](https://yandex.com/dev/direct/doc/dg-v4/en/concepts/Restrictions.md)). If there are not enough points available, the error message [152](https://yandex.com/dev/direct/doc/dg-v4/en/reference/ErrorCodes.md#ErrorCode152) is returned.

For a single user, a maximum of five reports can be stored on the server (for all campaigns). On an attempt to create a sixth report, an error message is returned with error code [31](https://yandex.com/dev/direct/doc/dg-v4/en/reference/ErrorCodes.md#ErrorCode31). Reports are stored on the server for five hours, then deleted automatically.


## Input data {#input}

The input data structure in JSON is shown below.

```javascript
{
   "method": "CreateNewWordstatReport",
   "param": {
      /* NewWordstatReportInfo */
      "Phrases": [
         (string)
         ...
      ],
      "GeoID": [
         (int)
         ...
      ]
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
|
**<sup >Required</sup>**
||

||
**<sub >NewWordstatReportInfo object</sub>**
||
||
`Phrases`
|
Array of keywords that you need to get query statistics for (no more than 10 keywords, using UTF-8 encoding).

Keywords may contain negative keywords. A negative keyword that consists of multiple words should be enclosed in parentheses. For example: _refrigerator -cooler -(refrigeration equipment) -repair_.
|
Yes
||
||
`GeoID`
|
Array of region IDs. This lets you get statistics only for search queries that were made in the specified regions.

To exclude a region, put a minus sign in front of its ID. For example, [1, -219] indicates to get statistics for Moscow and the Moscow region, other than Chernogolovka. Statistics are given as the total for all the plus regions, excluding all the minus regions.

The value 0 is ignored.

If regions are omitted (for example, an empty array, or only minus regions are specified, or the minus regions match the plus regions), statistics are output for all regions.

To get the full list of regions, use the [GetRegions](https://yandex.com/dev/direct/doc/dg-v4/en/reference/GetRegions.md) method.
|
No
||
|#


## Output data {#output}

The method returns the ID of the future report, as shown in the following example.

```javascript
{
   "data": 137456
}
```


## Examples of input data {#example}

## Python

```python
{
   'Phrases': [u'mouse -mickey',u'rodent'],
   'GeoID': [213]
}
```

## PHP

```php
array(
   'Phrases' => array ('Pooh-Winnie', 'sintepon'),
 'GeoID' = array(213)
)>
```

## Perl

```perl
{
 'Phrases' => ['mouse -mickey','rodent'],
 'GeoID' => [213]
}>
```

