Analyze prices
analyze_pricesCompute price statistics (min, quartiles, median, max, mean) and find cheapest matches for any search on Marktplaats or 2dehands, excluding outliers and non-relevant ads.
Instructions
Price statistics (min, quartiles, median, max, mean) over the most relevant asking prices for a search, plus the cheapest matches. Free, bidding-only and reserved ads are excluded and outliers beyond 1.5x the interquartile range are trimmed. Most reliable with a subcategory plus attributes (e.g. subcategory 'Mobiele telefoons | Apple iPhone', attributes {'Model': 'iPhone 15', 'Opslagcapaciteit': '128 GB'}) instead of free text, which drags in accessories.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Which marketplace: marktplaats (Netherlands) or 2dehands (Belgium). | marktplaats |
| query | Yes | Free-text search, e.g. 'racefiets' or 'iphone 15'. May be empty if a category is given. | |
| exclude | No | Drop listings whose title or description contains any of these words, e.g. ['hoesje', 'defect', 'gezocht']. | |
| category | No | Top-level category name (Dutch, e.g. 'Fietsen en Brommers') or numeric id. See list_categories. | |
| delivery | No | 'shipping' for ads that can be shipped, 'pickup' for collection. | |
| language | No | 2dehands only: 'nl' for Dutch-language ads, 'fr' for French, 'all' (default). | |
| postcode | No | Dutch/Belgian postal code to search around, e.g. '1011 AB' or '2000'. Required for distance filtering and for distance_km in results. | |
| price_to | No | Maximum price in euros. | |
| condition | No | Filter by item condition. | |
| attributes | No | Category-specific filters as {filter: value}, using the labels from list_category_filters, e.g. {'Merk': 'Gazelle', 'Framehoogte': '57 tot 61 cm'} or {'Bouwjaar': '2018-2022', 'Kilometerstand': '-100000', 'Brandstof': 'Benzine'}. A list means any of those values. Ranges are 'min-max', 'min-' or '-max'. | |
| price_from | No | Minimum price in euros. | |
| distance_km | No | Max distance from postcode in kilometers (needs postcode). | |
| sample_size | No | Listings to sample, most relevant first (10-100). | |
| subcategory | No | Subcategory name (e.g. 'Fietsen | Racefietsen' or 'Fietsen | Heren | Herenfietsen') or numeric id. See list_categories with a parent. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | No | ||
| min | No | ||
| p25 | No | ||
| p75 | No | ||
| mean | No | ||
| note | No | ||
| site | Yes | ||
| query | Yes | ||
| median | No | ||
| cheapest | No | ||
| sample_size | Yes | ||
| total_count | Yes | ||
| excluded_outliers | No |