Rank models by metric
top_modelsRank device MODELS by any battery metric, aggregating across every device
of that model. This is the tool for 'which phone model has the best battery
life', 'which models charge fastest', 'which run hottest' — questions that
would otherwise need one model_summary call per model.
Ordering is by the per-model MEDIAN of the metric (outlier-resistant); the
mean is returned alongside. Use brand to rank within one manufacturer and
min_devices to require a minimum sample size. country / continent rank
the models as they behave in one region (e.g. heat in hot climates).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| brand | No | Optional lowercase brand filter. When omitted, devices from any brand are ranked together. | |
| limit | No | Number of devices to return, 1..100. | |
| order | No | 'desc' (default) ranks the highest values first, 'asc' the lowest. Pick the direction that matches the question: fastest charging is ac_charge_hours + asc; longest battery life is discharge_hours + desc. | desc |
| metric | Yes | Which battery metric to rank on. One of: 'temperature_c' (mean battery temperature, C), 'max_temperature_c' / 'min_temperature_c' (hottest / coldest ever seen, C), 'battery_level_pct' (mean charge level, 0-100), 'discharge_hours' (hours to drain a full 100% - HIGHER means longer battery life), 'ac_charge_hours' / 'usb_charge_hours' / 'wireless_charge_hours' (hours to charge a full 100% on that source - LOWER means faster charging), 'awake_ratio' (fraction of time awake / screen-on, 0..1), 'snapshot_count' (how much data the device contributed), 'uptime_hours' (longest single uptime between reboots). | |
| country | No | Optional ISO 3166 alpha-2 country code (e.g. 'FR', 'IN', 'US'), case-insensitive. Keeps only devices whose time zone belongs to that country. The region comes from the phone's time-zone setting, not GPS / IP. | |
| continent | No | Optional continent, case-insensitive: 'Africa', 'Antarctica', 'Asia', 'Europe', 'North America', 'Oceania' or 'South America'. Keeps only devices whose time zone lies there. Combine with `country` for an intersection. | |
| min_devices | No | Ignore models backed by fewer devices than this. Defaults to 3 so a single outlier phone cannot win a ranking. Raise it for more robust comparisons. Raised to at least 5 when a region filter is set. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |