Divar

v0.3.2
io.github.sepehr071/divar-mcp Checked 8 hours ago Published 13 days ago

Unofficial read-only Divar: search Iran's classified ads, cheapest and best-value ads, price checks.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

dv_categories Browse categories

The Divar category tree (236 nodes, up to 4 levels): slug, Persian name, path and whether it is a leaf. Gives the `category` slug for the search tools (`light` = cars and vans). Next: dv_filters.

ParameterTypeDescription
limitinteger
parentstringList the children of this slug, e.g. 'vehicles'. Omit for the 10 top-level categories.
querystringPart of a category name or slug, Persian or Latin: 'موبایل', 'apartment'.

dv_filters Category filters

Every filter a category supports: key, type, Persian label, unit and the allowed options. Pass keys in dv_search `filters`: number_range {'size': {'min': 80}}, repeated_string {'rooms': ['دو']}, str 'automatic', boolean true. `lazy` options: dv_filter_options.

ParameterTypeDescription
category *
citystring

dv_filter_options Filter options

Allowed values of a filter: brand and model keys (161 car brands), districts, or any option list. `query` turns 'پراید' into the key 'Pride 111'; without it: all brands, or the models of one `brand`. Pass the keys to dv_search as `brand_model` / `filters`.

ParameterTypeDescription
category *
brandstringbrand_model: a brand key, e.g. 'Peugeot', to list its models.
citystring
filterstringFilter key from dv_filters, usually 'brand_model' or 'districts'.
limitinteger
querystringText to look up in the filter, e.g. 'سمند'.

dv_suggest Search suggestions

What Divar's search box would suggest for some text, and which categories the text belongs to. Use to find `category` and `query` from a product name. Next: dv_search.

ParameterTypeDescription
query *stringText as typed in the Divar search box, e.g. 'پراید', 'پژو'.
citystring

dv_parse_query Question to search

Turn a plain Persian request into dv_search arguments: city, neighbourhoods, price bounds, category and leftover words. Rule-based. Pass `search` to dv_search as it is; `notes` say what was assumed. Rooms, year and mileage are not extracted.

ParameterTypeDescription
text *stringA search as a person would write it, e.g. 'آپارتمان اجاره ونک زیر ۸ میلیارد' or 'پراید کرج تا ۲۰۰ میلیون'.

dv_post Ad details

Everything public about one ad: price in Toman, specs, features, description, images, map position, seller type. `specs` are the ad's Persian spec rows. No phone number (login only): contact the seller via `url`. Next: dv_similar, dv_appraise, dv_seller, dv_compare.

ParameterTypeDescription
token *stringAd token, e.g. 'gaRPIP2m'.
full_textbooleanDo not cut the description (default cuts at 1500 characters).
max_imagesintegerFull-size image URLs to return.

dv_posts Several ads

Details of up to 10 ads in one call (compact: specs and one image, description cut at 300 characters). A removed ad shows an `error` instead of failing the call.

ParameterTypeDescription
tokens *arrayAd tokens.

dv_compare Compare ads

Side by side: the price of each ad and only the specs that differ (the identical ones are listed once). Gives `cheapest` and `cheapest_saves_pct` (per m2 when every ad has an area). For ads of one kind.

ParameterTypeDescription
tokens *arrayAd tokens.

dv_seller Seller and their ads

The seller behind an ad: how many personal and business ads they have, the business card (name, brand_token) and their ads. A personal seller has no business card and Divar no longer lists their other ads. Next: dv_dealer with the brand_token.

ParameterTypeDescription
token *stringAd token, e.g. 'gaRPIP2m'.
limitinteger

dv_dealer Dealer page

A business account's public page: name, active ad count, member since and its first 11 ads. No paging: for more, search with the dealer's name.

ParameterTypeDescription
brand_token *stringDealer id from dv_seller, e.g. 'ZbeypyTr'.

dv_similar Similar ads

Ads similar to one ad: same brand/model (or category) and neighbourhood, widening step by step until enough are found. `basis` names the levels searched, narrowest first. Property far off in price or area is counted in `excluded_outliers`. Next: dv_compare, dv_appraise.

ParameterTypeDescription
token *stringAd token, e.g. 'gaRPIP2m'.
limitinteger
pagesintegerPages scanned per breadcrumb level.

dv_market Market price statistics

Asking-price statistics of a search: min, p10, p25, median, p75, p90, max, mean; split by district and by day. A sample of the newest `pages` pages. Use a narrow query (one model, one area). Next: dv_cheapest, dv_appraise.

