Authentication in Yandex Search API
Written by
Updated at February 12, 2024
To work with Search API, you need to send API requests on behalf of a service account. Search API only supports authentication with API keys.
Warning
API keys do not expire. If your key might have been compromised, invalidate it and issue a new one.
-
Provide the obtained values in each request.
-
For POST requests, provide the folder ID and API key values in the
Authorization
header in the following format:Authorization: Api-Key <API key>
-
For GET requests, provide the folder ID and API key values in the
folderid
andapikey
fields of the request, respectively:curl 'https://yandex.ru/search/xml?folderid=<folder_ID>&apikey=<API_key_value>&query=<search_query_text>'
-