Divar
PYPI · DIVAR-MCP
Unofficial read-only Divar: search Iran's classified ads, cheapest and best-value ads, price checks.
Available components
Last scanned (14 hours ago)
Scores higher than 86% of PyPI servers
Category E-commerce
How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. How we score → Why this is hard to score →
Supply Chain Security100
- No malware found by supply-chain analysis.Pass
- No known CVEs affecting this package version or its production dependencies.Pass
- Runs hatchling.build at install time, a recognised build step with no custom scripting around it. View diagnostics → Pass
- 1 of 35 dependencies flagged as unhealthy. View diagnostics → Partial
Provenance & Transparency97
- Source repository is publicly reachable at the declared URL. View diagnostics → Pass
- Cryptographically verified build provenance (signed, bound to sepehr071/divar-mcp). View diagnostics → Pass
- Clear OSI-approved license (MIT).Pass
- Actively maintained (last published 0 days ago).Pass
- Disclosure check failed: no security disclosure policy was found in the source repository. See how to fix → Fail
Schema Quality & AI Usability74
- 100% of prompts and resources have a non-trivial description (not blank, and not just the item's name).Pass
- AI-judged instruction clarity (excellent).Pass
- Context-footprint check failed: tool/resource definitions use about 9754 tokens (~295/item across 33 items; 31 tools + 2 resources), over budget; trim descriptions and params. See how to fix → Fail
- Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management20
- Stability observed for 6 of 30 days with no destabilising changes; credit accrues until the full window elapses.Partial
Tool Coverage100
- 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
- 100% of tool parameters carry a description.Pass
Tool Safety100
- No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
- We read all 31 captured tool definition(s), and no name or description among them implies an irreversible operation.Pass
- An AI judge read all 33 captured unit(s) of tool text and found none that tries to manipulate the model reading it.Pass
Capabilities100
- Implements a current MCP spec version (2026-07-28).Pass
Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.
- 22 Oct 26 +16
- Tool safety: pass → unverified ▼ security
- Stability: 0.17 → unverified ▼ security
- Malware scan: unverified → pass ▲ security
- Capabilities: pass → unverified ▼ functional
- Tool coverage: 100 → unverified ▼ functional
- Schema quality: 100 → unverified ▼ functional
- Package version: 0.2.0 → 0.2.1 functional
- 20 Oct 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 10 to 13. That category is still filling its 30-day observation window: 3 days of observed history at the previous scan, 4 at this one. The score rises as the window fills, whether or not the server changes.
- 19 Oct 26 −15
- Malware scan: pass → unverified ▼ security
- 18 Oct 26 +1
- Stability: 0.03 → unverified ▼ security
- Tool safety: pass → unverified ▼ security
- Capabilities: pass → unverified ▼ functional
- Tool coverage: 100 → unverified ▼ functional
- Schema quality: 100 → unverified ▼ functional
- Package version: 0.1.0 → 0.2.0 functional
- 16 Oct 26 81
First indexed and scored.
Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.
Captured 22 Oct 2026 · Analysed pypi/divar-mcp@0.2.1
Provenance Verified
A signed build attestation was found and verified, binding this exact artifact to the source repository it claims to come from.
| Result | Verified |
|---|---|
| Ecosystem | pypi |
| Reason | Verified |
| Discovered via | Registry attestation endpoint |
| Source repo | sepehr071/divar-mcp |
| Certificate issuer | https://token.actions.githubusercontent.com |
| Certificate SAN | https://github.com/sepehr071/divar-mcp/.github/workflows/publish.yml@refs/tags/v0.2.1 |
| Rekor log index | 3390359056 |
| Predicate type | PyPI publish attestation https://docs.pypi.org/attestations/publish/v1 |
| Subject digest | sha256:cd105e1d2b29c12f124dcd9e3880be6c86c644d017472ea0495139cae0f9bcd8 |
Background: How many MCP packages publish verified provenance →
Install scripts 1 script
| Hook | Tier | Command |
|---|---|---|
| build_backend | allowlisted | hatchling.build |
Background: Why install scripts are a supply-chain risk →
Dependencies 35 packages
| Packages resolved | 35 |
|---|---|
| No linked repository | 1 |
| Tree resolution | Complete |
Background: SBOMs and build attestations, explained →
The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability. A tool's description is untrusted text the model reads on every call, which is what makes this list a security surface and not just an inventory: how tool poisoning works →
dv_appraise Is this price fair ~460
Is an ad's price (or a price you have in mind) high or low compared with similar ads? Percentile, verdict, confidence. With a `token`: compares its price (or monthly rent) with similar ads found from its own breadcrumb (brand + district, widening step by step). Without: give `price` plus category/query/filters. Returns `percentile` (share of comparable ads that are cheaper), `verdict` ('insufficient comparables', with no lean either way, when confidence is low and the call would be "well below/above market"), `vs_median_pct`, the fair band p25-p75 and `confidence` (high: 40+ comparable ads at the first level, medium: 15+, else low). Comparisons ignore year, mileage, area and condition: refine with `filters`/`query`, or dv_compare against specific ads. Asking prices only.
| Name | Type | Req | Description |
|---|---|---|---|
| brand_model | array | – | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
| category | string | – | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| districts | array | – | Neighbourhood names or ids in the one city, e.g. ['ونک']. |
| filters | object | – | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], 'parking': true}. Unknown keys are returned in `ignored`. |
| pages | integer | – | Pages scanned per comparison level. |
| price | integer | – | Without a token: the price in Toman to check against the search below (monthly rent for rent categories). |
| query | string | – | Free text in title or description, e.g. 'پراید 111'. |
| token | string | – | An ad to appraise: its price is ranked against similar ads. Omit to appraise a price you give. |
No output schema declared.
No examples provided.
dv_best_for_budget Best ads for a budget ~598
Within a budget: the best-value ads (furthest below their peers' median) and the most you can get (closest to the budget). Scans the newest `pages` pages capped at `budget`. Each `best_value` ad has a `deal_score` (0-100) with `reasons` (distance below `budget_median`, photos, freshness; penalties for prices over 70% under the median and for notice, parking or co-op titles). Ads under 20% of the uncapped `market_median` and bait titles (وامدار, قدرالسهم, اقساط, پیشفروش...; kept if the word is in `query` / `keywords`) are dropped into `skipped_implausible`. Property for sale ranks by price per m2; the top 6 ad pages are opened for publish time, floor, parking and elevator (the `caveat` says the rest are unchecked). An unrealistic budget returns an empty `best_value` with a `note`. Use a narrow query or brand: a mixed category's median means nothing. Next: dv_appraise, dv_post.
| Name | Type | Req | Description |
|---|---|---|---|
| brand_model | array | – | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
| budget | integer | yes | Maximum price in Toman (rent categories: monthly rent), e.g. 1500000000. |
| category | string | – | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| districts | array | – | Neighbourhood names or ids in the one city, e.g. ['ونک']. |
| exclude | array | – | Drop ads whose title has any of these words. |
| filters | object | – | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], '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 | – | Ads per list. |
| max_age_hours | number | – | Only ads bumped within this many hours. |
| 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'. |
No output schema declared.
No examples provided.
dv_boundary City boundary ~243
Neighbourhood borders of a city from Divar's GeoJSON: the city's bounding box, or one neighbourhood's polygon. Without `district`: the city bounding box [min_lon, min_lat, max_lon, max_lat] and the neighbourhoods with id, centre and box. With `district`: a GeoJSON Feature of that neighbourhood (coordinates [lon, lat], thinned to `max_points` per ring, so the shape is approximate). Use to draw an area or test a point against it; for a point's own neighbourhood use dv_locate. Next: dv_nearby with the centre.
| Name | Type | Req | Description |
|---|---|---|---|
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| district | string | – | A neighbourhood name or id (e.g. 'ونک', '315') to get its polygon. Omit for the city's bounding box and its neighbourhoods. |
| limit | integer | – | Max neighbourhoods listed in the overview. |
| max_points | integer | – | Max vertices per polygon ring (the full outline is thinned). |
No output schema declared.
No examples provided.
dv_categories Browse categories ~165
The Divar category tree (236 nodes, up to 4 levels): slug, Persian name, path and whether it is a leaf. Use to find the `category` slug for dv_search and the other tools (leaf slugs such as `light` = cars and vans, `apartment-sell`, `apartment-rent`, `mobile-phones`). Filters exist per category: dv_filters.
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer | – | Max categories to return. |
| parent | string | – | List the direct children of this category slug, e.g. 'vehicles' or 'real-estate'. Omit for the 10 top-level categories. |
| query | string | – | Part of a category name or slug, Persian or Latin: 'موبایل', 'apartment'. |
No output schema declared.
No examples provided.
dv_cheapest Find cheapest ads ~555
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, so this scans the newest `pages` pages (about 25 ads each) and ranks them: raise `pages` for a wider scan or narrow with filters. Rent categories rank by monthly rent (deposit shown too). Ads under 10% of the median (`include_outliers` shows them) are usually not the thing searched for: a 100,000 Toman 'car' is a transfer slip or a deposit. The answer says how many ads were scanned and skipped. Next: dv_post, dv_compare.
| Name | Type | Req | Description |
|---|---|---|---|
| brand_model | array | – | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
| category | string | – | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| districts | array | – | Neighbourhood names or ids in the one city, e.g. ['ونک']. |
| exclude | array | – | Drop ads whose title has any of these words. |
| filters | object | – | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], 'parking': true}. Unknown keys are returned in `ignored`. |
| has_photo | boolean | – | Only ads with photos. |
| include_outliers | boolean | – | Also list ads priced under 10% of the scanned median (usually deposits, parts or bait). |
| 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_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 many Toman (seller junk prices like 1,000 are already flagged and skipped). |
| 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'. |
No output schema declared.
No examples provided.
dv_cities Find cities ~145
City ids for a name (1,177 cities; Tehran is 1, Mashhad 3). Returns id, name, URL slug, province id and centre. Use first when you need a `city` for another tool (they also accept the name directly). Persian letter variants (ي/ی, ك/ک) are matched. Next: dv_districts for the neighbourhoods of a city, dv_search to look for ads.
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer | – | Max cities to return. |
| query | string | – | City name or slug, Persian or Latin, e.g. 'مشهد', 'kar'. Omit for the 7 biggest cities. |
No output schema declared.
No examples provided.
dv_compare Compare ads ~139
Side by side: the price of each ad and only the specs that differ (the identical ones are listed once). Gives `cheapest`, per other ad `cheapest_saves_pct` (how much less the cheapest costs than that ad; per metre when every priced ad has an area, see `compared_by`), the differing spec rows with each ad's value, shared specs, and features one ad has and another lacks. Works across ads of the same kind (two cars, two flats); specs are the Persian rows of each ad.
| Name | Type | Req | Description |
|---|---|---|---|
| tokens | array | yes | 2 to 6 ad tokens to compare. |
No output schema declared.
No examples provided.
dv_count Count matching ads ~376
How many active ads match a search, in one cheap call (capped: 10,000 means '10,000 or more'). Use to size a market, to test whether a filter combination is too narrow, or to compare cities and districts before fetching ads. Same arguments as dv_search.
| Name | Type | Req | Description |
|---|---|---|---|
| brand_model | array | – | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
| category | string | – | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| districts | array | – | Neighbourhood names or ids in the one city, e.g. ['ونک']. |
| filters | object | – | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], 'parking': true}. Unknown keys are returned in `ignored`. |
| has_photo | boolean | – | Only ads with photos. |
| max_deposit | integer | – | Rent categories: deposit (ودیعه) in Toman. |
| max_price | integer | – | Toman; monthly rent in rent categories. |
| min_deposit | integer | – | Rent categories: deposit (ودیعه) in Toman. |
| min_price | integer | – | Toman; monthly rent in rent categories. |
| query | string | – | Free text in title or description, e.g. 'پراید 111'. |
| recent | string | – | Published within '3h', '12h', '1d', '3d' or '7d'. |
No output schema declared.
No examples provided.
dv_dealer Dealer page ~131
A business account's public page: name, active ad count, member since and its first 11 ads. Divar's web API gives only the first batch of a dealer's ads (no paging); search with the dealer's name or use the ad filters for more. Ads are compact rows (token, title, price, district, age, photos, tag); the ad link is `url_prefix` + token and `age_h` is hours since the last bump.
| Name | Type | Req | Description |
|---|---|---|---|
| brand_token | string | yes | Dealer id from dv_seller, e.g. 'ZbeypyTr'. |
No output schema declared.
No examples provided.
dv_districts City neighbourhoods ~150
Neighbourhoods (محله) of one city with ids, centre point and the main streets inside (Tehran has about 450). Use to get the district ids for a `districts` filter, or to pick coordinates for dv_nearby. dv_search and the other search tools take district names directly. Next: dv_neighbours for adjacent areas.
| Name | Type | Req | Description |
|---|---|---|---|
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| limit | integer | – | Max neighbourhoods to return. |
| query | string | – | Part of a neighbourhood name, e.g. 'ونک'. |
No output schema declared.
No examples provided.
dv_export Export ads ~488
The ads of a search as CSV or JSON lines text, ready to save to a spreadsheet or analyse. Same arguments as dv_search. Columns: token, title, price, deposit, rent (Toman), district, posted (UTC), photos, seller, info, url. Missing prices are empty. The text is in `data`; write it to a file yourself.
| Name | Type | Req | Description |
|---|---|---|---|
| brand_model | array | – | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
| category | string | – | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| districts | array | – | Neighbourhood names or ids in the one city, e.g. ['ونک']. |
| exclude | array | – | Drop ads whose title has any of these words. |
| filters | object | – | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], 'parking': true}. Unknown keys are returned in `ignored`. |
| format | string | – | 'csv' (header + rows) or 'jsonl' (one JSON ad per line). |
| has_photo | boolean | – | Only ads with photos. |
| keywords | array | – | Words that must all be in the title. |
| limit | integer | – | Max rows. |
| max_age_hours | number | – | Only ads bumped within this many hours. |
| max_deposit | integer | – | Rent categories: deposit (ودیعه) in Toman. |
| max_price | integer | – | Toman; monthly rent in rent categories. |
| min_deposit | integer | – | Rent categories: deposit (ودیعه) in 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'. |
No output schema declared.
No examples provided.
dv_filter_options Filter options ~272
Allowed values of a filter: brand and model keys (161 car brands), districts, or any option list. With `query` it uses Divar's own typed search (best way to turn 'پراید' into the key 'Pride 111'). Without it: all brands (key, title, model count), or the models of one `brand`. Pass the keys to dv_search as `brand_model` / `filters`.
| Name | Type | Req | Description |
|---|---|---|---|
| brand | string | – | brand_model only: a brand key (e.g. 'Peugeot') to list its models. |
| category | – | yes | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| filter | string | – | Filter key from dv_filters, usually 'brand_model' (cars, phones, ...) or 'districts'. |
| limit | integer | – | Max options to return. |
| query | string | – | Text to look up inside the filter, e.g. 'سمند' or 'ونک'. Without it the whole list (or one brand) is returned. |
No output schema declared.
No examples provided.
dv_filters Category filters ~222
Every filter a category supports: key, type, Persian label, unit and the allowed options. Use before dv_search when you need more than price and district. Pass the keys in `filters`: number_range -> {'size': {'min': 80, 'max': 120}}, repeated_string -> {'rooms': ['دو']}, str -> {'gearbox': 'automatic'}, boolean -> {'parking': true}. `lazy` filters (districts, brand_model) have long option lists: use dv_filter_options or the `districts` / `brand_model` arguments of dv_search. Rent categories filter `credit` (deposit) and `rent`, sale categories `price`; both in Toman.
| Name | Type | Req | Description |
|---|---|---|---|
| category | – | yes | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
No output schema declared.
No examples provided.
dv_find_deals Find deals ~521
Ads priced well below the median of the same search, without a budget: scored deals, with bait and junk prices removed. Scans the newest `pages` pages and keeps ads `min_discount_pct` to 70% below the median (price per m2 for property for sale). Left out: suspect and placeholder prices, ads under 20% of the median (deposits, parts, bait), bait or co-op titles (وامدار, قدرالسهم, اقساط, پیشفروش...; unless you ask for the word) and notice / parking titles. Use a narrow query or filters: the median of a mixed category means nothing. Asking prices only. Next: dv_post, dv_appraise, dv_compare.
| Name | Type | Req | Description |
|---|---|---|---|
| brand_model | array | – | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
| category | string | – | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| districts | array | – | Neighbourhood names or ids in the one city, e.g. ['ونک']. |
| exclude | array | – | Drop ads whose title has any of these words. |
| filters | object | – | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], '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 deals. |
| max_age_hours | number | – | Only ads bumped within this many hours. |
| max_price | integer | – | Toman; monthly rent in rent categories. |
| min_discount_pct | integer | – | Only ads at least this many percent below the median. |
| 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'. |
No output schema declared.
No examples provided.
dv_locate Locate a GPS point ~92
The city, neighbourhood and street address of a GPS point. Gives the city id and district id to use as filters. The street address is only known inside covered areas. Next: dv_nearby for ads around the point.
| Name | Type | Req | Description |
|---|---|---|---|
| lat | number | yes | Latitude inside Iran, e.g. 35.7. |
| lon | number | yes | Longitude inside Iran, e.g. 51.4. |
No output schema declared.
No examples provided.
dv_market Market price statistics ~570
Asking-price statistics of a search: min, p10, p25, median, p75, p90, max, mean; split by district and by day. Scans the newest `pages` pages (about 25 ads each) and drops negotiable and suspect prices (`excluded`) and, from the statistics, prices under a tenth of the median. Sale searches give `price`; rentals give `rent` and `deposit` (Toman). `by_district` lists the busiest neighbourhoods with ad count and median; `per_day` shows how many ads were posted per UTC date and their median, a rough trend. These are what sellers ask, not what deals close at, and a sample of the newest ads, not the whole market: use a narrow query or filters (one model, one area) for a meaningful median. Next: dv_cheapest, dv_best_for_budget, dv_appraise.
| Name | Type | Req | Description |
|---|---|---|---|
| brand_model | array | – | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
| category | string | – | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| districts | array | – | Neighbourhood names or ids in the one city, e.g. ['ونک']. |
| exclude | array | – | Drop ads whose title has any of these words. |
| filters | object | – | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], '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. |
| max_age_hours | number | – | Only ads bumped within this many hours. |
| max_deposit | integer | – | Rent categories: deposit (ودیعه) in Toman. |
| max_price | integer | – | Toman; monthly rent in rent categories. |
| min_deposit | integer | – | Rent categories: deposit (ودیعه) in 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'. |
No output schema declared.
No examples provided.
dv_nearby Ads near a point ~424
Ads on the map around a GPS point, nearest first, with coordinates, distance, price chips and a thumbnail. Up to 200 ads per area are available (`total_in_area` is the true count). Pin positions are fuzzed by about 500 m for most categories (`approximate_location`), so distances are approximate. A category is required (Divar's map returns nothing without one). Map prices are rounded in the site's display (1.5 billion = 1,500,000,000); sale pins give the total `price` and, for homes, `price_per_m2`. Next: dv_post for details.
| Name | Type | Req | Description |
|---|---|---|---|
| brand_model | array | – | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
| category | string | yes | Required: the map shows nothing without a category. Slug or Persian name, e.g. 'apartment-sell', 'apartment-rent', 'light'. List them with dv_categories. |
| filters | object | – | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], 'parking': true}. Unknown keys are returned in `ignored`. |
| lat | number | yes | Latitude, e.g. 35.7. Get one from dv_place_search or dv_districts. |
| limit | integer | – | Max ads in the answer. |
| lon | number | yes | Longitude, e.g. 51.4. |
| max_deposit | integer | – | Rent categories: deposit (ودیعه) in Toman. |
| max_price | integer | – | Toman; monthly rent in rent categories. |
| min_deposit | integer | – | Rent categories: deposit (ودیعه) in Toman. |
| min_price | integer | – | Toman; monthly rent in rent categories. |
| query | string | – | Free text in title or description, e.g. 'پراید 111'. |
| radius_m | integer | – | Search radius in metres. |
No output schema declared.
No examples provided.
dv_neighbours Adjacent neighbourhoods ~158
Neighbourhoods adjacent to a district, to widen a neighbourhood search to the surrounding area. `districts` is Divar's own adjacency list, which is short for some areas (Vanak lists one). `nearest` adds the closest districts of `city` by centroid distance (within 3 km, up to 6) so a widened search is not too narrow. Pass the ids (or names) as `districts` to dv_search.
| Name | Type | Req | Description |
|---|---|---|---|
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| district_id | integer | yes | District id from dv_districts, e.g. 655. |
No output schema declared.
No examples provided.
dv_new_since New ads since a time ~506
Ads published after a moment, newest first: poll this to watch a search (a new flat, a cheap car) without repeats. Call it, remember `latest`, and pass it as `since` next time: only ads newer than that come back. Promoted old ads are excluded by date. `more` is true when the page limit was reached and even more new ads exist. Nothing is stored or pushed: the caller (or a scheduler) decides when to poll.
| Name | Type | Req | Description |
|---|---|---|---|
| brand_model | array | – | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
| category | string | – | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| districts | array | – | Neighbourhood names or ids in the one city, e.g. ['ونک']. |
| exclude | array | – | Drop ads whose title has any of these words. |
| filters | object | – | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], 'parking': true}. Unknown keys are returned in `ignored`. |
| has_photo | boolean | – | Only ads with photos. |
| hours | number | – | Used when `since` is omitted: ads from the last N hours. |
| keywords | array | – | Words that must all be in the title. |
| limit | integer | – | Max ads in the answer. |
| max_deposit | integer | – | Rent categories: deposit (ودیعه) in Toman. |
| max_price | integer | – | Toman; monthly rent in rent categories. |
| min_deposit | integer | – | Rent categories: deposit (ودیعه) in 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'. |
| since | string | – | UTC timestamp like 2026-10-16T01:50:00Z (the `latest` of the previous call). Omit to use `hours`. |
No output schema declared.
No examples provided.
dv_parse_query Question to search ~212
Turn a plain Persian request into dv_search arguments: city, neighbourhoods, price bounds, category and leftover words. A rule-based helper, not a language model: it finds a city and its neighbourhoods by name, amounts with میلیارد / میلیون / هزار (with زیر, کمتر از, تا, بالای, حداقل or از ... تا ...), a category from Divar's own guess for the leftover words, and moves rental words (اجاره, رهن) to the matching rent category. `search` can be passed to dv_search as it is; check `notes` for what was assumed. An area like '80 متری' becomes a `size` filter of ±10%. Rooms, year or mileage are not extracted: use dv_filters.
| Name | Type | Req | Description |
|---|---|---|---|
| text | string | yes | A search as a person would write it, e.g. 'آپارتمان اجاره ونک زیر ۸ میلیارد' or 'پراید کرج تا ۲۰۰ میلیون'. |
No output schema declared.
No examples provided.
dv_place_mapping Map old place ids ~112
Convert old Divar place ids to the current ones (Divar merged and renumbered places). Use when an id from an old link or saved data returns nothing. `mapping` has the renumbered ids only; `unchanged` are current city ids; `unverified` ids are not in the renumber table and are not cities (districts cannot be checked here: see dv_districts).
| Name | Type | Req | Description |
|---|---|---|---|
| ids | array | yes | Old district/city ids saved from earlier Divar data. |
No output schema declared.
No examples provided.
dv_place_search Search a place on the map ~105
Map autocomplete: turn a landmark or street name into coordinates and a bounding box. Use the returned lat/lon with dv_nearby (ads around a place) or dv_locate. Persian text works best.
| Name | Type | Req | Description |
|---|---|---|---|
| lat | number | – | Map centre latitude to bias results. |
| lon | number | – | Map centre longitude to bias results. |
| query | string | yes | Landmark, mall, street or area, e.g. 'برج میلاد', 'ونک'. |
No output schema declared.
No examples provided.
dv_post Ad details ~262
Everything public about one ad: price in Toman, specs, features, description, images, map position, seller type. Prices: `price` (sale) or `deposit` + `rent` (rental; rent 0 + full_deposit = رهن کامل); `negotiable` true when the seller gave none; `suspect_price` marks placeholder prices. `specs` are the Persian spec rows of the ad (mileage, year, area, rooms...). `lat`/`lon` are fuzzed by about 500 m for most categories. `shared_housing` flags همخانه ads. No phone number: Divar shows it only to logged-in users, use `url` to contact the seller. Next: dv_similar, dv_appraise (is the price fair), dv_seller, dv_compare.
| Name | Type | Req | Description |
|---|---|---|---|
| full_text | boolean | – | Do not cut the description (default cuts at 1500 characters). |
| max_images | integer | – | How many full-size image URLs to return. |
| token | string | yes | Ad token: the last part of divar.ir/v/<slug>/<token> or `token` of a search result, e.g. 'gaRPIP2m'. |
No output schema declared.
No examples provided.
dv_posts Several ads ~90
Details of up to 10 ads in one call (compact: specs and one image, description cut at 300 characters). Use to read a shortlist from dv_search. An ad that was removed shows an `error` instead of failing the call.
| Name | Type | Req | Description |
|---|---|---|---|
| tokens | array | yes | Ad tokens, e.g. ['gaRPIP2m', 'gaRPYuZk'] (at most 10). |
No output schema declared.
No examples provided.
dv_price_trend Price trend ~362
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 price history, so the trend starts with your first call and grows each day you call it again (a scheduler helps). Each call scans the newest `pages` pages, stores median / quartiles / count for today (a second call the same UTC day replaces it) and returns the last 90 points with `change_pct` since the previous day. Use a narrow query: a mixed category's median is noise. For a one-off distribution use dv_market.
| Name | Type | Req | Description |
|---|---|---|---|
| brand_model | array | – | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
| category | string | – | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| districts | array | – | Neighbourhood names or ids in the one city, e.g. ['ونک']. |
| filters | object | – | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], 'parking': true}. Unknown keys are returned in `ignored`. |
| pages | integer | – | Result pages to merge, about 25 ads each. |
| query | string | – | Free text in title or description, e.g. 'پراید 111'. |
| record | boolean | – | Store today's median so later calls can show the trend. |
No output schema declared.
No examples provided.
dv_search Search ads ~630
Search Divar ads in one or more cities by category, text and filters; compact cards, prices in Toman. Card fields are described in the server instructions; `age_h` is hours since the last bump, `image` comes only with `thumbnails`, and `suspect_price` includes 'outlier' (at or under a tenth of the fetched median, 5+ priced ads). Newest first; the first 1-3 rows may be promoted older ads. Continue with `next_cursor` as `cursor`. Filters the category lacks come back in `ignored`; an empty Persian query is retried once with letters folded. Next: dv_post, dv_compare, dv_cheapest, dv_market.
| Name | Type | Req | Description |
|---|---|---|---|
| brand_model | array | – | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
| category | string | – | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| cursor | string | – | `next_cursor` of the previous call, for older ads. |
| districts | array | – | Neighbourhood names or ids in the one city, e.g. ['ونک']. |
| exclude | array | – | Drop ads whose title has any of these words. |
| filters | object | – | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], '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 categories: deposit (ودیعه) in Toman. |
| max_price | integer | – | Toman; monthly rent in rent categories. |
| min_deposit | integer | – | Rent categories: deposit (ودیعه) in 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 own order (default, pages by cursor). 'cheapest' / 'expensive' sort the ads fetched in this call by price (Divar cannot sort by price). |
| thumbnails | boolean | – | Include each ad's thumbnail URL in `image` (about 40 tokens per ad). |
No output schema declared.
No examples provided.
dv_seller Seller and their ads ~156
The seller behind an ad: how many personal and business ads they have, the business card (name, brand_token) and their ads. Use to judge a seller (one flat or fifty cars?) and to list their other ads. For a dealer's whole page call dv_dealer with the brand_token (`dv_post` does not give one). A personal seller has no business card (`seller_kind`). No phone number or identity is exposed.
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer | – | Max of the seller's other ads to return. |
| token | string | yes | Ad token: the last part of divar.ir/v/<slug>/<token> or `token` of a search result, e.g. 'gaRPIP2m'. |
No output schema declared.
No examples provided.
dv_similar Similar ads ~217
Ads similar to one ad: same brand/model (or category) and neighbourhood, widening step by step until enough are found. Divar has no similar-ads endpoint; this searches the ad's own breadcrumb (brand+district, brand, category+district, category). `basis` names the levels used, narrowest first. Sorted newest first. For property, ads priced over 5x or under a fifth of this ad, or whose title area is under 0.4x or over 2.5x of its area (a 950B bulk listing next to a 180 m flat), are left out and counted in `excluded_outliers`. Next: dv_compare, dv_appraise.
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer | – | Max similar ads. |
| pages | integer | – | Pages scanned per breadcrumb level. |
| token | string | yes | Ad token: the last part of divar.ir/v/<slug>/<token> or `token` of a search result, e.g. 'gaRPIP2m'. |
No output schema declared.
No examples provided.
dv_status Server status ~78
Is Divar reachable and how fast: version, a live latency check, caches and local watch state. Call first when other tools fail (it tells a blocked network from a bad argument). The check is one small request to Divar. The server instructions describe the usual tool order (cities and categories, then dv_search, then dv_post).
Input schema present but exposes no named parameters.
No output schema declared.
No examples provided.
dv_suggest Search suggestions ~140
What Divar's search box would suggest for some text, and which categories the text belongs to. Use to find the right `category` and a good `query` when the user only gave a product name. Each suggestion has the category slug and a probability; `categories` are guesses for the bare word. Next: dv_search.
| Name | Type | Req | Description |
|---|---|---|---|
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| query | string | yes | Text as typed in the Divar search box, e.g. 'پراید', 'پژو'. |
No output schema declared.
No examples provided.
dv_watch Saved watches ~507
Save a search and later get only the ads that appeared since the last check; stored in a local file, nothing is pushed. `create` takes the search arguments of dv_search (validated once, then stored with the current time as the mark). `check` runs dv_new_since for the watch and moves the mark to the newest ad it returned, so the next check shows only newer ads; it does not run by itself: call it from a schedule or when asked. The file is `~/.divar-mcp/state.json` (override with DIVAR_MCP_STATE); it holds only your searches. Next: dv_post for a new ad.
| Name | Type | Req | Description |
|---|---|---|---|
| action | string | yes | 'create' saves a search, 'check' returns the ads newer than the last check and moves the mark, 'list' shows the saved searches, 'delete' removes one. |
| brand_model | array | – | Vehicles, phones: brand/model, e.g. ['پژو 206']. |
| category | string | – | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. |
| city | string | – | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. |
| districts | array | – | Neighbourhood names or ids in the one city, e.g. ['ونک']. |
| exclude | array | – | Drop ads whose title has any of these words. |
| filters | object | – | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], 'parking': true}. Unknown keys are returned in `ignored`. |
| keywords | array | – | Words that must all be in the title. |
| limit | integer | – | check: max new 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 for you, e.g. 'cheap Pride in Karaj'. |
| query | string | – | Free text in title or description, e.g. 'پراید 111'. |
| watch_id | string | – | check / delete: the id from 'create' or 'list'. check without it checks every watch. |
No output schema declared.
No examples provided.
How do I install the Divar MCP server?
Divar runs locally as a PyPI package, launched with uvx divar-mcp. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.
pypi · divar-mcp
claude mcp add sepehr071-divar-mcp -- uvx divar-mcp
What is the Divar MCP server?
Divar is an MCP server listed in the public MCP registry as io.github.sepehr071/divar-mcp. Unofficial read-only Divar: search Iran's classified ads, cheapest and best-value ads, price checks. This page covers its PyPI package (divar-mcp).
Is the Divar MCP server safe to use?
Divar scores 84 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 22 October 2026. Its build provenance is signed and verified. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.
What tools does the Divar MCP server expose?
Divar exposes 31 tools: dv_categories, dv_filters, dv_filter_options, dv_suggest, dv_parse_query, and 26 more. Their descriptions and schemas cost roughly 9,086 tokens of context every time the server is loaded.
Is the Divar MCP server still maintained?
Divar is still listed as active in the MCP registry. We last reached this channel on 22 October 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.
What licence is the Divar MCP server under?
Divar declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.