Count matching ads
dv_countCount active Divar ads matching a search to size markets, test narrow filters, or compare cities and districts before fetching listings.
Instructions
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'. | تهران |
| query | No | Free text in title or description, e.g. 'پراید 111'. | |
| recent | No | Published within '3h', '12h', '1d', '3d' or '7d'. | |
| 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. ['ونک']. | |
| has_photo | No | Only ads with photos. | |
| max_price | No | Toman; monthly rent in rent categories. | |
| min_price | No | Toman; monthly rent in rent categories. | |
| brand_model | No | Vehicles, phones: brand/model, e.g. ['پژو 206']. | |
| max_deposit | No | Rent categories: deposit (ودیعه) in Toman. | |
| min_deposit | No | Rent categories: deposit (ودیعه) in Toman. |