CreateNewForecast (Live)

Generates a forecast on the server for impressions, clicks and expenses.

The method returns the ID of the future report. You can use the ID to find out whether the report is ready (using the GetForecastList method) and download the report (using the GetForecast method). The average time for generating a report is up to a minute.

Restrictions

For a single user, no more than five reports are stored on the server. On an attempt to create a sixth report, an error message is returned with error code 31. Reports are stored on the server for five hours, then deleted automatically. Use the DeleteForecastReport method to delete a report manually.

New in the Live 4 version

The Currency input parameter is required.

Added the Currency input parameter.

Added the AuctionBids input parameter.

Input data

The input data structure in JSON is shown below.

{
   "method": "CreateNewForecast",
   "param": {
      /* NewForecastInfo */
      "Phrases": [
         (string)
         ...
      ],
      "Categories": [
         (int)
         ...
      ],
      "GeoID": [
         (int)
         ...
      ],
      "Currency": (string),
      "AuctionBids": (string)
   }
}

Parameters are described below.

Parameter Description Required
NewForecastInfo object
Phrases

Array of keywords that you need to get a forecast for (no more than 100 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.

Note. If the array contains overlapping keywords (meaning they match the same search query), the forecasted ad display and click might be associated with any of these keywords at random. So the forecast for these keywords might differ from the forecast that is received for each of the keywords via separate method calls. See section Eliminating intersections.
Yes
Categories

Array containing IDs of Yandex Catalog categories. This parameter is not used, and the passed value is ignored.

No
GeoID

Array containing IDs of the regions to create a forecast for. If omitted, the forecast is put together for all regions.

To get a list of regions, use the GetRegions (Live) method.

No
Currency

The currency to use for CPCs and total expenditures in the report.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN.

Yes
AuctionBids Whether to output auction results (the AuctionBids array) in the report — Yes/No. If omitted, No is assumed. No
Parameter Description Required
NewForecastInfo object
Phrases

Array of keywords that you need to get a forecast for (no more than 100 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.

Note. If the array contains overlapping keywords (meaning they match the same search query), the forecasted ad display and click might be associated with any of these keywords at random. So the forecast for these keywords might differ from the forecast that is received for each of the keywords via separate method calls. See section Eliminating intersections.
Yes
Categories

Array containing IDs of Yandex Catalog categories. This parameter is not used, and the passed value is ignored.

No
GeoID

Array containing IDs of the regions to create a forecast for. If omitted, the forecast is put together for all regions.

To get a list of regions, use the GetRegions (Live) method.

No
Currency

The currency to use for CPCs and total expenditures in the report.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN.

Yes
AuctionBids Whether to output auction results (the AuctionBids array) in the report — Yes/No. If omitted, No is assumed. No

Output data

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

{
   "data": 137456
}

Examples of input data

Python

{
   'Phrases': [u'refrigerator -unit', u'refrigeration unit'],
   'GeoID': [213]
}

PHP

array(
   'Phrases' => array('nokia', 'phone', 'cars'),
   'GeoID' => array(213)
)

Perl

{
   'Phrases' => ['nokia', 'phone', 'cars'],
   'GeoID' => [213]
}