The programming interface for the Yandex.Webmaster service (the Yandex.Webmaster API) makes it possible for developers to create applications for working with user data that is stored on the Yandex.Webmaster service.
Examples of possible applications:
- Creating Yandex.Webmaster add-ons for a hosting site control panel.
- Creating applications for managing web sites.
How the API works
The Yandex.Webmaster API is implemented as a RESTful (Representational State Transfer) interface, using HTTP and JSON/XML for data exchange.
The client application exchanges JSON or XML messages with the Yandex.Webmaster API server using HTTP requests conforming to REST principles. Website resources and site lists are obtained using the HTTP GET method, created using the HTTP POST method, modified using the HTTP PUT method, and deleted using the HTTP DELETE method (see Overview of the API resources).
The Yandex.Webmaster API can be accessed by authenticated users at the address:
By default, the API returns JSON. If you want XML responses, include the special HTTP header in requests to resources:
API requests can contain two types of parameters:
- Path parameters – Parameters that are part of the resource URL.
- Query arguments – Parameters that are appended to the resource URL after the "?" symbol.
Always use UTF-8 encoding for exchanging data between the client application and the Yandex.Webmaster service.
Since most tasks in the Yandex.Webmaster API are performed on behalf of a particular user, the client application must be authorized.
In addition, the user ID must be specified in requests to API resources. When you start working with the API, get a user ID by calling the user resource.
Terms of using the API
To start working with the Yandex.Webmaster API, a partner company must enter into a standard-format agreement with Yandex and get a client_id in Yandex's authentication system, oauth.yandex.com. The API cannot be used without a client_id.
When registering a new partner account on the oauth.yandex.com server, the following data must be specified:
- Application name - the name that will be shown to users when requesting access to their personal data.
- Permissions - a list of operations that the user can grant access for (currently, this is adding a site and getting information about a site).
- A link to the icon for the client application.
- A link to the client application.
- The Callback URI, which is a link to the page that the user will be redirected to after granting access to personal data.
Using the API to create end-user client applications assumes acceptance of the Terms of Service for the Yandex.Webmaster API. The actions of the client application must not contradict the regulations set forth in this document.
To perform actions with sites and site lists that require mandatory authorization, the end-user of the client application must accept the user agreement for the Yandex.Webmaster service. The client application must explicitly inform the user of this requirement.