Updating data via XML file

If you have more than 30 branches in your chain, you can update the Yandex Business Directory data via XML file. You can send all information about branches, including photos and additional parameters.

To pass information, prepare the XML file and upload it to your site using an updatable link. The data must be accessible via the FTP, HTTP or HTTPS protocol.

The transmitted data must comply with the XML format specification.

  1. General requirements
  2. Address
  3. Category
  4. Additional parameters
  5. Example of an XML file
  6. Element descriptions
  7. File verification

General requirements

  1. The XML file must be UTF-8 encoded.
  2. The standard XML header must start from the first line, from the zero character.

    For example:
    <?xml version="1.0" encoding="UTF-8"?>
  3. The root element must look as follows:
    <companies></companies>
  4. Branches are described using company elements that are nested in the root element. There can be any number of company elements.
  5. Each branch property should be wrapped in a separate element. For more information, see Description of elements.

    In this example, the site is wrapped:

    <url>http://www.yakor-anapa.ru</url>
  6. Main and additional elements should be arranged in the same way as in the example and in the element description table.
  7. For each branch, you should specify:
    • A unique ID in the company-id element.
    • The name in the name element.
    • The full location address, including the building number.
    • The category (activity type).
    • The site in the url element.
    • The date when the XML file was updated in the actualization-date element.
    • Coordinates (for branches without an exact address) in the coordinates element.

    To allow users to edit the information about your organization, enter the phone number in the phone element.

    Note. You don't have to pass the postal code.
  8. If a property has multiple values (for example, phones), pass several elements with the same name.
  9. You can pass only elements specified in the Description of the elements section.
  10. Some elements may be multilingual. These include the name, name-other, address, country, address-add, and working-time elements. The lang attribute can take the following values:

    • ru — Russian.
    • ua — Ukrainian.
    • by — Belarusian.
    • kz — Kazakh.
  11. To ensure that the information about your chain is complete, pass the maximum set of elements for each branch (including additional elements).
  12. Each branch should be on a separate card. A branch should have its own ID with a separate set of elements.
  13. The data shouldn't contain HTML elements. The XML standard does not allow ASCII characters in the value range from 0 to 31 in text fields. The exceptions are values 9, 10, 13, tab, newline, and carriage return. This standard also requires replacing some symbols in the text: & with &.

Address

Specify the full address in one line in the address element, the country in the country element, and the name of the shopping or business center, office number, or floor in the address-add element.

<address lang="en">Yekaterinburg, Lenin avenue, 101, a</address>
<country lang="en" >Russia</country>
<address-add lang="en">Romashka Mall, 2nd floor, office 203</address-add>

Category

To get a list of categories, write to partner@sprav.yandex.ru.

Additional parameters

You can pass additional parameters for your chain or branch via XML file. For example, you can specify if there is parking available near your shopping center or which currency can be withdrawn from your ATM.

This information is passed in additional elements. To get an XML file with a list of possible elements for your category, write to partner@sprav.yandex.ru.

Example of an XML file

<?xml version="1.0" encoding="UTF-8"?> 
<companies>
    <company>
        <company-id>770704034</company-id>
        <name lang="en"> Anchor</name>
        <address lang="en">Yekaterinburg, Lenin avenue, 101a</address>
        <country lang="en">Russia</country>
        <address-add lang="en">Romashka Mall, 2nd floor, office 203</address-add>
        <phone>
            <number>+7 (343) 375-13-99</number>
            <ext>555</ext>
            <info>Secretary </info>
            <type > phone</type>
        </phone>
        <phone>
            <ext/> <type>phone</type>
            <number>+7 (800) 200-23-45</number>
            <info/>
        </phone>
        <email>info@yakor-anapa.ru</email>
        <url>http://www.yakor-anapa.ru</url>
        <add-url>http://www.yakoranapa.ru</add-url>
        <info-page>http://www.test.ru/yakor-anapa</info-page>
        <working-time lang="en">every day, 10:00-21:00</working-time>
        <rubric-id>184106414</rubric-id>
        <rubric-id>184106394</rubric-id>
        <inn>123456789123</inn> 
        <ogrn>9876543219876</ogrn>
        <actualization-date>1511724300</actualization-date>
        <photos gallery-url="http://test.ru/yakor-anapa/gallery">
            <photo url="http://test.ru/yakor-anapa/11_b.jpg" alt="Hotel restaurant" type="interior"/>
            <photo url="http://test.ru/yakor-anapa/19_b.jpg" type="exterior"/>
            <photo url="http://test.ru/yakor-anapa/25_b.jpg"/>
            <photo url="http://test.ru/yakor-anapa/26_b.jpg"/>
            <photo url="http://test.ru/yakor-anapa/17_b.jpg"/>
            <photo url="http://test.ru/yakor-anapa/drink1.jpg" alt="Cocktail in the hotel bar" type="food"/>
        </photos>
        <feature-boolean name="internet" value="1"/>
        <feature-enum-single name="star" value="five"/>
        <feature-numeric-single name="room_number" value="15"/>
        <feature-enum-multiple name="hotel_type" value="art_hotel"/>
        <feature-text-single value="Yakor_free_wi-fi" name="ssid"/>
    </company>
