Getting started with Search API via API v1
Follow this guide if you have used Yandex XML before and seek to set up your workflow in Search API via API v1, its Yandex XML-compatible interface.
Instead of API v1, we recommend that you use the more modern API v2 interface.
Getting started
Sign up for Yandex Cloud and create a billing account:
- Go to the management console
and log in to Yandex Cloud or create an account if you do not have one yet. - On the Yandex Cloud Billing
page, make sure you have a billing account linked and it has theACTIVE
orTRIAL_ACTIVE
status. If you do not have a billing account, create one.
If you have an active billing account, you can go to the cloud page
Learn more about clouds and folders.
Registration
-
In the management console
, select the folder you are going to use to work with Search API or create a new one. -
In the list of services, select Search API.
-
Fill in the form fields:
-
Select the Search type:
Russian
,Turkish
, orInternational
. -
Set at least one trusted IP address to send requests to the Yandex search database from.
You can send requests to Search API's API v1 only from one of the IP addresses added to the service settings during registration. Attempts to run a request from a non-registered IP address will be rejected.
-
-
Click Save.
After that, you will be able to change the search type and the trusted IP address list. In the management console
Run a test request in the management console
To interactively explore the principle of formation of Search API search queries via API v1, use the special query testing form:
-
In the management console
, select the folder you are going to use to work with Search API. -
In the list of services, select Search API.
-
In the left-hand panel, select
Test queries. -
Select a Request method (GET and POST methods are supported) and fill in the form fields.
Note
You cannot edit the Search query text in a test query. Queries are submitted from a Yandex IP address on behalf of the service.
As the values in the form fields change, the search query URL for the specified values will be formed in the Search query field. If you select the
POST
method, a relevant query body will be formed in the Request body field. -
Click Run test. The query execution result will be displayed below.
-
If necessary, change the parameters to adjust the search results and resubmit your query.
Get started with the service
Once you have learned how to generate queries to Search API's API v1, move on to running search queries as part of your standard operations.