Microproduct Data Guideintermediate

Ember Electricity Data

Open country electricity generation, demand, and carbon-intensity series for building energy-transition comparison and power-mix monitoring tools.

Report a Problem

At a Glance

Difficulty
Intermediate — some data preparation helps
Size
Tiny · ≤0.05 GB
Formats
JSON, CSV
Access
API or Download
API Key
Required
Provider
Ember
Updates
Monthly
Last Verified
Aug 20, 2026
Source Type
Nonprofit source
  • Python syntax checked

From Source to Product Signal

Test a Product Idea in Four Steps

Ember publishes compiled country electricity statistics through a REST API. Start with yearly generation for one country and a few recent years. This is not a live grid feed — U.S. operations belong on EIA hourly data and EU transparency on ENTSO-E — and monthly coverage is limited to a subset of countries.

1

Check the Setup

  • Python 3.10 or newer
  • A notebook environment such as Jupyter or Google Colab
  • A free Ember API key saved in the EMBER_API_KEY environment variable
2

Access the Data

  1. 1.Register for a free Ember API key and save it in the EMBER_API_KEY environment variable.
  2. 2.Request yearly electricity generation for one country and a bounded start year.
  3. 3.Keep entity, series, date, and generation values with the retrieval timestamp.
Open Official Source
3

Run the Python Example

Install the packages, then run the notebook cell.

python -m pip install pandas requests

import os
import pandas as pd
import requests

response = requests.get(
    "https://api.ember-energy.org/v1/electricity-generation/yearly",
    params={
        "entity_code": "USA",
        "is_aggregate_series": "false",
        "start_date": "2020",
        "api_key": os.environ["EMBER_API_KEY"],
    },
    timeout=30,
)
response.raise_for_status()
generation = pd.json_normalize(response.json().get("data", response.json()))
generation["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(generation.head(20))
4

Test a Useful Signal

Compare U.S. and German yearly generation mix

Test whether Ember yearly generation can power a bounded energy-transition comparison.

  1. 01Repeat the request for DEU and keep comparable series such as coal, gas, wind, and solar.
  2. 02Chart share or TWh by series for the overlapping years.
  3. 03Cite Ember under CC BY 4.0 and explain that yearly compiled statistics are not real-time grid operations.

Dataset Details

Ember is a nonprofit source. Last verified 2026-08-20. Temporal coverage: yearly series from 2000-present with monthly coverage for a smaller country set.

Geography

Formats

Provider

Ember

Data Terms

Creative Commons Attribution 4.0 International

Send Feedback