Best ads for a budget
dv_best_for_budgetScan recent Divar listings within a set budget to surface high-value ads below peer medians and options near your price cap.
Instructions
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. | تهران |
| limit | No | Ads per list. | |
| pages | No | Result pages to merge, about 25 ads each. | |
| query | No | Free text in title or description, e.g. 'پراید 111'. | |
| budget | Yes | Maximum price in Toman (rent categories: monthly rent), e.g. 1500000000. | |
| recent | No | Published within '3h', '12h', '1d', '3d' or '7d'. | |
| exclude | No | Drop ads whose title has any of these words. | |
| filters | No | Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], 'parking': true}. Unknown keys are returned in `ignored`. | |
| category | No | Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'. | |
| keywords | No | Words that must all be in the title. | |
| districts | No | Neighbourhood names or ids in the one city, e.g. ['ونک']. | |
| has_photo | No | Only ads with photos. | |
| min_price | No | Toman; monthly rent in rent categories. | |
| brand_model | No | Vehicles, phones: brand/model, e.g. ['پژو 206']. | |
| max_age_hours | No | Only ads bumped within this many hours. |