Price trend
dv_price_trendTrack daily median asking prices for a Divar search; each run stores today's median and returns a 90-day trend with percent change.
Instructions
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. | تهران |
| pages | No | Result pages to merge, about 25 ads each. | |
| query | No | Free text in title or description, e.g. 'پراید 111'. | |
| record | No | Store today's median so later calls can show the trend. | |
| 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'. | |
| districts | No | Neighbourhood names or ids in the one city, e.g. ['ونک']. | |
| brand_model | No | Vehicles, phones: brand/model, e.g. ['پژو 206']. |