Return the mobile devices brands for which we have battery statistics,
along with the number of distinct models, the number of devices recorded per brand,
and the largest single-model device count within the brand (`max_devices_per_model`).
Each entry also includes a `url` to the public BatterySnap web page for the brand
(e.g. https://www.battery-snap.com/brands/samsung).
Pass `min_device_count` / `max_device_count` and `min_model_count` / `max_model_count`
to filter brands by recorded-device and distinct-model counts.
Pass `fields` to keep only specific attributes in each entry.
The full list is long: pass `limit` (and `offset` to page) unless you really
need every brand, and prefer `search` when resolving one brand by name.
Parameterslimitfieldsoffsetmax_model_countmin_model_countmax_device_countmin_device_count
Return the mobile devices models of the given brands for which we have battery statistics,
along with the brand each model belongs to, the number of devices recorded, the average
battery temperature in Celsius, and the min/max Android SDK level per model.
Each entry is grouped by the resolved street name (e.g. 'Galaxy S23'), which may cover
several raw Android Build.MODEL identifiers (carrier variants, regional SKUs, …). For
URL building, every entry also exposes:
* `raw_model_code`: a representative raw Build.MODEL identifier (the lexicographically
smallest one among devices grouped under this street name), or null if no device
reported a non-empty model code.
* `url`: the public BatterySnap web page for the model, e.g.
https://www.battery-snap.com/brands/samsung/models/SM-S911B. Built from `brand` + `raw_model_code`; null when either is null;
`raw_model_code` is null. The page lists all devices reporting that exact raw model.
Pass `min_device_count` / `max_device_count` to filter models by how many devices were recorded.
For 'which models have the most devices' questions, pass sort='device_count' with a small
`limit` (and typically fields=['brand', 'model', 'device_count', 'url']) instead of fetching
and sorting the full list.
Pass `fields` to keep only specific attributes in each entry.
Omit `brands` (or pass an empty list) to return models across every brand.
Parameterssortlimitbrandsfieldsoffsetmax_device_countmin_device_count
devices
Find devices by model
Return the list of individual physical devices matching one or more (brand, model) pairs
for which we have battery statistics. Each entry in the returned list describes ONE specific
device (identified by its own `device_uid`) and the metrics on that entry are aggregates
computed only from THAT device's own snapshot history — they are not aggregated across
devices. Two devices of the same brand and model will appear as two separate entries with
their own independent metrics.
Per-device fields include: brand, resolved model (street name), raw Android model, snapshot
count, activity window (first / last seen), average battery level, average / min / max
battery temperature in Celsius, awake-ratio, discharge speed and AC / USB / wireless charge
speed (hours per full 100% swing), Android SDK level, IANA time zone, and a `url` pointing at the
public BatterySnap web page for the device's interactive battery history
(https://www.battery-snap.com/device_history?device=<uid>).
Each pair's model is matched case-insensitively against either the resolved street name
(e.g. 'Galaxy S23') or the raw Android model identifier (e.g. 'SM-S911B').
Pass `fields` to keep only specific attributes per device and avoid bloated responses.
Parameterspairsrequiredfields
device_summary
Device battery summary
Return aggregated battery metrics for ONE specific device: average / min / max
temperature, average battery level, mean charge time per power source (AC, USB,
wireless) and mean discharge time over a recent (~2 weeks) and a long (~2 months)
window, plus awake ratio and basic device info. Also includes `url`: the public
BatterySnap web page for this device's interactive battery history
(https://www.battery-snap.com/device_history?device=<uid>). All values are pre-computed
from the device's full snapshot history — no raw timeseries is returned.
Parametersdevice_uidrequired
model_summary
Model battery summary
Aggregate battery metrics across ALL devices of a given brand+model. Returns
mean / median / p25 / p75 / min / max for: temperature (C), battery level (%),
discharge speed (hours per 100%%), AC / USB / wireless charge speed (hours per
100%%), and awake ratio. Use this to characterize how a model behaves in the
field, or to compare a single device against its model average.
Also includes:
* `raw_model_code`: representative raw Android Build.MODEL identifier (smallest
among devices grouped under this street name), or null if none recorded.
* `url`: public BatterySnap web page for the model
(https://www.battery-snap.com/brands/<brand>/models/<raw_model_code>); null when
`raw_model_code` is null.
Parametersbrandrequiredmodelrequired
Live fleet-wide counters: total devices, models, snapshots, sessions, the
running snapshot-ingest rate (snapshots/sec) and the timing of the last
insert batch. Use this for one-shot 'how big is the dataset / how fast is it
growing' questions. Unlike `fleet_summary`, no per-device aggregation is
involved — these are raw running counts from the database.
Takes no parameters.
fleet_summary
Fleet battery summary
Aggregate battery metrics across the entire fleet, or across one brand when
`brand` is provided. Returns mean / median / p25 / p75 / min / max for the same
set of metrics as `model_summary`. Use this for fleet-wide baselines that a
single device or model can be compared against.
Parametersbrand
top_devices_by_uptime
Top devices by uptime
Return the devices with the longest single uptime ever recorded between
reboots (max_elapsed_time). Optionally filter by brand and/or model. Useful
to find which physical phones in the fleet are champions of staying powered
on for weeks/months at a time. Each entry includes a `device_uid` you can
feed into `device_summary` for deeper analysis, and a `url` pointing at the
device's interactive battery history page on https://www.battery-snap.com.
Parametersbrandlimitmodel
top_devices_by_live_uptime
Top devices by live uptime
Same as `top_devices_by_uptime`, but restricted to devices that have not
yet rebooted past their recorded maximum — meaning the uptime is currently
still climbing. These are the devices that are 'live' champions right now,
as opposed to historical record-holders. Each entry includes a `url`
pointing at the device's interactive battery history page on
https://www.battery-snap.com.
Parametersbrandlimitmodel
top_devices
Rank devices by metric
Rank INDIVIDUAL devices by any battery metric — the general-purpose
leaderboard. Use it for 'which phones run hottest / last longest / charge
fastest', optionally narrowed to one brand and/or model. Returns at most
`limit` rows, so it answers superlative questions in a single small call
instead of enumerating the fleet.
Ranking is over each device's own lifetime aggregate. Pair the metric with
the right `order`: e.g. hottest = temperature_c + desc, fastest AC charging
= ac_charge_hours + asc, best battery life = discharge_hours + desc.
Parametersbrandlimitmodelordermetricrequiredmin_snapshots
top_models
Rank models by metric
Rank 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.
Parametersbrandlimitordermetricrequiredmin_devices
device_ranking
Compare a device to its peers
Answer 'is MY phone normal?' — rank one device's metric against other
devices of the same model AND against the whole fleet, in one call. Returns
the device's value, its 1-based rank, its percentile, and the cohort
median / mean / min / max for both cohorts.
Prefer this over fetching `device_summary` + `model_summary` and comparing
by hand: it is a single call and gives the percentile directly. The model
cohort is the meaningful one for 'is this device degraded'; the fleet cohort
puts the model itself in context.
Parametersmetricdevice_uidrequired
search
Search brands and models
Resolve free-form user text into the canonical brand / model identifiers
the other tools expect. Meant for phones named in free text: the other tools
match brands and models exactly, so a guessed spelling returns an empty
list.
Matching is substring-based and case-insensitive over brand, resolved model
name and raw Build.MODEL, ranked by exact match then popularity.
Parameterslimitqueryrequired