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.
- When calling a Yandex Direct API method, an error occurs
- Restrictions when working with the Yandex Direct API
- Access to register new agency clients via the API
- Make a suggestion or leave a comment
- Other questions about the Yandex Direct API
Questions about using the Yandex Direct API
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 Yandex 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.
All changes made via the API are reflected in your advertising campaigns.
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 Yandex 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.
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 Yandex Direct API supports two formats: JSON and SOAP.
Authentication uses the OAuth 2.0 protocol: requests must specify the access token.
Both connection to the Yandex Direct API and usage are free of charge.
- Application access
-
The application developer must complete the application registration process.
An API request is made on behalf of a Yandex 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 logs in on Yandex (using the username for Yandex Direct) and clicks the Confirm button. All other actions are performed automatically by the application and the Yandex server.
See also
The application developer registers the application on the Yandex OAuth service and submits a request for access to the Yandex Direct API. Application users don't need to do this.
If you purchased or use a ready-made program, you do not need to register the application or submit the access request.
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 logs in on Yandex (with the username for Yandex 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 the OAuth authorization guide.
See also
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 you are using an application, we recommend that you register a special representative in Yandex Direct and get a token for the representative. See the section Recommendations for creating representatives in the documentation for the API version 5.
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
Application samples in various programming languages are provided in the documentation:
Perl |
---|
PHP |
Python |
Authorization |
Reports |
Perl |
---|
PHP |
Python |
Authorization |
Reports |
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.
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.
Recommendations on the frequency of updating bids are provided in the section Requirements for an app.
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 @_}));
A list of changes by API version is provided in the following sections:
- For version 4, in Version 4 (deprecated).
- For version Live 4, in Live 4 version (deprecated).
- For version 5, in API version 5. History of changes.
We also notify you of changes to the Yandex Direct API in the official blog. To get notifications about new posts, subscribe.
The documentation for version 5 is at https://tech.yandex.com/direct/doc/dg.
For information about changes in version 5 compared to previous versions and a list of equivalents for methods and their parameters, see the Migration guide.