ParameterTypeDescription
brand_modelarray
categorystring
citystring
districtsarray
excludearray
filtersobject
has_photoboolean
keywordsarray
max_age_hoursnumber
max_depositintegerRent deposit (ودیعه), Toman.
max_priceintegerToman; monthly rent in rent categories.
min_depositintegerRent deposit (ودیعه), Toman.
min_priceintegerToman; monthly rent in rent categories.
pagesinteger
querystring
recentstring

dv_appraise Is this price fair

Is an ad's price (or a price you have in mind) high or low compared with similar ads? Percentile, verdict, confidence. Give `token`, or `price` with search arguments. Ignores year, mileage and condition: refine with `filters`.

ParameterTypeDescription
brand_modelarray
categorystring
citystring
districtsarray
filtersobject
pagesintegerPages per comparison level.
priceintegerWithout a token: Toman price to check (monthly rent in rent categories).
querystring
tokenstringAd to appraise; omit to appraise `price`.

dv_status Server status

Is Divar reachable and how fast: version, a live latency check, caches and local watch state. Call when other tools fail: tells a blocked network from a bad argument.

dv_count Count matching ads

How many active ads match a search, in one cheap call (capped: 10,000 means '10,000 or more'). Use to size a market or to test whether filters are too narrow before fetching ads.

ParameterTypeDescription
brand_modelarray
categorystring
citystring
districtsarray
filtersobject
has_photoboolean
max_depositintegerRent deposit (ودیعه), Toman.
max_priceintegerToman; monthly rent in rent categories.
min_depositintegerRent deposit (ودیعه), Toman.
min_priceintegerToman; monthly rent in rent categories.
querystring
recentstring

dv_cheapest Find cheapest ads

The cheapest ads of a search, cheapest first. Skips negotiable ads, placeholder or absurd prices and far-below-median outliers. Divar cannot sort by price: this ranks the newest `pages` pages (raise it for a wider scan). Rent categories rank by monthly rent. Next: dv_post, dv_compare.

ParameterTypeDescription
brand_modelarray
categorystring
citystring
districtsarray
excludearray
filtersobject
has_photoboolean
include_outliersbooleanAlso list ads under 10% of the median (usually deposits, parts or bait).
keywordsarray
limitinteger
max_age_hoursnumber
max_priceintegerToman; monthly rent in rent categories.
min_priceintegerToman; monthly rent in rent categories.
min_realistic_priceintegerDrop ads priced below this (Toman).
pagesinteger
querystring
recentstring

dv_best_for_budget Best ads for a budget

