MrBilit
v0.5.2Unofficial read-only MrBilit: Iranian flights, trains, buses, taxis and hotels, seats and prices.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
mb_search_buses Search buses
Intercity buses on a date: company, terminal, times, price per seat, free seats, bus type, stops, refund penalties. A city id covers all its terminals. price_toman is per seat. Top-level refund_penalties apply to every bus unless a bus lists its own (until_hours_before: step applies until then, null = up to departure). Next: mb_bus_seats with a bus_id; other days: mb_bus_price_calendar.
| Parameter | Type | Description |
|---|---|---|
date * | string | Departure date YYYY-MM-DD. |
destination * | integer | Bus city or terminal id from mb_find_place(mode='bus'), e.g. 11320000 (Tehran). |
origin * | integer | Bus city or terminal id from mb_find_place(mode='bus'), e.g. 11320000 (Tehran). |
companies | array | null | Only these company ids from `companies` of a result, e.g. [4, 16]. |
depart_after | string | null | Local time HH:MM, e.g. '18:00'. |
depart_before | string | null | Local time HH:MM, e.g. '18:00'. |
include_sold_out | boolean | Also list buses with no free seat. |
limit | integer | Max buses. |
sort | string | Order of the buses. |
vip_only | boolean | Only VIP buses. |
mb_bus_price_calendar Bus price calendar
Cheapest bus seat per day for a route; days without buses (or not on sale yet) are left out. Then mb_search_buses for the chosen day.
| Parameter | Type | Description |
|---|---|---|
destination * | integer | Bus city or terminal id from mb_find_place(mode='bus'), e.g. 11320000 (Tehran). |
origin * | integer | Bus city or terminal id from mb_find_place(mode='bus'), e.g. 11320000 (Tehran). |
days | integer | Number of days to cover. |
seats | integer | Seats needed. |
start_date | string | null | First day YYYY-MM-DD; default today. |
mb_bus_seats Bus seat map
Seat map of one bus: free seat numbers, seats sold to women and to men, and a row-by-row layout. layout: one line per row from the front; seat = number + mark (none free, w woman, m man, x not sold online); '|' aisle, '--' no seat, 'DR' driver. price_toman is null for most buses: use the search price.
| Parameter | Type | Description |
|---|---|---|
bus_id * | integer | bus_id from a fresh mb_search_buses result. |
mb_search_taxis Search intercity taxis
Private door-to-door intercity taxis (whole car, up to 3 passengers) for a date, one offer per pick-up slot. price_toman is for the whole car. Many city pairs have no taxis (e.g. Tehran-Mashhad).
| Parameter | Type | Description |
|---|---|---|
date * | string | Departure date YYYY-MM-DD. |
destination * | integer | City id from mb_find_place(mode='taxi'), e.g. 11320000 (Tehran). |
origin * | integer | City id from mb_find_place(mode='taxi'), e.g. 11320000 (Tehran). |
car_class | string | Car class. |
depart_after | string | null | Local time HH:MM, e.g. '18:00'. |
depart_before | string | null | Local time HH:MM, e.g. '18:00'. |
limit | integer | Max offers. |
mb_find_place Find place codes
Turn a city, airport, station or hotel name into the code a search takes. flight: `airports` (Iranian IATA codes; Tehran is THR; prefer to XXXALL for domestic routes) and `cities` (any country; XXXALL = all its airports). train: station ids. bus / taxi: 8-digit city ids (11320000 = Tehran, all terminals). hotel: city and hotel slugs.
| Parameter | Type | Description |
|---|---|---|
mode * | string | Which search the code is for. |
query * | string | Place name in Persian or English, or a code, e.g. 'مشهد', 'tehran' or 'IST'. |
limit | integer | Max places per list. |
mb_companies Transport companies
List airlines (IATA code), rail operators or bus companies (id) with Persian and English names. Use to name a code seen in results or to find a code for the `airlines` filter. Bus ids 276/278/280 are the taxi classes VIP/Economy/Formal.
| Parameter | Type | Description |
|---|---|---|
mode * | string | Airlines, rail operators, or bus companies. |
limit | integer | Max companies. |
query | string | null | Optional name or code filter, e.g. 'ماهان', 'IR' or 'Iran Peyma'. |
mb_notices Site notices
Notices MrBilit currently shows on its pages (disruptions, rule changes, payment options), for a service or route. Route codes build the site path the notices match (/flights/THR-MHD, /trains/tehran-mashhad, /hotel/mashhad). site_wide_active counts every active notice. Use before recommending a trip.
| Parameter | Type | Description |
|---|---|---|
destination | string | null | Flight: IATA code ('THR'); train, bus, taxi: English city slug ('tehran'); hotel destination: city slug or 'city/hotel' ('mashhad/enghelab'). |
origin | string | null | Flight: IATA code ('THR'); train, bus, taxi: English city slug ('tehran'); hotel destination: city slug or 'city/hotel' ('mashhad/enghelab'). |
service | string | Which pages; any = every active notice. |
mb_help Help center search
Search MrBilit's official rules, FAQ and help-center guides; returns the best matching passages. Use for refund, cancellation, ID and baggage rules. Rules of one fare are in mb_flight_fare_details / mb_search_trains / mb_search_buses instead.
| Parameter | Type | Description |
|---|---|---|
query * | string | Question or keywords in Persian, e.g. 'استرداد بلیط قطار' or 'رزرو خودکار'. |
full_text | boolean | Return long texts uncut instead of clipped. |
limit | integer | Max passages. |
source | string | terms = official rules, faq = general FAQ, support = help-center guides. |
mb_travel_guide Travel guide
MrBilit's guide for a route or city (summary, FAQ, article) and matching travel-magazine posts. Route guide: service + origin + destination (flight IATA codes, train/bus English slugs such as 'tehran'; hotel: destination city slug only). Magazine: query. Quoted prices can be out of date.
| Parameter | Type | Description |
|---|---|---|
destination | string | null | Flight: IATA code ('THR'); train, bus, taxi: English city slug ('tehran'); hotel destination: city slug or 'city/hotel' ('mashhad/enghelab'). |
full_text | boolean | Return long texts uncut instead of clipped. |
limit | integer | Max magazine posts. |
origin | string | null | Flight: IATA code ('THR'); train, bus, taxi: English city slug ('tehran'); hotel destination: city slug or 'city/hotel' ('mashhad/enghelab'). |
query | string | null | Magazine search, e.g. 'کیش' or 'جاهای دیدنی مشهد'. |
service | string | null | Route guide for this service; needs destination. |
mb_search_flights Search flights
Search flights for a date: every bookable flight with price, seats left, baggage and times. price_toman is one adult's fare (taxes included); total_toman the whole party. Domestic round trips come back as two lists (`outbound`, `return`); international ones as packages priced for both ways. Unpriced flights are only counted in not_on_sale. Next: mb_flight_fare_details with the flight_id; to pick the day first, mb_flight_price_calendar.
| Parameter | Type | Description |
|---|---|---|
date * | string | Gregorian date YYYY-MM-DD. |
destination * | string | IATA airport or city code from mb_find_place(mode='flight'), e.g. 'THR', 'MHD', 'ISTALL' (all Istanbul airports). |
origin * | string | IATA airport or city code from mb_find_place(mode='flight'), e.g. 'THR', 'MHD', 'ISTALL' (all Istanbul airports). |
adults | integer | Adults (12+). |
airlines | array | null | Only these airline codes, e.g. ['IR', 'W5']. |
cabin | string | Cabin class filter. |
children | integer | Children (2-11). |
depart_after | string | null | Local time HH:MM, e.g. '06:00'. |
depart_before | string | null | Local time HH:MM, e.g. '06:00'. |
direct_only | boolean | Only flights without a connection. |
infants | integer | Infants (under 2). |
limit | integer | Max flights per list. |
return_date | string | null | Return date YYYY-MM-DD; omit for one-way. |
sort | string | Order of the flights. |
mb_flight_price_calendar Flight price calendar
Cheapest one-adult fare per day for a route over a date range, in one call. Then call mb_search_flights for the chosen day. Values are cached minimums and can differ from a live search; days with no known fare are left out.
| Parameter | Type | Description |
|---|---|---|
destination * | string | IATA airport or city code from mb_find_place(mode='flight'), e.g. 'THR', 'MHD', 'ISTALL' (all Istanbul airports). |
origin * | string | IATA airport or city code from mb_find_place(mode='flight'), e.g. 'THR', 'MHD', 'ISTALL' (all Istanbul airports). |
days | integer | Number of days to cover. |
start_date | string | null | First day YYYY-MM-DD; default today. |
mb_flight_fare_details Flight fare details
Every fare of one flight with refund penalties, confirmed baggage, fare rules, notes and per-passenger prices. Re-runs the mb_search_flights search (same route, date, party). refund_penalties: penalty percent per window before departure, refund = paid x (100 - penalty_pct) / 100.
| Parameter | Type | Description |
|---|---|---|
date * | string | Gregorian date YYYY-MM-DD. |
destination * | string | IATA airport or city code from mb_find_place(mode='flight'), e.g. 'THR', 'MHD', 'ISTALL' (all Istanbul airports). |
flight_id * | string | flight_id from mb_search_flights, e.g. '21919377' or '21894997+21924108'. |
origin * | string | IATA airport or city code from mb_find_place(mode='flight'), e.g. 'THR', 'MHD', 'ISTALL' (all Istanbul airports). |
adults | integer | Adults (12+). |
children | integer | Children (2-11). |
full_text | boolean | Return long texts uncut instead of clipped. |
infants | integer | Infants (under 2). |
return_date | string | null | Return date, only for an international round-trip package. |
mb_search_hotels Search hotels
Hotels and stays with a free room in a city for the dates, with the cheapest room price for the whole stay. price_toman is the cheapest room for all nights (one room, after discount); cheapest_room_sleeps is how many that room sleeps (often 1). Guest count does not change prices: pick a fitting room with mb_hotel_rooms(guests=...). Next: mb_hotel, mb_hotel_rooms, mb_hotel_calendar.
| Parameter | Type | Description |
|---|---|---|
check_in * | string | Check-in date YYYY-MM-DD. |
check_out * | string | Check-out date YYYY-MM-DD (1 to 30 nights). |
city * | string | City slug from mb_find_place(mode='hotel'), e.g. 'mashhad' or 'kish'. |
amenities | array | null | Persian words, each matching an amenity title, e.g. ['استخر'] (pool), ['پارکینگ']. |
breakfast_only | boolean | Only stays whose cheapest room includes breakfast. |
hotel_type | string | Kind of stay. |
limit | integer | Max hotels. |
max_price_per_night_toman | integer | null | Highest price per night for one room in Toman, e.g. 3000000. |
min_stars | integer | null | Only hotels with at least this many stars, e.g. 4. |
refundable_only | boolean | Only refundable stays. |
sort | string | Order; rating is the site's default. |
mb_hotel Hotel details
One hotel: stars, guest rating (0-5) and latest reviews, location, landmarks, check-in rules, amenities, FAQ. landmarks: distance in km (drive minutes). Review text is cut at 400 characters unless full_text. `hotel` is null after a numeric id: get the 'city/hotel' ref from mb_find_place(mode='hotel'). Prices: mb_hotel_rooms, mb_hotel_calendar.
| Parameter | Type | Description |
|---|---|---|
hotel * | string | 'city_slug/hotel_slug' (e.g. 'mashhad/enghelab') or numeric id. |
full_text | boolean | Return long texts uncut instead of clipped. |
reviews | integer | How many of the latest guest reviews to include. |
mb_hotel_rooms Hotel rooms and prices
Every room of a hotel with its exact price for the dates: whole stay, per night, rooms left, meals. price_toman is the whole stay for one room after discount (independent of guest count: choose rooms whose sleeps fits). rooms_left 0 = full. Empty rooms = nothing free (try mb_hotel_calendar).
| Parameter | Type | Description |
|---|---|---|
check_in * | string | Check-in date YYYY-MM-DD. |
check_out * | string | Check-out date YYYY-MM-DD (1 to 30 nights). |
hotel * | string | Hotel as 'city_slug/hotel_slug' from mb_search_hotels, e.g. 'mashhad/enghelab'. |
guests | integer | null | Only rooms that sleep at least this many (with extra beds), e.g. 3. |
mb_hotel_calendar Hotel price calendar
Cheapest one-night room price per night from today, up to about 48 days (often fewer). Then mb_hotel_rooms for exact prices. Nights missing inside the range have no free room; nights after the last one are not loaded yet.
| Parameter | Type | Description |
|---|---|---|
hotel * | string | Hotel as 'city_slug/hotel_slug' from mb_search_hotels, e.g. 'mashhad/enghelab'. |
mb_city_hotels All hotels of a city
Every listed hotel of a city, sold out ones included, with stars, rating and address; no prices. Filters apply to one page of 90 hotels at a time, so check `pages`. Prices: mb_search_hotels or mb_hotel_calendar.
| Parameter | Type | Description |
|---|---|---|
city * | string | City slug from mb_find_place(mode='hotel'), e.g. 'mashhad' or 'kish'. |
hotel_type | string | Kind of stay. |
limit | integer | Max hotels returned from the page. |
name | string | null | Only names containing this text, e.g. 'درویشی'. |
page | integer | Page of 90 hotels (the site's ranking order). |
stars | integer | null | Only this star count, e.g. 4. |
mb_search_trains Search trains
Trains between two stations on a date with every class (wagon), its price per adult and free seats. price_toman is per adult; for children, infants or a compartment call mb_train_price with the class_id. Top-level refund_penalties apply to every class unless it lists its own. Stops: mb_train_stops. No seats: mb_train_price_calendar or mb_alternative_routes. A round trip is two calls (return leg with outbound_class_id).
| Parameter | Type | Description |
|---|---|---|
date * | string | Travel date YYYY-MM-DD (sales open about 18 days ahead). |
destination * | integer | Train station id from mb_find_place(mode='train'), e.g. 1 (Tehran). |
origin * | integer | Train station id from mb_find_place(mode='train'), e.g. 1 (Tehran). |
available_only | boolean | Hide sold-out classes and trains with no free seat. |
limit | integer | Max trains. |
outbound_class_id | integer | null | Return leg of a round trip only: the outbound class_id (limits the return to the same rail company). |
quota | string | Seat quota: general (mixed), men, women, or car transport. |
sort | string | Order of the trains. |
mb_train_price_calendar Train price calendar
Cheapest train ticket per day (one adult) for a route, only days with free seats. Then mb_search_trains for the chosen day. Sales open about 18 days ahead.
| Parameter | Type | Description |
|---|---|---|
destination * | integer | Train station id from mb_find_place(mode='train'), e.g. 1 (Tehran). |
origin * | integer | Train station id from mb_find_place(mode='train'), e.g. 1 (Tehran). |
days | integer | Number of days to cover. |
quota | string | Seat quota: general (mixed), men, women, or car transport. |
seats | integer | Seats needed. |
start_date | string | null | First day YYYY-MM-DD; default today. |
mb_train_price Train ticket price
Exact price of one train class for a party: per adult, child, infant, foreigner and empty berth, and the total. A sold-out class still returns a price: check seats_left in the search first. The breakdown does not add up exactly to the price; the price is what is paid.
| Parameter | Type | Description |
|---|---|---|
class_id * | integer | class_id from a fresh mb_search_trains result. |
adults | integer | Adults (12+). |
children | integer | Children (2-11). |
empty_seats | integer | Empty berths to buy for a whole compartment, e.g. 1 for 3 people in a 4-berth. |
foreigners | integer | Foreign passengers (priced separately). |
infants | integer | Infants (under 2). |
mb_train_stops Train stops
Every station a train stops at, in order, with the date and local time at each. Takes a class_id, never a train number. The first stop can be before your station.
| Parameter | Type | Description |
|---|---|---|
class_id * | integer | class_id from a fresh mb_search_trains result. |
mb_alternative_routes Alternative routes
Alternatives when direct trains are full or dear: trips with one change, and nearby train, bus and flight routes. with_one_change: up to 7 journeys with one change, any mix of train and bus (price per adult). nearby_*: routes near the two stations with the cheapest price where known (classes_listed is a raw count, not bookable classes); pass their ids to mb_search_trains, mb_search_buses or mb_search_flights. Seat counts here can be cached: confirm with a search.
| Parameter | Type | Description |
|---|---|---|
date * | string | Travel date YYYY-MM-DD (sales open about 18 days ahead). |
destination * | integer | Train station id from mb_find_place(mode='train'), e.g. 1 (Tehran). |
origin * | integer | Train station id from mb_find_place(mode='train'), e.g. 1 (Tehran). |