Bama Cars
v0.2.1Read-only Bama (bama.ir) Iran car marketplace: ad search, ad details, market prices, new-car prices.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ba_search Search car ads
Search used and new car ads on Bama (bama.ir) with filters; up to 30 compact ads per page. Get vehicle values from ba_vehicles and other values from ba_filters. Prices Toman, mileage_km 0 = zero-km. Then ba_ad for one code, ba_market_stats for statistics. No total count: page while has_more is true. Motorcycles and trucks: ba_search_bikes_trucks.
| Parameter | Type | Description |
|---|---|---|
body | array | null | ba_filters kind=body values, e.g. ['suv']. |
body_status | array | null | ba_filters kind=body_status values (paint condition). |
color | array | null | ba_filters kind=color values, e.g. ['white']. |
country | array | null | ba_filters kind=country values. |
cylinder | array | null | ba_filters kind=cylinder values. |
description_chars | integer | Characters of each ad's text to include (0 = none). |
drive | array | null | ba_filters kind=drive values. |
fuel | array | null | ba_filters kind=fuel values. |
installment | boolean | Only installment ads. |
lifestyle | array | null | ba_filters kind=lifestyle values. |
mileage_from | integer | null | Minimum km. |
mileage_to | integer | null | Maximum km (0 = zero-km only). |
origin | array | null | ba_filters kind=origin values. |
page | integer | 0-based page (30 ads). |
presale | boolean | Only presale (حواله) ads. |
price_from | integer | null | Minimum price in Toman. |
price_to | integer | null | Maximum price in Toman. |
region | array | null | ba_filters kind=region values, e.g. ['tehran'], ['isfahan,kashan']. |
seller | string | null | |
sort | string | |
transmission | string | null | |
vehicle | array | null | Values from ba_vehicles: brand, brand,model or brand,model,trim, e.g. ['samand,lx']. Several = any. |
with_photo | boolean | Only ads with photos. |
with_price | boolean | Only ads with a stated price. |
year_from | integer | null | Earliest year, Jalali. |
year_to | integer | null | Latest year, Jalali. |
ba_ad Ad details
Get one Bama ad (car, motorcycle or truck) in full: price, specs, condition, seller, description and photos. Use after ba_search or ba_search_bikes_trucks. ads_of_same_model / ads_of_same_trim are the real live ad counts; similar_total counts Bama's wider pool. Phone numbers are not available.
| Parameter | Type | Description |
|---|---|---|
code * | string | Ad code from ba_search, e.g. 4avpuyq7. |
kind | string | Section; auto tries car, motorcycle, truck. |
similar | integer | Also list this many similar car ads (cars only). |
ba_market_stats Used-car market price stats
Price statistics (min, quartiles, median, max, per year) for a car model from live Bama ads. Samples the newest matching ads with a fixed price (no negotiable, installment or presale), Toman. Asking prices, not sale prices. Narrow with year, mileage, region; ba_search sort=cheapest shows the ads.
| Parameter | Type | Description |
|---|---|---|
mileage_from | integer | null | Minimum km. |
mileage_to | integer | null | Maximum km (0 = zero-km only). |
pages | integer | Pages to sample (30 ads each); more is slower. |
region | array | null | ba_filters kind=region values. |
seller | string | null | |
transmission | string | null | |
vehicle | array | null | Values from ba_vehicles: brand, brand,model or brand,model,trim, e.g. ['samand,lx']. Several = any. |
year_from | integer | null | Earliest year, Jalali. |
year_to | integer | null | Latest year, Jalali. |
ba_dealers Dealers selling a model
List car dealers (showrooms) with ads for a model or city on Bama, with address, rating and how many ads match. Scans the first pages of dealer-only ads. Then ba_dealer_ads for one showroom or ba_search seller=dealer.
| Parameter | Type | Description |
|---|---|---|
pages | integer | Pages to scan (30 ads each). |
region | array | null | ba_filters kind=region values. |
vehicle | array | null | Values from ba_vehicles: brand, brand,model or brand,model,trim, e.g. ['samand,lx']. Several = any. |
ba_vehicles Brands, models and trims
Look up the brand, model and trim values that ba_search, ba_market_stats and ba_new_prices take. query finds matches (up to 25); brand lists its models and trims; neither lists all brands. Values look like 'samand', 'samand,lx', 'peugeot,206ir,type2'. vehicle_type motorcycle/truck feeds ba_search_bikes_trucks.
| Parameter | Type | Description |
|---|---|---|
brand | string | null | Brand value, e.g. 'peugeot': lists its models and trims. |
query | string | null | Brand/model/trim name, Persian or English, e.g. 'پژو 206'. |
vehicle_type | string | Section. |
ba_filters Filter values
List the allowed values of one ba_search filter (states and cities, body types, fuels, colors, years...). E.g. kind=region query=اصفهان gives 'isfahan'; region lists states only unless query is given. Trucks: vehicle_type=truck kind=usage; motorcycles: kind=body, fuel or color. Not every kind exists for every section.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
query | string | null | Region/usage only: part of a name (Persian or English). |
vehicle_type | string | Section (usage is for trucks). |
ba_new_prices New-car prices
Current price of every new-car trim of a brand or model on Bama's price list (market price or factory price). Each row is one trim and year: Toman price, provider (قیمت بازار market, قیمت کارخانه factory, قیمت نمایندگی dealer), daily change percent and a 30-quote trend. Brand-wide queries can be long; pass model and trim for one. See also ba_price_list (all brands), ba_market_stats (used), ba_car_specs.
| Parameter | Type | Description |
|---|---|---|
brand * | string | Brand value from ba_vehicles, e.g. 'samand'. |
history_days | integer | Recent price points per trim (0 = none). |
model | string | null | Model value, e.g. 'soren'. Omit for the whole brand. |
trim | string | null | trim_key from a result, e.g. 'pluscng'; needs model. |
ba_search_bikes_trucks Search motorcycle and truck ads
Search motorcycle or truck (heavy vehicle, bus, machinery) ads on Bama with filters. Get values from ba_vehicles / ba_filters with the same vehicle_type. Prices Toman. Then ba_ad with a code. No total count: page while has_more is true. Cars: ba_search.
| Parameter | Type | Description |
|---|---|---|
kind * | string | Which section of Bama to search. |
body | array | null | Motorcycles: ba_filters kind=body values, e.g. ['scooter']. |
body_status | array | null | Trucks: ba_filters kind=body_status values. |
color | array | null | ba_filters kind=color values (vehicle_type=kind). |
description_chars | integer | Characters of each ad's text to include (0 = none). |
fuel | array | null | Motorcycles: ['gasoline'] or ['electric']. |
installment | boolean | Only installment ads. |
mileage_from | integer | null | Minimum km. |
mileage_to | integer | null | Maximum km (0 = zero-km only). |
page | integer | 0-based page (page 0 ~10 ads, later 30). |
price_from | integer | null | Minimum price in Toman. |
price_to | integer | null | Maximum price in Toman. |
region | array | null | ba_filters kind=region values, e.g. ['tehran']. |
seller | string | null | |
sort | string | |
transmission | string | null | |
usage | array | null | Trucks: ba_filters kind=usage values, e.g. ['tractor']. |
vehicle | array | null | ba_vehicles values (same vehicle_type), e.g. ['honda']. |
with_photo | boolean | Only ads with photos. |
with_price | boolean | Only ads with a stated price. |
year_from | integer | null | Earliest year, Jalali. |
year_to | integer | null | Latest year, Jalali. |
ba_dealer_ads Dealer inventory
List the ads of one dealer (showroom) on Bama: the dealer's whole inventory, up to the first 100 ads. Use after ba_dealers. Filters and sorting run on the fetched list. Returns address, location and compact ads.
| Parameter | Type | Description |
|---|---|---|
dealer_id * | integer | Id from ba_dealers or an ad's seller.id. |
limit | integer | Most ads to return. |
price_to | integer | null | Maximum price in Toman. |
query | string | null | Only ads whose title/trim contains this text. |
sort | string | |
year_from | integer | null | Earliest year, Jalali. |
year_to | integer | null | Latest year, Jalali. |
ba_price_list New-car price list
Search Bama's daily price list of new cars (or motorcycles) across all brands and rank it. Each row is one trim, year and price type: Toman price and change since the last quote. Use sort for "cheapest" or "biggest_rise". One model's history: ba_new_prices; specs: ba_car_specs.
| Parameter | Type | Description |
|---|---|---|
imported | boolean | null | True = imported/assembled; False = domestic. |
limit | integer | Most rows to return. |
price_type | string | null | Only this price provider. |
search | string | null | Brand/model/trim words, English or Persian, e.g. 'tiggo'. |
sort | string | |
vehicle_type | string |
ba_market_pulse Car market pulse
Today's car market mood from Bama (score, trend and a short analysis per market) plus the biggest price movers. The analysis is Bama's Persian text. Movers are new cars with the largest price change; follow up with ba_new_prices or ba_price_list.
| Parameter | Type | Description |
|---|---|---|
movers | integer | Number of biggest price movers to list. |
ba_car_specs Car and motorcycle specs and review
Technical specifications and the editorial review score of a car or motorcycle model from Bama's research pages. Without model it lists the brand's models. Returns power, torque, dimensions, rating, pros/cons, trims and generations. ba_ad shows what is for sale, ba_new_prices the new price.
| Parameter | Type | Description |
|---|---|---|
brand * | string | Brand value from ba_vehicles, e.g. 'samand'. |
description_chars | integer | Characters of the review text to include (0 = none). |
full_equipment | boolean | Also return equipment sections. |
model | string | null | Model value, e.g. 'soren'. Omit to list models. |
trim | string | null | Trim key from a result's trims, e.g. 'pluscng'. |
vehicle_type | string |