---
id: "energy_amount"
kind: "datatype"
status: "draft"
is_pii: false
name: "Amount of energy"
regexp: "^-?\\d+(?:[.,]\\d+)?\\s?(?:[kMGT]?Wh|[kMGTP]?J|kcal)$"
categories: ["energy", "values"]
langs: ["common"]
quality: 90
url: "https://registry.apicrafter.io/datatype/energy_amount"
---

# Amount of energy (`energy_amount`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

A quantity of energy, most often electricity generated, consumed or exported over a period: in watt-hours and their multiples (Wh, kWh, MWh, GWh), in joules (kJ, MJ, GJ, PJ) or, for food, in kilocalories. Meter readings, solar generation logs and energy statistics write it as a number with the unit in the column name (energy_generated in kWh of the solar systems of Camden Council, New South Wales; consumption_kwh) or in the value. Power (kW) is a rate, not an amount of energy. The regular expression recognizes values that carry the unit.

- Parent datatype: [`numeric`](https://registry.apicrafter.io/datatype/numeric.md)
- Personal data (PII): no
- Categories: Energy (electricity, gas, metering) (energy), All measurable values (percentage, amount and e.t.c) (values)
- Countries: global
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^-?\d+(?:[.,]\d+)?\s?(?:[kMGT]?Wh|[kMGTP]?J|kcal)$
```

## Examples

- `9.059 kWh` — hourly output of a council building's solar system
- `1200 MWh`
- `35 GJ`
- `5 kW` (invalid example) — a power, not an amount of energy

## Metacrafter rules

1 rules: 1 match the field name, 0 match values.

- `energyamountbyname` (field, `common/values.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Translations

- ru: Количество энергии

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Kilowatt-hour>
- wikidata: <https://www.wikidata.org/wiki/Q11379>

## Quality

Score 90/100. Missing: mapping (Wikidata, Schema.org, ...).

JSON: <https://registry.apicrafter.io/api/v1/datatypes/energy_amount.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/values/energy_amount.yaml>
