Trip information

Use this request for getting detailed information about trips.

JSON and protobuf response formats are supported. To choose the response format, send the optional Accept header:

  • Accept: application/json is the response in JSON format. Default value.
  • Accept: application/x-protobuf is the response in protobuf format.
  1. Request syntax
  2. Response field description
  3. Response in protobuf format
  4. Example of a request for a single fare
  5. Example request for multiple fares
  6. Possible response codes

Request syntax

GET  https://taxi-routeinfo.taxi.yandex.net/taxi_info?clid=<clid>&apikey=<apikey>&rll=<lon,lat~lon,lat>&class=<class_str>&req=<req_str>

Arguments:

  • clid is the client ID. To get an ID, fill out the form on the API for price forecasting page. Required parameter.

  • apikey is the API key. To get a key, fill out the form on the API for price forecasting page. This parameter can be used instead of the YaTaxi-Api-Key header. If the YaTaxi-Api-Key header is not passed, the apikey parameter is mandatory.

    Attention. We do not recommend this method, since the token value might be saved in logs.
  • rll is the departure and destination coordinates. Required parameter. Argument format:
    {departure point longitude}, {departure point latitude}~{destination longitude}, {destination latitude}
    You can also specify just the departure or destination point in the parameter:
    {departure or destination longitude}, {departure or destination latitude}

    In this case, the response will contain a limited set of fields and will only indicate the pickup fee including the surcharge.

    To find out whether your region is supported by Yandex.Taxi or Yango, use the Region information request.

  • class is the fare rate. Optional parameter. The request may specify multiple fares. In this case, the fare names in the parameter are separated by commas. Acceptable values:
    • econom: “Economy”.
    • business: “Comfort”.
    • comfortplus: “Comfort+”.
    • minivan: “Minivan”.
    • vip: “Business”.

    The default class is econom.

    In some regions, not all of these fare classes are available. If multiple fares were given in the request, and some of them are not supported, the response will contain only information about the supported fares. If only unsupported fares were specified in the request, the response will contain code 200 and an empty string.

  • req is the client's requirements for the car. Optional parameter. The request may specify multiple requirements. In this case, the values in the parameter are separated by commas. Acceptable values:
    • yellowcarnumber for a car with yellow number plates.
    • nosmoking for a driver that does not smoke.
    • childchair for the driver to have a child seat in the car.
    • bicycle for transporting bicycles.
    • conditioner for the car to have an air conditioner.
    • animaltransport for transporting animals.
    • universal for a station wagon.
    • check for where a receipt of payment is required.
    • ski for transporting skis or snowboards.
    • waiting_in_transit for time spent idle whilst travelling.
    • meeting_arriving for meeting the rider with a sign.
    • luggage for paid transportation of baggage.
  • lang for the response language. Optional parameter. Possible values:
    • ru for Russian. Default value.
    • en for English.
    • uk for Ukrainian.
    • kk for Kazakh.
    • az for Azerbaijani.
    • ka for Georgian.
    • hy for Armenian.
    • ky for Kyrgyz.
    • lv for Latvian.
    • ro for Romanian.
    • uz for Uzbek.
    • et for Estonian.

Response field description

Responses may contain the following fields:

Field Description Format
currency Payment currency. May contain the following values:
  • RUB for Russian ruble.
  • KZT for Kazakhstani tenge.
  • AMD for Armenian dram.
  • GEL for Georgian lari.
  • AZN for Azerbaijani manat.
  • UAH for Ukrainian hryvnia.
  • BYN for new Belarusian ruble.
  • BYR for old Belarusian ruble.
  • KGS for Kyrgyzstani som.
  • EUR for euro.
  • MDL for Moldovan leu.
  • UZS for Uzbek so'm.

The list of supported currencies can be expanded later.

String.
distance The approximate distance of the trip, in meters.
Note. This parameter is only available when the start and end points of the route were specified in the request.
Floating-point number.
options List of trip options. May contain the following fields: Array.
class_name Name of the fare class in English. String.
class_text Name of the fare class in the requested language. String.
class_level Numeric fare ID. Number.
min_price

The pickup fee without a surcharge.

When displaying this information, you must also show a warning in accordance with the API terms of use.

Floating-point number.
price

Fare. If only the pick up point or destination was specified in the request, this parameter will contain the pickup fee with a surcharge.

When displaying this information, you must also show a warning in accordance with the API terms of use.

Floating-point number.
price_text Text description of the cost of the trip. Includes the value from the price field and currency. The currency in this field depends on the lang parameter in the query. String.
waiting_time Taxi arrival time in seconds.
Note. This parameter may be omitted if there are currently no available cars for the specified route.
Floating-point number.
time Travel time in seconds.
Note. This parameter is only available when the start and end points of the route were specified in the request.
Floating-point number.

Response in protobuf format

If the request was sent with the Accept: application/x-protobuf header, the response will be the TaxiInfo message.

To decode the protobuf response, use the following protocol description:

message TaxiOption
{
  required double price = 1;
  required double min_price = 2;
  optional double waiting_time = 3;
  required string class_name = 4;
  required string class_text = 5;
  required int32 class_level = 6;
  required string price_text = 7;
}

message TaxiInfo
{
  repeated TaxiOption options = 1;
  required string currency = 2;
  optional double distance = 3;
  optional double time = 4;
}

The names of all the fields in the protobuf response will be the same as the response in json format.

Example of a request for a single fare

GET https://taxi-routeinfo.taxi.yandex.net/taxi_info?rll=37.589569560,55.733780~37,56&clid=t...3&apikey=q...3

The response to this request is as follows:

{
  "currency": "RUB",
  "distance": 61529.771101536542,
  "options": [
    {
      "class_level": 50,
      "class_name": "econom",
      "class_text": "Economy",
      "min_price": 495,
      "price": 10945,
      "price_text": "10945 rub.",
      "waiting_time": 203.98798614740372
    }
  ],
  "time": 3816.9397069215775
}

Example request for multiple fares

Fare classes “Economy” and “Business” are specified in the request, but the destination is not specified:

GET https://taxi-routeinfo.taxi.yandex.net/taxi_info?rll=37.589569560,55.733780&clid=t...3&apikey=q...3&class=econom,vip&req=check,yellowcarnumber

The response to this request is as follows:

{
  "currency": "RUB",
  "options": [
    {
      "class_level": 50,
      "class_name": "econom",
      "class_text": "Economy",
      "min_price": 99,
      "price": 239,
      "price_text": "from 239 rub.",
      "waiting_time": 203.98798614740372
    },
    {
      "class_level": 90,
      "class_name": "vip",
      "class_text": "Business",
      "min_price": 299,
      "price": 299,
      "price_text": "from 299 rub.",
      "waiting_time": 708.15764345228672
    }
  ],
  "time": 3816.9397069215775
}

Possible response codes

The response to this request may contain the following response codes:

  • 200: request completed successfully.
  • 204: requested region is not supported by the service.
  • 400: request parameters were omitted or incorrect.
  • 403: authorization error. Invalid API key or client ID values.
  • 500: internal server error.

In case of code errors 400 and 403, the body of the response will contain a message about the error.