# Energy grid carbon intensity (Great Britain) API

Retrieve GB grid-carbon intensity by postcode or region via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as output, postcode, raw, and retrieve structured data including carbon-intensity unit, period start timestamp, forecast carbon intensity, actual-estimate carbon intensity, and source attribution for carbon display, and forecast view.

Documentation: https://openany.si/market/apis/energy/energy-grid-carbon-intensity-great-britain-api/?offering=89850a47-6851-4213-96c4-935cae645132
API ID: 89850a47-6851-4213-96c4-935cae645132
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/energy/v1/carbon-intensity
Page update time: 2026-12-03T02:46:18.416Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:46:16.430Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits used",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Energy grid carbon intensity (Great Britain) API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "postcode": {
          "type": "string",
          "description": "Outward postcode (e.g. SW1A, RG10) for its region."
        },
        "region_id": {
          "type": "integer",
          "description": "Region id 1-17 (see /energy/v1/carbon-regions)."
        },
        "hours": {
          "type": "integer",
          "description": "Forecast hours ahead (1-48, half-hourly periods)."
        },
        "from": {
          "type": "string",
          "description": "Start time (YYYY-MM-DDTHH:MMZ, default now); national with no hours: the 24 hours to this time."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. CSV and NDJSON exports are not supported; omit output or send json.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "attribution": {
      "type": "string"
    },
    "cached": {
      "type": "boolean"
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "dno_region": {
      "type": "string"
    },
    "fetched_at": {
      "type": "string"
    },
    "periods": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "actual_gco2_kwh": {
            "type": "null"
          },
          "forecast_gco2_kwh": {
            "type": "integer"
          },
          "from": {
            "type": "string"
          },
          "generation_mix": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fuel": {
                  "type": "string"
                },
                "percent": {
                  "type": "number"
                }
              }
            }
          },
          "index": {
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        }
      }
    },
    "postcode": {
      "type": "string"
    },
    "region": {
      "type": "string"
    },
    "region_id": {
      "type": "integer"
    },
    "scope": {
      "type": "string"
    },
    "unit": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH recording · HTTP 200
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/energy/v1/carbon-intensity?output=json&postcode=SW1A&raw=0' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "attribution": "Source: National Energy System Operator, Carbon Intensity API (CC BY 4.0)",
  "cached": false,
  "count": 1,
  "credits_used": 1,
  "dno_region": "UKPN London",
  "fetched_at": "2026-11-19T09:21:13.756Z",
  "periods": [
    {
      "actual_gco2_kwh": null,
      "forecast_gco2_kwh": 231,
      "from": "2026-11-19T08:30Z",
      "generation_mix": [
        {
          "fuel": "biomass",
          "percent": 1.6
        },
        {
          "fuel": "coal",
          "percent": 0
        },
        {
          "fuel": "imports",
          "percent": 35.3
        },
        {
          "fuel": "gas",
          "percent": 40.4
        },
        {
          "fuel": "nuclear",
          "percent": 8.9
        },
        {
          "fuel": "other",
          "percent": 0
        },
        {
          "fuel": "hydro",
          "percent": 0.1
        },
        {
          "fuel": "solar",
          "percent": 1.2
        },
        {
          "fuel": "wind",
          "percent": 12.4
        }
      ],
      "index": "very high",
      "to": "2026-11-19T09:00Z"
    }
  ],
  "postcode": "SW1A",
  "region": "London",
  "region_id": 13,
  "scope": "regional",
  "unit": "gCO2/kWh"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- apish: https://openany.si/market/apis/energy/energy-grid-carbon-intensity-great-britain-api/?offering=89850a47-6851-4213-96c4-935cae645132

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
