About Yandex Search API
With Yandex Search API, you can automatically submit queries to the Yandex search database and get your search results. The service is tailored for developers and webmasters.
With Yandex Search API, you can easily implement the search feature on individual websites, groups of websites, or across the internet, or create an application with built-in search features. Additionally, it offers features to monitor website ranking for specific queries in Yandex search results. Yandex Search API enables text and image search, where you can customize search parameters, optimize results for specific devices, and select the output format.
In Yandex Search API, you can run queries in synchronous and deferred (asynchronous) modes. In synchronous mode, you will get the results immediately once your query is processed. In synchronous mode, you will get a response with minimum delay, but not instantly: processing takes some time. In asynchronous mode, in response to a query, you will get the Operation
object with the ID of the operation in progress. You can use this ID to find out the query status and later get the result.
Yandex Search API provides two interfaces for queries: API v2 and API v1.
API v2
API v2 is an interface natively integrated into the Yandex Cloud ecosystem. API v2 is designed based on the gRPC mechanism and allows sending text queries using gRPC calls or the POST
method in synchronous and deferred modes. You can get the result in XML or HTML formats. Search results are generated in default format or optimized for mobile devices.
With the API v2 interface, you can use text queries to search for images. Image search is only available in synchronous mode.
You can also use API v2 for text search in combination with YandexGPT generative features. This gets you a single concise and coherent generative response to produce which the neural network analyzes the relevant results of the Yandex Search API's text search across websites.
With API v2, you set the search type directly in the body of each query. You need a Yandex Cloud user or service account and authentication data to send queries. You do not need to specify trusted IP addresses when using API v2.
API v1
Warning
API v1 is now obsolete and will be discontinued on September 30, 2025. Make sure to migrate your projects to API v2 before this date and use it in your new projects.
API v1 is a Yandex XML compatible interface. API v1 allows you to run text queries using the GET and POST methods and get your results in XML or HTML format. Only synchronous mode is supported.
With Yandex Search API API v1, you can choose between default search and search optimized for mobile devices. You can also use API v1 to search for images based on a text query. Image database search is only available via the GET
method.