Authentication in Yandex Search API
Written by
Updated at May 20, 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>
Make sure to include your folder ID in the
folderid
field in the request body:https://yandex.<domain>/search/xml?folderid=<folder_ID>
-
For GET requests, provide the folder ID and API key values in the
folderid
andapikey
fields of the request body, respectively:curl 'https://yandex.<domain>/search/xml?folderid=<folder_ID>&apikey=<API_key_value>&query=<search_query_text>'
-