# France Electricity Mix & CO2 Intensity (RTE eCO2mix) (`ferqli/france-electricity-mix`) Actor

France's power consumption, generation by source, CO2 intensity and cross-border flows from RTE eCO2mix open data. National and 12 regions, every 15 minutes, 2012 to now.

- **URL**: https://apify.com/ferqli/france-electricity-mix.md
- **Developed by:** [Victor Cnockaert](https://apify.com/ferqli) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 area-day delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## France Electricity Mix & CO2 Intensity (RTE eCO2mix)

Get France's electricity data as a clean table: **consumption, generation by source (nuclear, wind, solar, hydro, gas, coal, oil, bioenergy), CO2 intensity, CO2 emissions, net imports and commercial exchanges with each neighbour**, for France and its 12 mainland regions, every 15 minutes, **from 2012 to the latest quarter-hour**.

The data is RTE's official **eCO2mix** data (RTE operates the French transmission grid), published on the ODRE open data portal under the **Licence Ouverte v2.0 (Etalab)**, which allows commercial reuse. No website is scraped.

### Why use this Actor instead of the portal

- **One continuous series**: RTE publishes real-time data (last ~46 days) and consolidated/definitive history (since 2012) as separate datasets with different resolutions. The Actor stitches them together, with no gap and no duplicate, and keeps the most final version of each interval (`dataStatus`: realtime, consolidated or definitive).
- **Clean rows**: the portal publishes placeholder rows for future quarter-hours and empty quarter-hours in the half-hourly history. They are removed. Numbers stored as text are converted. Field names are in English, units are in the names (`MW`, `MWh`, `GPerKWh`, `Pct`).
- **Ready-made indicators**: total production, renewable share, low-carbon share (renewables + nuclear), fossil share, CO2 emissions in tonnes per hour (France).
- **Hourly and daily resolution**: hourly averages, or one row per day with energy in MWh and CO2 emissions in tonnes. CO2 intensity is weighted by production, not a plain average. Daylight saving days have 23 or 25 hours, as they should.
- **French days**: periods are French calendar days (Europe/Paris); every row also has a UTC timestamp.

### Use cases

- **Carbon accounting and scope 2**: hourly or daily grid CO2 intensity for France, to time consumption or report location-based emissions.
- **Smart charging and load shifting**: run it every hour in *Latest interval* mode and trigger EV charging, heat pumps or batch jobs when CO2 intensity is low.
- **Energy analysis and dashboards**: nuclear availability, wind and solar records, export balance, regional self-sufficiency.
- **Forecasting and machine learning**: 14 years of quarter-hourly demand with RTE's own day-ahead and intraday forecasts alongside.

### Input

| Field | Example | Notes |
|---|---|---|
| What to fetch | A period / Latest interval only | Latest = newest published quarter-hour of each area |
| France (national) | on | CO2 intensity, detailed breakdown and border exchanges are national only |
| Regions | Hauts-de-France, Bretagne, All 12 regions | Corsica is not on the RTE grid |
| Last N days | 7 | Used when no dates are given |
| Start / end date | 2024-01-01 / 2024-12-31 | France from 2012-01-01, regions from 2013-01-01 |
| Resolution | raw / hourly / daily | Raw = 15 min recent data, 30 min consolidated history |
| Include detailed breakdown | off | France: gas combined cycle / turbines / cogeneration, hydro run-of-river / reservoirs / pumped storage, bioenergy sub-types. Regions: coverage rate and load factor per source |

### Output example (daily, France)

```json
{
  "area": "France",
  "regionCode": null,
  "localDate": "2026-08-31",
  "dataStatus": "consolidated",
  "intervals": 48,
  "consumptionMW": 44280,
  "nuclearMW": 35807.9,
  "windMW": 10212.5,
  "solarMW": 5640.7,
  "hydroMW": 3738.9,
  "gasMW": 1195.5,
  "netImportMW": -12668.5,
  "co2IntensityGPerKWh": 12.7,
  "totalProductionMW": 57843.3,
  "renewableSharePct": 35.9,
  "lowCarbonSharePct": 97.8,
  "fossilSharePct": 2.2,
  "hoursCovered": 24,
  "consumptionMWh": 1062720,
  "productionMWh": 1388239,
  "co2EmissionsTonnes": 17630,
  "source": "RTE eCO2mix via ODRE (odre.opendatasoft.com), Licence Ouverte v2.0 (Etalab)"
}
```

(Selected fields from a real run. Negative `netImportMW` means France exported. `pumpedStorageConsumptionMW` and `batteryChargingMW` are negative when energy is stored.)

Export as CSV, Excel or JSON, or connect the dataset to Google Sheets, Make, Zapier or your database from the Apify console.

### Pricing

You pay **per area-day**: one area (France or one region) for one day of data, **whatever the resolution**. A day of quarter-hours, of hours, or a single daily row costs the same. A *Latest interval* snapshot of one area counts as one area-day.

Examples: one year of national data = 365 area-days. A daily snapshot of the 12 regions = 12 area-days.

Set the run's maximum cost: the Actor stops cleanly when it is reached and never charges for a day it did not deliver.

### Respect for the source

- The Actor uses the portal's bulk export endpoint: **one request per month of data and per area type**, a few requests per run.
- The portal limits each dataset to 50,000 calls per month. The Actor reads the remaining quota from every response and stops before draining it, so it never locks other users of this public service out.
- Requests are spaced (at most 2 per second) and retried with backoff if the portal asks to slow down.

### Data notes

- **Real-time vs consolidated**: real-time values are provisional; RTE replaces them with consolidated data a few weeks later and with definitive data in the following year. Each row says which version it is.
- **CO2 intensity** is published by RTE for France only. It covers French generation (not imports).
- **Latest data** is usually 15 to 60 minutes behind real time.
- Regional data does not include CO2 intensity; it includes coverage rates (share of the region's consumption produced by each source) and load factors when you include the detailed breakdown.

### Data source and licence

Data: RTE - eCO2mix, published on the Open Data Réseaux Énergies (ODRE) portal, [odre.opendatasoft.com](https://odre.opendatasoft.com/), under the [Licence Ouverte v2.0 (Etalab)](https://www.etalab.gouv.fr/licence-ouverte-open-licence/). Every row carries its source and retrieval time (`source`, `retrievedAt`), as the licence requires when you reuse the data.

This Actor is an independent tool. It is not affiliated with, endorsed by or operated by RTE or the ODRE portal.

### FAQ

**Why do recent days show `realtime` and older days `consolidated`?** That is how RTE publishes: provisional data first, consolidated later. Re-run a past period later to get the final values.

**Why are some fields empty for older years?** Some breakdowns (offshore wind, battery storage, some sub-types) were not published separately in older data; the Actor leaves them empty rather than guessing.

**Something is wrong or missing?** Open an issue on the Actor's Issues tab; it is read and answered.

# Actor input Schema

## `mode` (type: `string`):

A period of history (from 2012), or only the latest published 15-minute interval (for monitoring and alerts).

## `national` (type: `boolean`):

National data, including CO2 intensity, detailed gas/oil/hydro/bioenergy breakdown and commercial exchanges with each neighbour.

## `regions` (type: `array`):

Mainland regions (Corsica is not on the RTE grid). Regional data adds coverage rates and load factors per source but no CO2 intensity.

## `lastDays` (type: `integer`):

Used when no start or end date is given: the last N days up to today (France time).

## `startDate` (type: `string`):

First day (France time), from 2012-01-01 for France and 2013-01-01 for regions.

## `endDate` (type: `string`):

Last day, included. Empty = today.

## `granularity` (type: `string`):

Raw: every interval as published (15 min recent data, 30 min for consolidated history). Hourly: hourly averages. Daily: one row per day with energy in MWh and CO2 in tonnes.

## `includeDetails` (type: `boolean`):

France: gas (combined cycle, turbines, cogeneration), oil, hydro (run-of-river, reservoirs, pumped storage) and bioenergy sub-types. Regions: coverage rate and load factor per source.

## Actor input object example

```json
{
  "mode": "range",
  "national": true,
  "lastDays": 7,
  "granularity": "hourly",
  "includeDetails": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "lastDays": 7
};

// Run the Actor and wait for it to finish
const run = await client.actor("ferqli/france-electricity-mix").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "lastDays": 7 }

# Run the Actor and wait for it to finish
run = client.actor("ferqli/france-electricity-mix").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "lastDays": 7
}' |
apify call ferqli/france-electricity-mix --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ferqli/france-electricity-mix"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/iUrHKRR4yldeQFEfw/builds/3hKmh4VmZiPc8C5ro/openapi.json
