---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/live/UpdatePrices.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/live/UpdatePrices.md
  - href: en/live/UpdatePrices.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt

# UpdatePrices (Live)
Sets bids and/or priorities for the specified keywords.

{% note alert %}

Disabled method. Use version 5 of the API.

For information about the compatibility of methods between versions Live 4 and 5, see the [Migration guide](https://yandex.com/dev/direct/doc/migration/concepts/methods.md).

{% endnote %}


Bid changes take effect after some time. See the [Ad Serving Rules](https://yandex.ru/legal/direct_display_rules/)[Ad Serving Rules](https://yandex.com/legal/direct_display_rules/).

## Restrictions

No more than 3000 method calls per campaign per day. You can set prices for a maximum of 1000 keywords in a single request.


{% note alert %}

This method only supports campaigns with the “Text & Image Ads” type. For setting bids in all types of campaigns, use the [Bids](https://yandex.com/dev/direct/doc/ref-v5/bids/bids.html) service in version 5 of the API.

{% endnote %}


## New in the Live 4 version

Added the Currency input parameter (see the section [Real currencies instead of Yandex units](https://yandex.com/dev/direct/doc/dg-v4/en/concepts/multicurrency.md)).


{% note alert %}

The CampaignID parameter is now mandatory.

{% endnote %}



## Input data {#input}

The input data structure in JSON is shown below.

```javascript
{
   "method": "UpdatePrices",
   "param": [
      {  /* PhrasePriceInfo */
         "CampaignID": (int),
         "PhraseID": (long),
         "Price": (float),
         "ContextPrice": (float),
         "AutoBroker": (string),
         "AutoBudgetPriority": (string),
         "Currency": (string)
      }
      ...
   ]
}
```

The `param` parameter contains an array of `PhrasePriceInfo` objects (no more than 1000 objects), each of which sets prices for a single keyword. Parameters are described below.


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

||
**<sub >PhrasePriceInfo object</sub>**
||
||
`CampaignID`
|
The campaign ID.
|
Yes
||
||
`PhraseID`
|
The keyword ID.
|
Yes
||
||
`Price`
|
Bid on Yandex search (in the currency specified in the `Currency` parameter). Used only if a strategy with manual bid management is selected for the campaign.

The maximum and minimum values are provided in the table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded up to the nearest [bid increment](https://yandex.com/dev/direct/doc/dg-v4/en/concepts/multicurrency_const.md#increment) in this currency (see the section [Real currencies instead of Yandex units](https://yandex.com/dev/direct/doc/dg-v4/en/concepts/multicurrency.md)). If converting the value to the campaign's currency results in a value that is less than the minimum bid or more than the maximum bid for this currency, it is set to equal the minimum or maximum bid, respectively.
|
At least one of the parameters: `Price`, `AutoBudgetPriority`, `ContextPrice`. Values of omitted parameters are not changed.
||
||
`ContextPrice`
|
Bid in the Yandex Advertising Network (in the currency specified in the `Currency` parameter).

The parameter is available for editing in the following cases:

1. When the MaximumCoverage strategy is selected for the Yandex Advertising Network.
    
1. When the Default strategy is selected for the Yandex Advertising Network and the keyword is disabled on the search due to a low CTR.
    
    For new keywords this condition is irrelevant, since keywords are no longer disabled for a low CTR.
    

The maximum and minimum values are provided in the table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded up to the nearest [bid increment](https://yandex.com/dev/direct/doc/dg-v4/en/concepts/multicurrency_const.md#increment) in this currency (see the section [Real currencies instead of Yandex units](https://yandex.com/dev/direct/doc/dg-v4/en/concepts/multicurrency.md)). If converting the value to the campaign's currency results in a value that is less than the minimum bid or more than the maximum bid for this currency, it is set to equal the minimum or maximum bid, respectively.
||
||
`AutoBudgetPriority`
|
Priority of the keyword when using automatic strategies. Possible values:

- Low — Low priority.
- Medium — Average priority.
- High — High priority.
||
||
`AutoBroker`
|
Enable/disable AutoBroker. This parameter is not used, and the passed value is ignored.
|
No
||
||
`Currency`
|
The currency that bids are shown in.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. The value must match the campaign's currency.

If this parameter is omitted or NULL, Yandex units are used. In this case, if the campaign is run using real currency, the bids passed by the application are converted to the actual currency before saving (see the section [Real currencies instead of Yandex units](https://yandex.com/dev/direct/doc/dg-v4/en/concepts/multicurrency.md)).

If the value is something other than NULL but it does not match the currency of the campaign or one of the campaigns, an error is returned with code [245](https://yandex.com/dev/direct/doc/dg-v4/en/reference/ErrorCodes.md#BadCurrency).
|
No
||
|#


## Output data {#output}

Returns 1 when executed successfully, as shown in the following example.

```javascript
{
   "data": 1
}
```


## Examples of input data {#example}

## Python

```python
[
   {
      'CampaignID': 3665578,
      'PhraseID': 199381759,
      'Price': 6.5,
      'AutoBudgetPriority': 'Medium',
      'ContextPrice': 3.2
   }
]
```

## PHP

```php
array(
   array(
      'CampaignID' => 3665578,
      'PhraseID' => 199381759,
      'Price' => 6.5,
      'AutoBudgetPriority' => 'Medium',
      'ContextPrice' =3.2
   )
)
```

## Perl

```perl
[
   {
      'CampaignID' => 3665578,
      'PhraseID' => 199381759,
      'Price' => 6.5,
      'AutoBudgetPriority' => 'Medium',
      'ContextPrice' =3.2
   }
]
```


