/v1/forecast
Today half-hourly intensity
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/carbonintensity-api/v1/forecast" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/carbonintensity-api/v1/forecast", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/carbonintensity-api/v1/forecast");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/carbonintensity-api/v1/forecast",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"count": 48,
"periods": [
{
"to": "2026-05-31T23:30Z",
"from": "2026-05-31T23:00Z",
"index": "high",
"actual": null,
"forecast": 187
},
{
"to": "2026-06-01T00:00Z",
"from": "2026-05-31T23:30Z",
"index": "high",
"actual": null,
"forecast": 183
},
{
"to": "2026-06-01T00:30Z",
"from": "2026-06-01T00:00Z",
"index": "high",
"actual": null,
"forecast": 184
},
{
"to": "2026-06-01T01:00Z",
"from": "2026-06-01T00:30Z",
"index": "high",
"actual": null,
"forecast": 183
},
{
"to": "2026-06-01T01:30Z",
"from": "2026-06-01T01:00Z",
"index": "high",
"actual": null,
"forecast": 183
},
{
"to": "2026-06-01T02:00Z",
"from": "2026-06-01T01:30Z",
"index": "high",
"actual": null,
"forecast": 180
},
{
"to": "2026-06-01T02:30Z",
"from": "2026-06-01T02:00Z",
"index": "high",
"actual": null,
"forecast": 172
},
{
"to": "2026-06-01T03:00Z",
"from": "2026-06-01T02:30Z",
"index": "moderate",
"actual": null,
"forecast": 109
},
{
"to": "2026-06-01T03:30Z",
"from": "2026-06-01T03:00Z",
"index": "moderate",
"actual": null,
"forecast": 107
},
{
"to": "2026-06-01T04:00Z",
"from": "2026-06-01T03:30Z",
"index": "moderate",
"actual": null,
"forecast": 111
},
{
"to": "2026-06-01T04:30Z",
"from": "2026-06-01T04:00Z",
"index": "moderate",
"actual": null,
"forecast": 112
},
{
"to": "2026-06-01T05:00Z",
"from": "2026-06-01T04:30Z",
"index": "moderate",
"actual": null,
"forecast": 112
},
{
"to": "2026-06-01T05:30Z",
"from": "2026-06-01T05:00Z",
"index": "moderate",
"actual": null,
"forecast": 111
},
{
"to": "2026-06-01T06:00Z",
"from": "2026-06-01T05:30Z",
"index": "moderate
…