Using widgets

Yandex.Taxi widgets make it easier for your site's users to call a taxi to an address you can specify. Widgets contain a button that when clicked opens the Yandex.Taxi site, displaying car order confirmation.

Note. Predefined widgets support only the Yandex.Taxi design. Use the widget with custom layout for Yango.

You can configure the pick up address, destination, appearance, and more for the widget. These parameters are described in the Widget settings section.

Widget appearance options and sample HTML code are provided in the section Examples of widgets section.

Attention.
Resource yastatic.net/taxi-widget/ya-taxi-widget-v2.js returns the widget code using utf-8. If your site uses a different encoding, add the charset= "UTF-8" parameter to the widget code:
<script src="//yastatic.net/taxi-widget/ya-taxi-widget.js" charset="UTF-8"></script>

If you have any questions about using Yandex.Taxi widgets, write to us at taxi-api-support@yandex-team.ru or use the feedback form.

Working with the Yandex.Taxi API means accepting the terms of use.

Installing a widget

To add the Yandex.Taxi widget to your site:

  1. Add the DIV element to the body of your site page with the widget parameters, for example:
    <div class="ya-taxi-widget"
        data-size="s"
        data-theme="normal"
        data-title="Order a taxi"
        data-point-b="37.58814349999998,55.73384256900978"
        data-use-location="true"
        …
    >
    </div>
  2. On the same page, add the widget script:
    <script src="//yastatic.net/taxi-widget/ya-taxi-widget.js"></script>