Train ticket price
mb_train_priceGet exact price for one train class using its class_id from a search: per adult, child, infant, foreigner, empty berth, and the party total.
Instructions
Exact price of one train class for a party: per adult, child, infant, foreigner and empty berth, and the total.
class_id comes from mb_search_trains (it expires with the search). A sold-out class still returns a price here, so check seats_left in the search first. breakdown is the adult fare's parts (they do not add up exactly to the price; the price is what is paid).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adults | No | Adults (12+). | |
| infants | No | Infants (under 2). | |
| children | No | Children (2-11). | |
| class_id | Yes | class_id of a train class from a fresh mb_search_trains result, e.g. 9847134. | |
| foreigners | No | Foreign passengers (priced separately). | |
| empty_seats | No | Empty berths to buy for a whole (exclusive) compartment, e.g. 1 for 3 people in a 4-berth. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||