Naar de inhoud
GET /v1/postcode

Intensity by UK postcode

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/carbonintensity-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

curl "https://api.oanor.com/carbonintensity-api/v1/postcode" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/carbonintensity-api/v1/postcode", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/carbonintensity-api/v1/postcode");
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/postcode",
    headers={"x-oanor-key": "oanor_test_..."}
)

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste health check.

{
    "data": {
        "to": "2026-06-01T00:00Z",
        "dno": "SSE South",
        "from": "2026-05-31T23:30Z",
        "name": "South England",
        "region": {
            "dno": "SSE South",
            "name": "South England",
            "index": "very high",
            "forecast": 249,
            "region_id": 12,
            "generation_mix": [
                {
                    "fuel": "biomass",
                    "percent": 5.1
                },
                {
                    "fuel": "coal",
                    "percent": 0
                },
                {
                    "fuel": "imports",
                    "percent": 29.8
                },
                {
                    "fuel": "gas",
                    "percent": 57.8
                },
                {
                    "fuel": "nuclear",
                    "percent": 1.3
                },
                {
                    "fuel": "other",
                    "percent": 0
                },
                {
                    "fuel": "hydro",
                    "percent": 0
                },
                {
                    "fuel": "solar",
                    "percent": 0
                },
                {
                    "fuel": "wind",
                    "percent": 6
                }
            ]
        },
        "postcode": "RG10",
        "region_id": 12
    },
    "meta": {
        "timestamp": "2026-06-01T00:03:37.947Z",
        "request_id": "e27eb139-edc2-4d3d-8b26-b05dc287f7d8"
    },
    "status": "ok",
    "message": "Postcode retrieved",
    "success": true
}