Divar
v0.3.2Unofficial 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.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
parent | string | List the children of this slug, e.g. 'vehicles'. Omit for the 10 top-level categories. |
query | string | Part 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.
| Parameter | Type | Description |
|---|---|---|
category * | ||
city | string |
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`.
| Parameter | Type | Description |
|---|---|---|
category * | ||
brand | string | brand_model: a brand key, e.g. 'Peugeot', to list its models. |
city | string | |
filter | string | Filter key from dv_filters, usually 'brand_model' or 'districts'. |
limit | integer | |
query | string | Text 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.
| Parameter | Type | Description |
|---|---|---|
query * | string | Text as typed in the Divar search box, e.g. 'پراید', 'پژو'. |
city | string |
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.
| Parameter | Type | Description |
|---|---|---|
text * | string | A 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.
| Parameter | Type | Description |
|---|---|---|
token * | string | Ad token, e.g. 'gaRPIP2m'. |
full_text | boolean | Do not cut the description (default cuts at 1500 characters). |
max_images | integer | Full-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.
| Parameter | Type | Description |
|---|---|---|
tokens * | array | Ad 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.
| Parameter | Type | Description |
|---|---|---|
tokens * | array | Ad 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.
| Parameter | Type | Description |
|---|---|---|
token * | string | Ad token, e.g. 'gaRPIP2m'. |
limit | integer |
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.
| Parameter | Type | Description |
|---|---|---|
brand_token * | string | Dealer 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.
| Parameter | Type | Description |
|---|---|---|
token * | string | Ad token, e.g. 'gaRPIP2m'. |
limit | integer | |
pages | integer | Pages 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.
| Parameter | Type | Description |
|---|---|---|
brand_model | array | |
category | string | |
city | string | |
districts | array | |
exclude | array | |
filters | object | |
has_photo | boolean | |
keywords | array | |
max_age_hours | number | |
max_deposit | integer | Rent deposit (ودیعه), Toman. |
max_price | integer | Toman; monthly rent in rent categories. |
min_deposit | integer | Rent deposit (ودیعه), Toman. |
min_price | integer | Toman; monthly rent in rent categories. |
pages | integer | |
query | string | |
recent | string |
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`.
| Parameter | Type | Description |
|---|---|---|
brand_model | array | |
category | string | |
city | string | |
districts | array | |
filters | object | |
pages | integer | Pages per comparison level. |
price | integer | Without a token: Toman price to check (monthly rent in rent categories). |
query | string | |
token | string | Ad 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_search Search ads
Search Divar ads in one or more cities by category, text and filters; compact cards, prices in Toman. Filters the category lacks come back in `ignored`. Next: dv_post, dv_compare, dv_cheapest, dv_market.
| Parameter | Type | Description |
|---|---|---|
brand_model | array | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
category | string | Category slug or Persian name, e.g. 'light' (cars), 'apartment-rent', 'mobile-phones'. |
city | string | City name or id; several comma-separated, e.g. 'تهران,کرج'. |
cursor | string | `next_cursor` of the previous call, for older ads. |
districts | array | Neighbourhood names or ids, e.g. ['ونک']. |
exclude | array | Drop ads whose title has any of these words. |
filters | object | Category filters (keys from dv_filters), e.g. {'size': {'min': 80, 'max': 120}, 'parking': true}. Unknown keys are returned in `ignored`. |
has_photo | boolean | Only ads with photos. |
keywords | array | Words that must all be in the title. |
limit | integer | Max ads in the answer. |
max_age_hours | number | Only ads bumped within this many hours. |
max_deposit | integer | Rent deposit (ودیعه), Toman. |
max_price | integer | Toman; monthly rent in rent categories. |
min_deposit | integer | Rent deposit (ودیعه), Toman. |
min_price | integer | Toman; monthly rent in rent categories. |
pages | integer | Result pages to merge, about 25 ads each. |
query | string | Free text in title or description, e.g. 'پراید 111'. |
recent | string | Published within '3h', '12h', '1d', '3d' or '7d'. |
sort | string | 'newest' is Divar's order (pages by cursor); 'cheapest' / 'expensive' sort only the ads fetched in this call. |
thumbnails | boolean | Include each ad's thumbnail URL in `image` (about 40 tokens per ad). |
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.
| Parameter | Type | Description |
|---|---|---|
brand_model | array | |
category | string | |
city | string | |
districts | array | |
filters | object | |
has_photo | boolean | |
max_deposit | integer | Rent deposit (ودیعه), Toman. |
max_price | integer | Toman; monthly rent in rent categories. |
min_deposit | integer | Rent deposit (ودیعه), Toman. |
min_price | integer | Toman; monthly rent in rent categories. |
query | string | |
recent | string |
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.
| Parameter | Type | Description |
|---|---|---|
brand_model | array | |
category | string | |
city | string | |
districts | array | |
exclude | array | |
filters | object | |
has_photo | boolean | |
include_outliers | boolean | Also list ads under 10% of the median (usually deposits, parts or bait). |
keywords | array | |
limit | integer | |
max_age_hours | number | |
max_price | integer | Toman; monthly rent in rent categories. |
min_price | integer | Toman; monthly rent in rent categories. |
min_realistic_price | integer | Drop ads priced below this (Toman). |
pages | integer | |
query | string | |
recent | string |
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.
| Parameter | Type | Description |
|---|---|---|
budget * | integer | Max price in Toman (rent categories: monthly rent). |
brand_model | array | |
category | string | |
city | string | |
districts | array | |
exclude | array | |
filters | object | |
has_photo | boolean | |
keywords | array | |
limit | integer | Ads per list. |
max_age_hours | number | |
min_price | integer | Toman; monthly rent in rent categories. |
pages | integer | |
query | string | |
recent | string |
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.
| Parameter | Type | Description |
|---|---|---|
brand_model | array | |
category | string | |
city | string | |
districts | array | |
exclude | array | |
filters | object | |
has_photo | boolean | |
keywords | array | |
limit | integer | Max deals. |
max_age_hours | number | |
max_price | integer | Toman; monthly rent in rent categories. |
min_discount_pct | integer | Minimum percent below the median. |
min_price | integer | Toman; monthly rent in rent categories. |
pages | integer | |
query | string | |
recent | string |
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.
| Parameter | Type | Description |
|---|---|---|
brand_model | array | |
category | string | |
city | string | |
districts | array | |
exclude | array | |
filters | object | |
has_photo | boolean | |
hours | number | Without `since`: ads from the last N hours. |
keywords | array | |
limit | integer | |
max_deposit | integer | Rent deposit (ودیعه), Toman. |
max_price | integer | Toman; monthly rent in rent categories. |
min_deposit | integer | Rent deposit (ودیعه), Toman. |
min_price | integer | Toman; monthly rent in rent categories. |
pages | integer | |
query | string | |
since | string | UTC 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`.
| Parameter | Type | Description |
|---|---|---|
brand_model | array | |
category | string | |
city | string | |
districts | array | |
exclude | array | |
filters | object | |
format | string | 'csv' or 'jsonl' (one JSON ad per line). |
has_photo | boolean | |
keywords | array | |
limit | integer | Max rows. |
max_age_hours | number | |
max_deposit | integer | Rent deposit (ودیعه), Toman. |
max_price | integer | Toman; monthly rent in rent categories. |
min_deposit | integer | Rent deposit (ودیعه), Toman. |
min_price | integer | Toman; monthly rent in rent categories. |
pages | integer | |
query | string | |
recent | string |
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.
| Parameter | Type | Description |
|---|---|---|
category * | string | Required (the map is empty without one); as in dv_search, e.g. 'apartment-sell'. |
lat * | number | Latitude, e.g. 35.7 (from dv_place_search or dv_districts). |
lon * | number | Longitude, e.g. 51.4. |
brand_model | array | |
filters | object | |
limit | integer | |
max_deposit | integer | Rent deposit (ودیعه), Toman. |
max_price | integer | Toman; monthly rent in rent categories. |
min_deposit | integer | Rent deposit (ودیعه), Toman. |
min_price | integer | Toman; monthly rent in rent categories. |
query | string | |
radius_m | integer | Metres. |
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.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
query | string | Name 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.
| Parameter | Type | Description |
|---|---|---|
city | string | |
limit | integer | |
query | string | Part 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.
| Parameter | Type | Description |
|---|---|---|
district_id * | integer | District id from dv_districts, e.g. 655. |
city | string |
dv_locate Locate a GPS point
The city, neighbourhood and street address of a GPS point. Next: dv_nearby.
| Parameter | Type | Description |
|---|---|---|
lat * | number | Latitude inside Iran, e.g. 35.7. |
lon * | number | Longitude inside Iran, e.g. 51.4. |
dv_place_search Search a place on the map
Map autocomplete: turn a landmark or street name into coordinates and a bounding box. Next: dv_nearby or dv_locate with the lat/lon.
| Parameter | Type | Description |
|---|---|---|
query * | string | Landmark, mall, street or area, e.g. 'برج میلاد', 'ونک'. |
lat | number | Bias towards this point. |
lon | number |
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.
| Parameter | Type | Description |
|---|---|---|
ids * | array | Old 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]).
| Parameter | Type | Description |
|---|---|---|
city | string | |
district | string | Neighbourhood name or id for its polygon, e.g. 'ونک'. |
limit | integer | Max neighbourhoods in the overview. |
max_points | integer | Max 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).
| Parameter | Type | Description |
|---|---|---|
action * | string | 'create' saves a search, 'check' returns ads newer than the last check, 'list', 'delete'. |
brand_model | array | |
category | string | |
city | string | |
districts | array | |
exclude | array | |
filters | object | |
keywords | array | |
limit | integer | check: max ads per watch. |
max_price | integer | Toman; monthly rent in rent categories. |
min_price | integer | Toman; monthly rent in rent categories. |
name | string | create: a label. |
query | string | |
watch_id | string | check / 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.
| Parameter | Type | Description |
|---|---|---|
brand_model | array | |
category | string | |
city | string | |
districts | array | |
filters | object | |
pages | integer | |
query | string | |
record | boolean | Store today's point. |