# Energy gB carbon intensity statistics API

Retrieve GB national carbon-intensity statistics over up to 30 days via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as from, output, raw, and retrieve structured data including national source scope, block start timestamp, average source intensity, minimum source intensity, and maximum source intensity for period summary, and metric display.

Documentation: https://openany.si/market/apis/energy/energy-gb-carbon-intensity-statistics-api/?offering=67d794d8-9066-4a4e-b8cb-a1183d1c14a2
API ID: 67d794d8-9066-4a4e-b8cb-a1183d1c14a2
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/energy/v1/carbon-stats
Page update time: 2026-12-03T02:46:18.445Z
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.634Z. 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 gB carbon intensity statistics 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": {
        "from": {
          "type": "string",
          "description": "Start (YYYY-MM-DD or YYYY-MM-DDTHH:MMZ)."
        },
        "to": {
          "type": "string",
          "description": "End (YYYY-MM-DD or YYYY-MM-DDTHH:MMZ), up to 30 days after from. Default: now, or 30 days after from when that is earlier."
        },
        "block": {
          "type": "integer",
          "description": "Split into blocks of this many hours (1-24)."
        },
        "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"
    },
    "block_hours": {
      "type": "null"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "average_gco2_kwh": {
            "type": "integer"
          },
          "from": {
            "type": "string"
          },
          "index": {
            "type": "string"
          },
          "max_gco2_kwh": {
            "type": "integer"
          },
          "min_gco2_kwh": {
            "type": "integer"
          },
          "to": {
            "type": "string"
          }
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "fetched_at": {
      "type": "string"
    },
    "from": {
      "type": "string"
    },
    "region": {
      "type": "string"
    },
    "scope": {
      "type": "string"
    },
    "to": {
      "type": "string"
    },
    "unit": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/energy/v1/carbon-stats?from=2026-10-01&output=json&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)",
  "block_hours": null,
  "blocks": [
    {
      "average_gco2_kwh": 112,
      "from": "2026-10-01T00:00Z",
      "index": "moderate",
      "max_gco2_kwh": 247,
      "min_gco2_kwh": 31,
      "to": "2026-10-31T00:00Z"
    }
  ],
  "cached": false,
  "count": 1,
  "credits_used": 1,
  "fetched_at": "2026-11-19T12:20:09.752Z",
  "from": "2026-10-01T00:00Z",
  "region": "Great Britain",
  "scope": "national",
  "to": "2026-10-31T00:00Z",
  "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-gb-carbon-intensity-statistics-api/?offering=67d794d8-9066-4a4e-b8cb-a1183d1c14a2

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