About Yandex Search API
Yandex Search API allows you to automatically query the Yandex search database and get search results in an easy-to-process format. The service targets developers and webmasters seeking to integrate Yandex search capabilities into their applications and web services.
With Yandex Search API, you can implement the search functionality within a website, group of websites, or through the internet. You can use the service for internal search on corporate portals, content aggregators, brand mention monitoring systems, and other apps requiring automatic processing of search results. In addition, Yandex Search API allows monitoring website ranking for specific queries in Yandex search results, which can be of use to SEO professionals and marketers.
Note
Yandex Search API proxies the results of the Yandex search engine. The format, structure, and content of fields in the response are determined by the search engine and may differ from the results you see when running the same query in your browser.
Yandex Search API supports text search, image search by text description or reference image, and generative search, which returns a single concise response generated by Yandex's proprietary model.
Yandex Search API also brings you Wordstat, your source of statistics on Yandex search queries. Use it to learn the top popular queries for specific keywords, follow query frequency dynamics, or look into geographic distribution of search queries across the regions of Russia. Note that Wordstat is available via the API in synchronous mode only. For the web version, visit the Wordstat website.
Operating modes and search types
With Yandex Search API, you can submit queries in two modes:
- In synchronous mode, you get your result immediately as soon as your query is processed. The response comes with minimum delay but not instantly anyway: it still takes some time for Yandex search to deliver the results. The synchronous mode will suit interactive applications.
- In deferred (asynchronous) mode, you first get an Operation object with an operation ID, which you can use to learn the status of the operation and get the result. The deferred mode will do well if you need to process a batch of queries.
Search types are mode-specific.
|
Search type |
Description |
Modes |
|
Web search based on text description. |
Synchronous and deferred |
|
|
Image search based on text description or reference image. Results in XML or JSON. |
Synchronous only |
|
|
Text search using YandexGPT. A neural network analyzes the search results and generates a single concise response. |
Synchronous only |
You can influence the output by tweaking the search options like geolocation and device-based optimization, search operators for fine-tuned search, etc.
Interfaces
Yandex Search API provides two interaction methods: via the API and via Yandex Cloud ML SDK for Python.
The API is designed based on the gRPC engine and allows sending search queries via gRPC calls and REST requests.
The Yandex Cloud ML SDK library for Python simplifies your work with Yandex Search API and other Yandex Cloud AI Studio services by providing user-friendly Python interfaces for all types of search and automatic handling of synchronous and asynchronous requests.
The source code and code snippets can be found in this GitHub repository; for a description of classes and methods, visit the ML SDK reference.
To use Yandex Search API, you will need a Yandex Cloud user or service account and authentication data. The AI Studio API key has all the required roles and accesses.