</companies>

Element descriptions

NameDescriptionExample
company-idUnique ID of the branch (assigned by the chain owner). Can contain numbers and Latin letters.
<company-id>770704034</company-id> 
nameName of the branch. Specified without quotation marks, case-sensitive. Multilingual element.
<name lang="en">Anchor</name>
name-otherAlternative name of the branch (if there are several names, each one is specified in a separate element). Multilingual element.
<name-other lang="en">SP Ivanov</name-other>
addressThe branch address (in one line). Multilingual element.
Note. If the element contains only the street name and house number, use the locality-name element specifying the city, town or village.
<address lang="en">Yekaterinburg, Lenin avenue, 101a</address>  
<address lang="en">Lenin avenue, 101a</address><locality-name lang="en">Yekaterinburg</locality-name>
countryCountry. Specified in full, without abbreviations. Multilingual element.
<country lang="en">Russia</country>
address-addAdditional address information that doesn't apply to other elements. Multilingual element.
<address-add lang="en">Benua business center, 5th floor, office 547</address-add>
coordinatesCompound element. Coordinates (latitude and longitude).
<coordinates><lon>34.427524546763365</lon> <lat>53.219950313883814</lat></coordinates> 
lonLongitude. Use the dot as as the decimal separator.
<lon>34.427524546763365</lon> 
latLatitude. Use the dot as as the decimal separator.
<lat>53.219950313883814</lat>
phoneCompound element. Phone number (if there are several phone numbers, specify each one in a separate element).
<phone><number>8 (800) 200-23-45</number><ext>555</ext> <type>phone</type><info>secretary</info></phone>
numberThe landline or mobile phone number. The format is [country code] ([city code]) [phone number].
<number>8 (800) 200-23-45</number>
<number>+7 (3456) 23-45-67</number>
extExtension, without comments, words or delimiters.
<ext>555</ext>
infoPhone information, such as "director" or "reception".
Note. This element shouldn't contain information about the phone type.
<info>секретарь</info>
typePhone type. Takes one of three values:
  • phone — Phone number.
  • fax — Fax number.
  • phone-fax — Phone/fax number.
<type>phone</type>
emailEmail address (if there are several addresses, specify each one in a separate element).
<email>info@yakor-anapa.ru</email>
urlThe main site of the chain. Specified in lowercase, in full, including http:// or https://.
<url>http://www.yakor-anapa.ru</url>
add-urlAdditional site of the chain (for example, links to social media pages or to branch pages).
Note. The URL of the page with the chain information on the partner's site is specified in the info-page element.
<add-url>http://www.yakor-anapa.ru/branche1.html</add-url>
info-pageURL of the page with the chain information on the Yandex.Directory partner's site. Specified in lowercase, in full, including http:// or https://.
Note. The address must contain the domain name of the partner's site.
<info-page>http://leclick.ru/restaurant/russia/moscow/svetliy/photos</info-page>
working-timeOpening hours. Days off and non-working days aren't specified. Multilingual element.
<working-time lang="en">every day, 10:00-21:00</working-time>
<working-time lang="en">Mon-Fri 9:00-19:00, Sa-Su 10:00-18:00</working-time>
rubric-idID of the category that this branch belongs to (if there are several categories, specify each one in a separate element).
Note. A branch can have up to three categories, but at least one of them should coincide with the chain category.
To get a list of categories, write to partner@sprav.yandex.ru.
<rubric-id>184106414</rubric-id>
<rubric-id>184106394</rubric-id>
innOrganization's INN (Personal Tax Reference Number).
<inn>123456789123</inn>
ogrnOrganization's OGRN (Primary State Registration Number).
<ogrn>9876543219876</ogrn>
actualization-date

