API version 4 and Live 4

What do you want to ask Support about?

Use cases and features of the Yandex.Direct API are described in detail in the documentation. If you didn't find the answer to your question, contact our experts — we are always ready to help.

Choose a question from the list below or to the left. After choosing the relevant topics, you will see either an answer to your question or a contact form.

Questions about using the Yandex.Direct API

What is the Yandex.Direct API and what can it be used for?

The API for the Yandex.Direct service provides programmatic access to data and enables you to create applications for managing advertising campaigns. External applications use the API to add and edit campaigns, ads and keywords, set bids, and get impression statistics.

The Direct API is intended primarily for advertising agencies and direct advertisers — commercial firms, companies in the service industry, and others. Developing custom applications allows them to fully implement their own approaches to running advertising campaigns, get statistical reports promptly, and accurately forecast budgets.

More information about ways to use the API...

Is there a difference in managing an advertising campaign using the API and using the web interface?

All changes made via the API are reflected in your advertising campaigns.

Are there any programs available that use the Yandex.Direct API?

Since different companies have different approaches to managing advertising, various solutions have appeared on the market for managing advertising based on the Yandex.Direct API.

Many advertising agencies offer their clients tools for automated management of ads in Direct, and also use these tools to optimize their own processes. All of these solutions are based on Yandex.Direct API methods.

Yandex also has solutions based on the Yandex.Direct API:

  • The Direct Commander program is intended for management of large-scale advertising campaigns in a convenient interface.
  • Mobile Direct for iPhone and Android gives advertisers the ability to manage their campaigns as efficiently as possible.
Which technologies are supported in the API?

Requests to the Yandex.Direct API are made over the HTTPS protocol using the POST method. Input and output data structures are passed in the body of the request and response.

The Direct API supports two formats: JSON and SOAP.

Authentication uses the OAuth 2.0 protocol: requests must specify the access token.

How much does it cost to use the API?

Both connection to the Direct API and usage are free of charge.

How do I connect to the API?
Application access

The application developer must complete the application registration process.

An API request is made on behalf of a Direct user — an advertiser or advertising agency. The request must specify the access token, which is a special code allowing the application to perform operations with this user's data.

User access

To get a token, the application must redirect the user to the access request page. The user authenticates in Yandex (using the username for Direct) and clicks the Confirm button. All other actions are performed automatically by the application and the Yandex server.

See also

Who should register the application?

The application developer registers the application on the Yandex OAuth server and creates a request for access to the Direct API. This only needs to be done once, regardless of the number of copies of the application.

If you purchased or use a ready-made program, you do not need to register the application or submit the access request.

How do I get a token for a user?

To get a token, the app must redirect the user to the access request page, which is a special page on the Yandex OAuth server. The user authenticates on Yandex (with the username for Direct) and grants the app access to personal data. The Yandex OAuth server generates a token and passes it to the app.

The procedure for getting a token is described in detail in the OAuth authentication guide.

Note. At the app development stage, you can get a debugging token in the name of a test user. See the section Debugging token in the OAuth authentication guide.

See also

Why did the token become invalid?

A token might become invalid if, for example, the user's password changed on Yandex. For the full list of reasons, see the section Discontinuation of a token. In this case, a new token must be obtained.

If it is a problem for the app to get a new token (for example, the app updates bids automatically and does not interact with the user), we recommend registering a separate account in Direct as the representative of a client or agency. If this account will only be used in the app and not in the browser, there is minimal risk of it being compromised, and the password can be changed less frequently than you normally would.

How can I increase the number of points available to me?

You can increase the number of available points by optimizing your advertising campaigns. You can do this by adding and refining keywords, improving the text of your ad to increase the CTR, and increasing your minimum bids. Points are recalculated and awarded every 24 hours.

See also

Show me code examples for Yandex.Direct API clients

Application samples in various programming languages are provided in the documentation:

How do I download the report file?

You can use the GetReportList method to get information about available reports. You can refer to the sample provided in the documentation to create a script for downloading a prepared report.

How frequently can I call the GetReportList and GetForecastList methods?

Check report readiness in a single thread, no more than once every 10-30 seconds. We recommend increasing the interval before each consecutive check, for example: 10, 20, 40, ... seconds. For details, see the section Requirements for an app.

How frequently can I update bids?

Recommendations on the frequency of updating bids are provided in the section Requirements for an app.

How can I view the XML code of the request and the server response?

For detecting errors and debugging, sometimes you need to output the client's SOAP request and the server's SOAP response.

For Perl:

my $client = SOAP::Lite->service($client->on_debug(sub {print @_}));
Where is the version 5 documentation?

The documentation for version 5 is located at