Within a budget: the best-value ads (furthest below their peers' median) and the ads closest to the budget. `best_value` ads carry `deal_score` (0-100) and `reasons`; bait titles and implausible prices are skipped. Property for sale ranks per m2. A `closest_to_budget` ad already in `best_value` shows only token and price. Use a narrow query. Next: dv_appraise, dv_post.

ParameterTypeDescription
budget *integerMax price in Toman (rent categories: monthly rent).
brand_modelarray
categorystring
citystring
districtsarray
excludearray
filtersobject
has_photoboolean
keywordsarray
limitintegerAds per list.
max_age_hoursnumber
min_priceintegerToman; monthly rent in rent categories.
pagesinteger
querystring
recentstring

dv_find_deals Find deals

Ads priced well below the median of the same search, without a budget: scored deals, with bait and junk prices removed. Keeps ads `min_discount_pct` to 70% below the median (per m2 for property for sale); drops suspect prices and bait, co-op, notice or parking titles. Use a narrow query. Next: dv_post, dv_appraise.

ParameterTypeDescription
brand_modelarray
categorystring
citystring
districtsarray
excludearray
filtersobject
has_photoboolean
keywordsarray
limitintegerMax deals.
max_age_hoursnumber
max_priceintegerToman; monthly rent in rent categories.
min_discount_pctintegerMinimum percent below the median.
min_priceintegerToman; monthly rent in rent categories.
pagesinteger
querystring
recentstring

dv_new_since New ads since a time

Ads published after a moment, newest first: poll this to watch a search (a new flat, a cheap car) without repeats. Pass the previous call's `latest` as `since`. `more` true: the page limit cut off more new ads.

ParameterTypeDescription
brand_modelarray
categorystring
citystring
districtsarray
excludearray
filtersobject
has_photoboolean
hoursnumberWithout `since`: ads from the last N hours.
keywordsarray
limitinteger
max_depositintegerRent deposit (ودیعه), Toman.
max_priceintegerToman; monthly rent in rent categories.
min_depositintegerRent deposit (ودیعه), Toman.
min_priceintegerToman; monthly rent in rent categories.
pagesinteger
querystring
sincestringUTC time like 2026-10-16T01:50:00Z (the previous `latest`); omit to use `hours`.

dv_export Export ads

The ads of a search as CSV or JSON lines text, ready to save to a spreadsheet or analyse. Columns: token, title, price, deposit, rent, district, posted (UTC), photos, seller, info, url. Text in `data`.

ParameterTypeDescription
brand_modelarray
categorystring
citystring
districtsarray
excludearray
filtersobject
formatstring'csv' or 'jsonl' (one JSON ad per line).
has_photoboolean
keywordsarray
limitintegerMax rows.
max_age_hoursnumber
max_depositintegerRent deposit (ودیعه), Toman.
max_priceintegerToman; monthly rent in rent categories.
min_depositintegerRent deposit (ودیعه), Toman.
min_priceintegerToman; monthly rent in rent categories.
pagesinteger
querystring
recentstring

dv_nearby Ads near a point

Ads on the map around a GPS point, nearest first, with coordinates, distance, price chips and a thumbnail. `total_in_area` is the true count (up to 200 available). Prices are the site's rounded map chips; sale homes add `price_per_m2`. Next: dv_post.

ParameterTypeDescription
category *stringRequired (the map is empty without one); as in dv_search, e.g. 'apartment-sell'.
lat *numberLatitude, e.g. 35.7 (from dv_place_search or dv_districts).
lon *numberLongitude, e.g. 51.4.
brand_modelarray
filtersobject
limitinteger
max_depositintegerRent deposit (ودیعه), Toman.
max_priceintegerToman; monthly rent in rent categories.
min_depositintegerRent deposit (ودیعه), Toman.
min_priceintegerToman; monthly rent in rent categories.
querystring
radius_mintegerMetres.

dv_cities Find cities

City ids for a name (1,177 cities; Tehran is 1, Mashhad 3). Returns id, name, URL slug, province id and centre. Other tools also take the city name directly. Next: dv_districts, dv_search.

ParameterTypeDescription
limitinteger
querystringName or slug, e.g. 'مشهد', 'kar'. Omit for the 7 biggest cities.

dv_districts City neighbourhoods

Neighbourhoods (محله) of one city with ids, centre point and the main streets inside (Tehran has about 450). Search tools also take district names directly. Next: dv_neighbours, dv_nearby.

ParameterTypeDescription
citystring
limitinteger
querystringPart of a neighbourhood name, e.g. 'ونک'.

dv_neighbours Adjacent neighbourhoods

Neighbourhoods adjacent to a district, to widen a neighbourhood search to the surrounding area. `districts` is Divar's own (often short) list; `nearest` adds up to 6 districts within 3 km. Pass them as `districts` to dv_search.

ParameterTypeDescription
district_id *integerDistrict id from dv_districts, e.g. 655.
citystring

dv_locate Locate a GPS point

The city, neighbourhood and street address of a GPS point. Next: dv_nearby.

ParameterTypeDescription
lat *numberLatitude inside Iran, e.g. 35.7.
lon *numberLongitude inside Iran, e.g. 51.4.

dv_place_mapping Map old place ids

Convert old Divar place ids to the current ones (Divar merged and renumbered places). Use when an old id returns nothing. `unverified` ids are neither renumbered nor cities.

ParameterTypeDescription
ids *arrayOld district/city ids saved from earlier Divar data.

dv_boundary City boundary

Neighbourhood borders of a city from Divar's GeoJSON: the city's bounding box, or one neighbourhood's polygon. Without `district`: the city box and its neighbourhoods. With it: a thinned GeoJSON Feature ([lon, lat]).

ParameterTypeDescription
citystring
districtstringNeighbourhood name or id for its polygon, e.g. 'ونک'.
limitintegerMax neighbourhoods in the overview.
max_pointsintegerMax vertices per ring.

dv_watch Saved watches

Save a search and later get only the ads that appeared since the last check; stored in a local file, nothing is pushed. Nothing runs by itself: call `check` on a schedule or when asked. File: `~/.divar-mcp/state.json` (DIVAR_MCP_STATE).

ParameterTypeDescription
action *string'create' saves a search, 'check' returns ads newer than the last check, 'list', 'delete'.
brand_modelarray
categorystring
citystring
districtsarray
excludearray
filtersobject
keywordsarray
limitintegercheck: max ads per watch.
max_priceintegerToman; monthly rent in rent categories.
min_priceintegerToman; monthly rent in rent categories.
namestringcreate: a label.
querystring
watch_idstringcheck / delete: id from 'create' or 'list'; check without it checks all.

dv_price_trend Price trend

The median asking price of a search over the days you have checked it: records one point per day in a local file. Divar keeps no history: the trend starts with your first call. Returns the last 90 points with `change_pct`. Use a narrow query.

ParameterTypeDescription
brand_modelarray
categorystring
citystring
districtsarray
filtersobject
pagesinteger
querystring
recordbooleanStore today's point.