Date updated. Corresponds to the time of the last update. Used to avoid downloading information received at the previous check.

The content can be specified in the format:

  • DD.MMM.YYYY.
  • UNIX time. Specified in milliseconds from 00:00:00.000 01.01.1970.
<actualization-date>13.11.2017</actualization-date>
<actualization-date>1511724300</actualization-date>
photos

A link to the gallery or a page on the chain site with all photos. If there are several photos, specify each one in a separate photo element.

The photo element can contain the following attributes:

  • alt — Text description of the photo in free form.
  • type — Photo type.
    • exterior — Exterior.
    • interior — Interior.
    • food — Food, drinks.
<photos gallery-url="http://test.ru/yakor-anapa/gallery">
<photo url="http://test.ru/yakor-anapa/11_b.jpg" alt="Hotel restaurant" type="interior"/>
</photos>
<photos gallery-url="http://test.ru/yakor-anapa/gallery">
<photo url="http://test.ru/yakor-anapa/drink1.jpg" alt="Cocktail in the hotel restaurant" type="food"/>
</photos>
Additional elements
feature-booleanA branch property. Can have two values: 1 (Yes) or 0 (No). If there are several properties, specify each one in a separate element.

The branch has a Wi-Fi network:

<feature-boolean name="wi_fi"   value="1"/> 
feature-enum-singleA branch property.

Theater type — Theater of the Absurd:

<feature-enum-single name="theater_type" value="absurdist_theatre"/>
feature-enum-multipleA branch property. If there are several properties, specify each one in a separate element.

Tour type — bus tour.

<feature-enum-multiple name="tour_type" value="bus_tour"/>
feature-numeric-singleA branch property with a numeric value.

The branch has three TVs:

<feature-numeric-single name="number_of_screen"  value="3"/> 
feature-numeric-multipleA branch property with a numeric value. If there are several properties, specify each one in a separate element.

The license number:

<feature-numeric-multiple name="license_number" value= "004555"/>
feature-in-units-singleA branch property whose value is defined in units.

The minimum order for delivery is 300 rubles:

<feature-in-units-single name="minimum_order"  unit="money"  unit-value="rub"  value="300"/> 
feature-in-units-multipleA branch property whose value is defined in units. If there are several properties, specify each one in a separate element.

The hotel has 200 single rooms:

<feature-in-units-multiple name="ats_by_type"  unit="apartment_type"  unit-value="single" value="200"/>
feature-range-singleA branch property that has a range value.

The branch has an events hall for 15-20 seats:

<feature-range-single name="number_seats_banquet_hall" from="15"  to="20"/> 
feature-range-multipleA branch property that has a range value. If there are several properties, specify each one in a separate element.

The ticket price is from 100 to 150 rubles:

<feature-range-multiple name="tickets"  unit="money" unit-value="rub" from="100" to="150"/>
feature-range-in-units-singleA branch property that has a range value in units.

The price for one minute is 7-10 rubles:

<feature-range-in-units-single name="price_1_min"  unit="money" unit-value="rub" from="7" to="10"/> 
feature-range-in-units-multipleA branch property that has a range value in units. If there are several properties, specify each one in a separate element.

The price for a women's haircut with styling is from 1000 to 3000 rubles.

<feature-range-in-units-multiple name="women_haircut" unit="money" unit-value="rub" from="1000" to="3000"/> 
feature-text-singleA branch property in text format.

The free Wi-Fi login in the Anchor hotel is “ssid”

<feature-text-single value="Yakor_free_wi-fi" name="ssid"/>

File verification

On the XSD validator page of the Yandex.Webmaster service, you can check the file you prepared.

Choose the Справочник (Yandex Business Directory) document validation scheme, then choose the XML data source for validation (file, link or text).

After verification, send the file link to enable daily data updates.