FAQ

What is XSLT?

XSLT is a language for converting and rendering XML documents and is a part of the set of XSL recommendations.

Detailed information about the XSLT language is provided in the following documents:

Notifications

What are notifications?

Notifications are a service for automatically sending email when problems arise during use of Yandex.XML. The email address, settings for sending notifications, and thresholds are all set during registration.

What should I do if I get a notification that the number of requests has sharply decreased?

The table below shows possible reasons for a decreased number of requests, how to diagnose it, and recommended solutions.

Reason Diagnostic methods Recommended solutions
Decreased number of searches performed. For example, this may occur due to natural variation in the number of visitors depending on the day of the week or the time of day. Review the site usage statistics for days of the week and time of day. Increase the notification threshold on the Settings page.
Unavailability or partial availability of Yandex.XML on the website. Try submitting several search queries yourself. Check the accuracy of the results that are returned. Check whether the request format is correct.

What should I do if I get a notification that the number of requests has sharply increased?

The table below shows possible reasons for an increased number of queries, how to diagnose it, and recommended solutions.

Reason Diagnostic methods Recommended solutions
Increased number of searches performed. For example, this may occur due to natural variation in the number of visitors depending on the day of the week or the time of day. Review the site usage statistics for days of the week and time of day. Increase the notification threshold on the Settings page.
DoS attack. Check the server log files for data suggesting a DoS attack.

What should I do if I get a notification that there were no requests for a 24-hour period?

Check how the search is working on the site.

If statistics show a sharp decrease in the number of queries made from the site, it is possible that this is due to the search not working correctly.

What should I do if I get a notification that the number of requests is approaching the daily limit?

Review the restrictions applied to the service and ways to get around them. Contact a Yandex representative to discuss details of extending search features.

IP address

Why is an IP address required for registration?

The IP address, in combination with a Yandex.Passport account, is used for identifying a Yandex.XML user. The results of user identification determine the restrictions applied to service usage.

How do I find out what my IP address is?

The way to determine the IP address depends on the type of computer being used to access the Yandex.XML service.

Device type

Possible methods for detecting the IP address

Server

  • Ask your provider for the IP address.
  • Set up a remote connection to the server and run the ipconfig command (Windows) or ifconfig (Unix).
  • Run the ping <server name> command from the command line of a personal computer.

Personal computer

Note

Note that if a modem is used, the IP address can change each time a connection is made.

The IP address being registered is in use

The table below shows possible reasons and solutions.

Reason Possible solution
An open proxy server is being used to access Yandex.XML. User your Internet provider's proxy server.
A modem is being used to access the Internet. Your provider assigns a dynamic IP address, which can change each time you connect. Try disconnecting and reconnecting to the Internet.
The service is being accessed from a server. Obtain a dedicated IP address.

Additional search features

Setting up site search

To restrict the search to the website only, use the host operator.

Syntax:

<query text> host:<URL of the site to search>

The following request is used for searching for the phrase “search settings” on the website https://help.yandex.ru:

search settings host:help.yandex.ru

Restricting the search to a region or category

To restrict the search to documents that are relevant to a particular region or category, use the cat operator.

Syntax:

<query text> cat:<adjusted ID of the region or category>

For the value of the cat operator, pass the adjusted value of the region ID (added to “11000000”) or category ID (added to “9000000”).

For a category, you may also use a search theme (see the section Creating and changing themes in the Help for the Yandex.Search for sites service). In this case, the value of the ID obtained when creating a theme should be passed in unaltered form (do not adjust it).

The request may specify multiple regions and categories. To do this, use the logical operators “AND” (“&&”) and “OR” (“|”).

The following request is used for searching for the word “meat” in documents that are relevant to the category “bodybuilding nutrition” (ID “3783”) in the city of “Samara” (ID “51“):

meat cat:11000051 && cat:9003783

Search in results

To set up a search in results, use the && operator.

Syntax:

(<original query text>) && (<query text to search for in results>)

The following request is used to search for documents with the phrase “manual transmission” in results for the query “autos”:

(autos) && (manual transmission)

Encoding

How to correctly set encoding for a request being sent?

The request encoding is set in the header of the XML file:

<?xml version="1.0" encoding="<encoding>"?>

Which encoding is used for sending the search response?

The XML file with search results is sent in UTF-8 encoding. To convert it to a different encoding, you can use a library such as the libiconv library or the Convert::Cyrillic module.

Incorrect characters in the response

In most cases, incorrect characters in the response are the result of sending the request at the socket level.

Possible solutions:

  • Use HTTP version 1.0 instead of 1.1.
  • Use a higher-level type of interface.
  • Configure handling for chunked responses.