NAV Navbar
Shell HTTP JavaScript Node.JS Ruby Python Java
  • Carbon Intensity API
  • Carbon Intensity - National
  • Statistics - National
  • Generation Mix - Nationalbeta
  • Carbon Intensity - Regionalbeta
  • Schemas
  • Regions
  • Carbon Intensity API Great Britain

    Scroll down for code samples and responses.

    Introduction
    This is the Official Carbon Intensity API for Great Britain developed by National Grid. You can find out more about carbon intensity at carbonintensity.org.uk.

    Summary
    National Grid’s Carbon Intensity API provides an indicative trend of regional carbon intensity of the electricity system in Great Britain (GB) up to 2 days ahead of real-time. It provides programmatic and timely access to both forecast and estimated carbon intensity data. The Carbon Intensity forecast includes CO2 emissions related to electricity generation only. The includes emissions from all large metered power stations, interconnector imports, transmission and distribution losses, and accounts for national electricity demand, embedded wind and solar generation.

    Base URL: api.carbonintensity.org.uk

    Further Information
    Methodology: National Forecast and Regional Forecast
    Terms: API Terms of Use
    Email: Alasdair Bruce or Lyndon Ruff
    License: CC BY 4.0

    Carbon Intensity - National

    Carbon Intensity data

    GET /intensity

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/intensity \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/intensity HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/intensity',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/intensity',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/intensity',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/intensity', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/intensity");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for current half hour

    Get Carbon Intensity data for current half hour. All times provided in UTC (+00:00).

    Example responses

    {
      "data":[
        {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "forecast": 266,
          "actual": 263,
          "index": "moderate"
        }
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Intensity
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /intensity/date

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/intensity/date \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/intensity/date HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/intensity/date',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/intensity/date',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/intensity/date',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/intensity/date', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/intensity/date");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for today

    Get Carbon Intensity data for today. All times provided in UTC (+00:00).

    Example responses

    {
      "data":[
        {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "forecast": 266,
          "actual": 263,
          "index": "moderate"
        }
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Intensity
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /intensity/date/{date}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/intensity/date/{date} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/intensity/date/{date} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/intensity/date/{date}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/intensity/date/{date}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/intensity/date/{date}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/intensity/date/{date}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/intensity/date/{date}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for specific date

    Get Carbon Intensity data for a specific date. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    date path string true Date in YYYY-MM-DD format e.g. 2017-08-25

    Example responses

    {
      "data":[
        {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "forecast": 266,
          "actual": 263,
          "index": "moderate"
        }
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Intensity
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /intensity/date/{date}/{period}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/intensity/date/{date}/{period} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/intensity/date/{date}/{period} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/intensity/date/{date}/{period}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/intensity/date/{date}/{period}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/intensity/date/{date}/{period}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/intensity/date/{date}/{period}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/intensity/date/{date}/{period}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for specific date and period

    Get Carbon Intensity data for a specific date and half hour settlement period. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    date path string true Date in YYYY-MM-DD format e.g. 2017-08-25
    period path string true Half hour settlement period between 1-48 e.g. 42

    Example responses

    {
      "data":[
        {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "forecast": 266,
          "actual": 263,
          "index": "moderate"
        }
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Intensity
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /intensity/factors

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/intensity/factors \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/intensity/factors HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/intensity/factors',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/intensity/factors',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/intensity/factors',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/intensity/factors', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/intensity/factors");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity factors for each fuel type

    Get Carbon Intensity factors for each fuel type.

    Example responses

    {
      "data":[
      {
        "Biomass": 120,
        "Coal": 937,
        "Dutch Imports": 474,
        "French Imports": 53,
        "Gas (Combined Cycle)": 394,
        "Gas (Open Cycle)": 651,
        "Hydro": 0,
        "Irish Imports": 458,
        "Nuclear": 0,
        "Oil": 935,
        "Other": 300,
        "Pumped Storage": 0,
        "Solar": 0,
        "Wind": 0
      }]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Factors
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /intensity/{from}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/intensity/{from} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/intensity/{from} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/intensity/{from}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/intensity/{from}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/intensity/{from}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/intensity/{from}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/intensity/{from}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for specific half hour period

    Get Carbon Intensity data for specific half hour period. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z

    Example responses

    {
      "data":[
        {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "forecast": 266,
          "actual": 263,
          "index": "moderate"
        }
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Intensity
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /intensity/{from}/fw24h

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/intensity/{from}/fw24h \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/intensity/{from}/fw24h HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/intensity/{from}/fw24h',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/intensity/{from}/fw24h',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/intensity/{from}/fw24h',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/intensity/{from}/fw24h', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/intensity/{from}/fw24h");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data 24hrs forwards from specific datetime

    Get Carbon Intensity data between the {from} datetime specified and 24hrs before. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Start datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z

    Example responses

    {
      "data":[
        {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "forecast": 266,
          "actual": 263,
          "index": "moderate"
        }
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Intensity
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /intensity/{from}/fw48h

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/intensity/{from}/fw48h \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/intensity/{from}/fw48h HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/intensity/{from}/fw48h',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/intensity/{from}/fw48h',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/intensity/{from}/fw48h',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/intensity/{from}/fw48h', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/intensity/{from}/fw48h");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data 48hrs forwards from specific datetime

    Get Carbon Intensity data between the {from} datetime specified and 48hrs after. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Start datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z

    Example responses

    {
      "data":[
        {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "forecast": 266,
          "actual": 263,
          "index": "moderate"
        }
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Intensity
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /intensity/{from}/pt24h

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/intensity/{from}/pt24h \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/intensity/{from}/pt24h HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/intensity/{from}/pt24h',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/intensity/{from}/pt24h',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/intensity/{from}/pt24h',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/intensity/{from}/pt24h', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/intensity/{from}/pt24h");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data 24hrs in the past of a specific datetime

    Get Carbon Intensity data between the {from} datetime specified and 24hrs before. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Start datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z

    Example responses

    {
      "data":[
        {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "forecast": 266,
          "actual": 263,
          "index": "moderate"
        }
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Intensity
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /intensity/{from}/{to}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/intensity/{from}/{to} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/intensity/{from}/{to} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/intensity/{from}/{to}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/intensity/{from}/{to}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/intensity/{from}/{to}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/intensity/{from}/{to}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/intensity/{from}/{to}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data between from and to datetime

    Get Carbon Intensity data between the {from} and {to} datetimes. The maximum date range is limited to 14 days. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Start datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    to path string true End datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z

    Example responses

    {
      "data":[
        {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "forecast": 266,
          "actual": 263,
          "index": "moderate"
        }
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Intensity
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    Statistics

    Carbon Intensity statistics

    GET /intensity/stats/{from}/{to}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/intensity/stats/{from}/{to} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/intensity/stats/{from}/{to} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/intensity/stats/{from}/{to}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/intensity/stats/{from}/{to}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/intensity/stats/{from}/{to}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/intensity/stats/{from}/{to}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/intensity/stats/{from}/{to}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity statistics between from and to datetime

    Get Carbon Intensity statistics (average, max, mean) between from and to datetime. The maximum date range is limited to 30 days. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Start datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    to path string true End datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-26T17:00Z

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "max": 320,
          "average": 266,
          "min": 180,
          "index": "moderate"
        }
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Statistics
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /intensity/stats/{from}/{to}/{block}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/intensity/stats/{from}/{to}/{block} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/intensity/stats/{from}/{to}/{block} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/intensity/stats/{from}/{to}/{block}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/intensity/stats/{from}/{to}/{block}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/intensity/stats/{from}/{to}/{block}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/intensity/stats/{from}/{to}/{block}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/intensity/stats/{from}/{to}/{block}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get block average Carbon Intensity statistics between from and to datetime

    Get block average Carbon Intensity statistics (average, max, mean) between from and to datetime. The maximum date range is limited to 30 days. The block length must be between 1 and 24 hours and should be an integer. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Start datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. '2017-08-25T12:35Z'
    to path string true End datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. '2017-08-26T17:00Z'
    block path string true Block length in hours i.e. a block length of 2 hrs over a 24 hr period returns 12 items with the average, max, min for each 2 hr block e.g. 2017-08-26T17:00Z/2017-08-27T17:00Z/2

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "max": 320,
          "average": 266,
          "min": 180,
          "index": "moderate"
        }
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Statistics
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    Generation Mixbeta

    Generation Mix for the GB power system. Contains the following fuel types: gas, coal, nuclear, biomass, hydro, imports, solar, wind, other.

    GET /generation

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/generation \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/generation HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/generation',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/generation',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/generation',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/generation', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/generation");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get generation mix for current half hour

    Get generation mix for current half hour. All times provided in UTC (+00:00).

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "generationmix": [
          {
            "fuel": "gas",
            "perc": 43.6
          },
          {
            "fuel": "coal",
            "perc": 0.7
          },
          {
            "fuel": "biomass",
            "perc": 4.2
          },
          {
            "fuel": "nuclear",
            "perc": 17.6
          },
          {
            "fuel": "hydro",
            "perc": 1.1
          },
          {
            "fuel": "imports",
            "perc": 6.5
          },
          {
            "fuel": "other",
            "perc": 0.3
          },
          {
            "fuel": "wind",
            "perc": 6.8
          },
          {
            "fuel": "solar",
            "perc": 18.1
          }
        ]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Generation
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /generation/{from}/pt24h

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/generation/{from}/pt24h \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/generation/{from}/pt24h HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/generation/{from}/pt24h',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/generation/{from}/pt24h',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/generation/{from}/pt24h',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/generation/{from}/pt24h', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/generation/{from}/pt24h");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get generation mix for the past 24 hours

    Get generation mix for the past 24 hours. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "generationmix": [
          {
            "fuel": "gas",
            "perc": 43.6
          },
          {
            "fuel": "coal",
            "perc": 0.7
          },
          {
            "fuel": "biomass",
            "perc": 4.2
          },
          {
            "fuel": "nuclear",
            "perc": 17.6
          },
          {
            "fuel": "hydro",
            "perc": 1.1
          },
          {
            "fuel": "imports",
            "perc": 6.5
          },
          {
            "fuel": "other",
            "perc": 0.3
          },
          {
            "fuel": "wind",
            "perc": 6.8
          },
          {
            "fuel": "solar",
            "perc": 18.1
          }
        ]
      }]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Generation
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /generation/{from}/{to}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/generation/{from}/{to} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/generation/{from}/{to} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/generation/{from}/{to}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/generation/{from}/{to}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/generation/{from}/{to},
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/generation/{from}/{to}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/generation/{from}/{to}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get generation mix between from and to datetimes

    Get generation mix between from and to datetimes. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Start Datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    to path string true End datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "generationmix": [
          {
            "fuel": "gas",
            "perc": 43.6
          },
          {
            "fuel": "coal",
            "perc": 0.7
          },
          {
            "fuel": "biomass",
            "perc": 4.2
          },
          {
            "fuel": "nuclear",
            "perc": 17.6
          },
          {
            "fuel": "hydro",
            "perc": 2.2
          },
          {
            "fuel": "imports",
            "perc": 6.5
          },
          {
            "fuel": "other",
            "perc": 0.3
          },
          {
            "fuel": "wind",
            "perc": 6.8
          },
          {
            "fuel": "solar",
            "perc": 18.1
          }
        ]
      }]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Generation
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    Carbon Intensity - Regionalbeta

    Regional Carbon Intensity data

    GET /regional

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for current half hour for GB regions

    Get Regional Carbon Intensity data for current half hour. All times provided in UTC (+00:00).

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "regions":[
        {
          "regionid": 3,
          "dnoregion": "Electricity North West",
          "shortname": "North West England",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional From-To
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/england

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/england \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/england',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/england',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/england',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/england', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/england");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for current half hour for England

    Get Carbon Intensity data for current half hour for England. All times provided in UTC (+00:00).

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "regions":[
        {
          "regionid": 15,
          "dnoregion": "England",
          "shortname": "England",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional From-To
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/scotland

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/scotland \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/scotland',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/scotland',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/scotland',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/scotland', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/scotland");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for current half hour for Scotland

    Get Carbon Intensity data for current half hour for Scotland. All times provided in UTC (+00:00).

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "regions":[
        {
          "regionid": 16,
          "dnoregion": "Scotland",
          "shortname": "Scotland",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional From-To
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/wales

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/wales \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/wales',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/wales',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/wales',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/wales', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/wales");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for current half hour for Wales

    Get Carbon Intensity data for current half hour for Wales. All times provided in UTC (+00:00).

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "regions":[
        {
          "regionid": 17,
          "dnoregion": "Wales",
          "shortname": "Wales",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional From-To
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/postcode/{postcode}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/postcode/{postcode} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/postcode/{postcode} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/postcode/{postcode}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/postcode/{postcode}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/postcode/{postcode}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/postcode/{postcode}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/postcode/{postcode}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for current half hour for specified postcode

    Get Regional Carbon Intensity data for current half hour for specified postcode. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    postcode path string true Outward postcode i.e. RG41 or SW1 or TF8. Do not include full postcode, outward postcode only.

    Example responses

    
    {
      "data":[
      {
        "regionid": 3,
        "dnoregion": "Electricity North West",
        "shortname": "North West England",
        "postcode": "RG10",
        "data":[
        {
          "from": "2018-01-20T12:00Z",
          "to": "2018-01-20T12:30Z",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional ID
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/regionid/{regionid}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/regionid/{regionid} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/regionid/{regionid} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/regionid/{regionid}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/regionid/{regionid}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/regionid/{regionid}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/regionid/{regionid}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/regionid/{regionid}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for current half hour for specified region

    Get Regional Carbon Intensity data for current half hour for specified region. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    regionid path string true Region ID of GB region. See list of Region IDs here.

    Example responses

    
    {
      "data":[
      {
        "regionid": 3,
        "dnoregion": "Electricity North West",
        "shortname": "North West England",
        "data":[
        {
          "from": "2018-01-20T12:00Z",
          "to": "2018-01-20T12:30Z",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional ID
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/intensity/{from}/fw24h

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for next 24h for GB regions

    Get Regional Carbon Intensity data for next 24h. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "regions":[
        {
          "regionid": 3,
          "dnoregion": "Electricity North West",
          "shortname": "North West England",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional From-To
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/intensity/{from}/fw24h/postcode/{postcode}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/postcode/{postcode} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/postcode/{postcode} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/postcode/{postcode}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/postcode/{postcode}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/postcode/{postcode}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/postcode/{postcode}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/postcode/{postcode}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for next 24h for specified postcode

    Get Regional Carbon Intensity data for next 24h for specified postcode. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    postcode path string true Outward postcode i.e. RG41 or SW1 or TF8. Do not include full postcode, outward postcode only.

    Example responses

    
    {
      "data":[
      {
        "regionid": 3,
        "dnoregion": "Electricity North West",
        "shortname": "North West England",
        "postcode": "RG10",
        "data":[
        {
          "from": "2018-01-20T12:00Z",
          "to": "2018-01-20T12:30Z",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional ID
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/intensity/{from}/fw24h/regionid/{regionid}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/regionid/{regionid} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/regionid/{regionid} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/regionid/{regionid}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/regionid/{regionid}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/regionid/{regionid}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/regionid/{regionid}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/intensity/{from}/fw24h/regionid/{regionid}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for next 24h for specified region

    Get Regional Carbon Intensity data for next 24h for specified region. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    regionid path string true Region ID of GB region. See list of Region IDs here.

    Example responses

    
    {
      "data":[
      {
        "regionid": 3,
        "dnoregion": "Electricity North West",
        "shortname": "North West England",
        "data":[
        {
          "from": "2018-01-20T12:00Z",
          "to": "2018-01-20T12:30Z",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional ID
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/intensity/{from}/fw48h

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for next 48h for GB regions

    Get Regional Carbon Intensity data for next 48h. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "regions":[
        {
          "regionid": 3,
          "dnoregion": "Electricity North West",
          "shortname": "North West England",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional From-To
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/intensity/{from}/fw48h/postcode/{postcode}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/postcode/{postcode} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/postcode/{postcode} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/postcode/{postcode}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/postcode/{postcode}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/postcode/{postcode}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/postcode/{postcode}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/postcode/{postcode}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for next 48h for specified postcode

    Get Regional Carbon Intensity data for next 48h for specified postcode. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    postcode path string true Outward postcode i.e. RG41 or SW1 or TF8. Do not include full postcode, outward postcode only.

    Example responses

    
    {
      "data":[
      {
        "regionid": 3,
        "dnoregion": "Electricity North West",
        "shortname": "North West England",
        "postcode": "RG10",
        "data":[
        {
          "from": "2018-01-20T12:00Z",
          "to": "2018-01-20T12:30Z",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional ID
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/intensity/{from}/fw48h/regionid/{regionid}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/regionid/{regionid} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/regionid/{regionid} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/regionid/{regionid}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/regionid/{regionid}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/regionid/{regionid}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/regionid/{regionid}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h/regionid/{regionid}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for next 48h for specified region

    Get Regional Carbon Intensity data for next 48h for specified region. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    regionid path string true Region ID of GB region. See list of Region IDs here.

    Example responses

    
    {
      "data":[
      {
        "regionid": 3,
        "dnoregion": "Electricity North West",
        "shortname": "North West England",
        "data":[
        {
          "from": "2018-01-20T12:00Z",
          "to": "2018-01-20T12:30Z",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional ID
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/intensity/{from}/pt24h

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for past 24h for GB regions

    Get Regional Carbon Intensity data for past 24h. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "regions":[
        {
          "regionid": 3,
          "dnoregion": "Electricity North West",
          "shortname": "North West England",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional From-To
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/intensity/{from}/pt24h/postcode/{postcode}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/postcode/{postcode} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/postcode/{postcode} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/postcode/{postcode}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/postcode/{postcode}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/postcode/{postcode}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/postcode/{postcode}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/postcode/{postcode}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for past 24h for specified postcode

    Get Regional Carbon Intensity data for past 24h for specified postcode. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    postcode path string true Outward postcode i.e. RG41 or SW1 or TF8. Do not include full postcode, outward postcode only.

    Example responses

    
    {
      "data":[
      {
        "regionid": 3,
        "dnoregion": "Electricity North West",
        "shortname": "North West England",
        "postcode": "RG10",
        "data":[
        {
          "from": "2018-01-20T12:00Z",
          "to": "2018-01-20T12:30Z",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional ID
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/intensity/{from}/pt24h/regionid/{regionid}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/regionid/{regionid} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/regionid/{regionid} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/regionid/{regionid}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/regionid/{regionid}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/regionid/{regionid}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/regionid/{regionid}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/intensity/{from}/pt24h/regionid/{regionid}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data for past 24h for specified region

    Get Regional Carbon Intensity data for past 24h for specified region. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    regionid path string true Region ID of GB region. See list of Region IDs here.

    Example responses

    
    {
      "data":[
      {
        "regionid": 3,
        "dnoregion": "Electricity North West",
        "shortname": "North West England",
        "data":[
        {
          "from": "2018-01-20T12:00Z",
          "to": "2018-01-20T12:30Z",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional ID
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/intensity/{from}/{to}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/intensity/{from}/{to} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/intensity/{from}/{to} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data between specified datetimes for GB regions

    Get Regional Carbon Intensity data between specified datetimes. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Start datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    to path string true End datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z

    Example responses

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "regions":[
        {
          "regionid": 3,
          "dnoregion": "Electricity North West",
          "shortname": "North West England",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional From-To
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/intensity/{from}/{to}/postcode/{postcode}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/postcode/{postcode} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/postcode/{postcode} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/postcode/{postcode}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/postcode/{postcode}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/postcode/{postcode}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/postcode/{postcode}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/postcode/{postcode}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data between specified datetimes for specified postcode

    Get Regional Carbon Intensity data between specified datetimes for specified postcode. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Start datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    to path string true End datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    postcode path string true Outward postcode i.e. RG41 or SW1 or TF8. Do not include full postcode, outward postcode only.

    Example responses

    
    {
      "data":[
      {
        "regionid": 3,
        "dnoregion": "Electricity North West",
        "shortname": "North West England",
        "postcode": "RG10",
        "data":[
        {
          "from": "2018-01-20T12:00Z",
          "to": "2018-01-20T12:30Z",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional ID
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    GET /regional/intensity/{from}/{to}/regionid/{regionid}

    Code samples

    # You can also use wget
    curl -X GET https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/regionid/{regionid} \
      -H 'Accept: application/json'
     
    
    GET https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/regionid/{regionid} HTTP/1.1
    Host: api.carbonintensity.org.uk
     
    Accept: application/json
     
    
    var headers = {
      'Accept':'application/json'
     
    };
     
    $.ajax({
      url: 'https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/regionid/{regionid}',
      method: 'get',
     
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    const request = require('node-fetch');
     
    const headers = {
      'Accept':'application/json'
     
    };
     
    fetch('https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/regionid/{regionid}',
    {
      method: 'GET',
     
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
     
    headers = {
      'Accept' => 'application/json'
    }
     
    result = RestClient.get 'https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/regionid/{regionid}',
      params: {}, headers: headers
     
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
     
    r = requests.get('https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/regionid/{regionid}', params={}, headers = headers)
     
    print r.json()
    
    URL obj = new URL("https://api.carbonintensity.org.uk/regional/intensity/{from}/{to}/regionid/{regionid}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    

    Get Carbon Intensity data between specified datetimes for specified region

    Get Regional Carbon Intensity data between specified datetimes for specified region. All times provided in UTC (+00:00).

    Parameters

    Parameter In Type Required Description
    from path string true Start datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    to path string true End datetime in in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z
    regionid path string true Region ID of GB region. See list of Region IDs here.

    Example responses

    
    {
      "data":[
      {
        "regionid": 3,
        "dnoregion": "Electricity North West",
        "shortname": "North West England",
        "data":[
        {
          "from": "2018-01-20T12:00Z",
          "to": "2018-01-20T12:30Z",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix": [
            {
              "fuel": "gas",
              "perc": 43.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 4.2
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 2.2
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.8
            },
            {
              "fuel": "solar",
              "perc": 18.1
            }
          ]
        }]
      }]
    }
    
    {
      "error":{
        "code": "400 Bad Request",
        "message": "string"
      }
    }
    
    {
      "error":{
        "code": "500 Internal Server Error",
        "message": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK 200 response Regional ID
    400 Bad Request 400 response Error
    500 Internal Server Error 500 response Error

    Response Headers

    Status Header Type Format Description
    200 Access-Control-Allow-Origin string

    Schemas

    Intensity

    
    {
      "data":[
        {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "forecast": 266,
          "actual": 263,
          "index": "moderate"
        }
      }]
    }
    

    Properties

    Name Type Required Description
    data object false Data object.
    from string false Datetime in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:30Z. All times provided in UTC (+00:00).
    to string false Datetime in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:30Z. All times provided in UTC (+00:00).
    intensity object false Carbon Intensity data (forecast, actual, index).
    »forecast number false The forecast Carbon Intensity for the half hour in units gCO2/kWh.
    »actual number false The estimated actual Carbon Intensity for the half hour in units gCO2/kWh.
    »index string false The index is a measure of the Carbon Intensity represented on a scale between 'very low', 'low', 'moderate', 'high', 'very high'.

    Factors

    
    {
      "data":[
      {
        "Biomass": 120,
        "Coal": 937,
        "Dutch Imports": 474,
        "French Imports": 53,
        "Gas (Combined Cycle)": 394,
        "Gas (Open Cycle)": 651,
        "Hydro": 0,
        "Irish Imports": 458,
        "Nuclear": 0,
        "Oil": 935,
        "Other": 300,
        "Pumped Storage": 0,
        "Solar": 0,
        "Wind": 0
      }]
    }
    

    Properties

    Name Type Required Description
    data object false Data object.
    Biomass number false Carbon intensity factor of average biomass power plants in gCO2/kWh.
    Coal number false Carbon intensity factor of average coal power plants in gCO2/kWh.
    Dutch Imports number false Carbon intensity factor of average long-term Dutch imports in gCO2/kWh.
    French Imports number false Carbon intensity factor of average long-term French imports in gCO2/kWh.
    Gas (Combined Cycle) number false Carbon intensity factor of average CCGT power plants in gCO2/kWh.
    Gas (Open Cycle) number false Carbon intensity factor of average OCGT power plants in gCO2/kWh.
    Hydro number false Carbon intensity factor of hydro in gCO2/kWh.
    Irish Imports number false Carbon intensity factor of average long-term Irish imports in gCO2/kWh.
    Nuclear number false Carbon intensity factor of nuclear in gCO2/kWh.
    Oil number false Carbon intensity factor of oil power plants in gCO2/kWh.
    Other number false Carbon intensity factor of power plants categorised as other in gCO2/kWh.
    Pumped Storage number false Carbon intensity factor of pumped hydro-electric storage in gCO2/kWh.
    Solar number false Carbon intensity factor of solar in gCO2/kWh.
    Wind number false Carbon intensity factor of wind in gCO2/kWh.

    Error

    
    {
      "error":{
        "code": "string",
        "message": "string"
      }
    }
    

    Properties

    Name Type Required Description
    error object false Error object.
    code string false The HTTP error code produced.
    message string false The error message produced.

    Statistics

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "intensity": {
          "max": 320,
          "average": 266,
          "min": 180,
          "index": "moderate"
        }
      }]
    }
    

    Properties

    Name Type Required Description
    data object false Data object.
    from string false Datetime in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z. All times provided in UTC (+00:00).
    to string false Datetime in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2017-08-25T12:35Z. All times provided in UTC (+00:00).
    intensity object false Carbon Intensity statistics (max, average, min, index).
    »max number false The maximum Carbon Intensity for the datetime range in units gCO2/kWh. Future periods use forecast data. Past data uses actual data.
    »average number false The average Carbon Intensity for the datetime range in units gCO2/kWh. Future periods use forecast data. Past data uses actual data.
    »min number false The maximum Carbon Intensity for the datetime range in units gCO2/kWh. Future periods use forecast data. Past data uses actual data.
    »index string false The index is a measure of the Carbon Intensity represented on a scale between 'very low', 'low', 'moderate', 'high', 'very high'.

    Regional From-To

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "regions":[
        {
          "regionid": 3,
          "dnoregion": "Electricity North West",
          "shortname": "North West England",
          "postcode": "RG10",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix":[
            {
              "fuel": "gas",
              "perc": 41.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 3.4
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 1.2
            },
            {
              "fuel": "storage",
              "perc": 0.8
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.9
            },
            {
              "fuel": "solar",
              "perc": 20.9
            }
          ]
        }]
      }]
    }
    
    

    Properties

    Name Type Required Description
    data object false Data object.
    from string false Datetime in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2018-01-20T12:00Z. All times provided in UTC (+00:00).
    to string false Datetime in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2018-01-20T12:30Z. All times provided in UTC (+00:00).
    regions object false GB regions (regionid, dnoregion, shortname, intensity).
    »regionid number false Region ID 1-17.
    »dnoregion string false Name of Distribution Network Operator (DNO) in region.
    »shortname string false Name of region.
    »postcode string false Outward postcode i.e. RG10.
    »intensity object false Carbon Intensity data (forecast, actual, index).
    »»forecast number false The forecast Carbon Intensity for the half hour in units gCO2/kWh.
    »»index string false The index is a measure of the Carbon Intensity represented on a scale between 'very low', 'low', 'moderate', 'high', 'very high'.
    »generationmix object false Fuel types.
    »»fuel string false Name of fuel type.
    »»perc number false Generation output of fuel type as a percentage of total generation.

    Regional ID

    
    {
      "data":[
      {
        "regionid": 3,
        "dnoregion": "Electricity North West",
        "shortname": "North West England",
        "postcode": "RG10",
        "data":[
        {
          "from": "2018-01-20T12:00Z",
          "to": "2018-01-20T12:30Z",
          "intensity": {
            "forecast": 266,
            "index": "moderate"
          }
          "generationmix":[
            {
              "fuel": "gas",
              "perc": 41.6
            },
            {
              "fuel": "coal",
              "perc": 0.7
            },
            {
              "fuel": "biomass",
              "perc": 3.4
            },
            {
              "fuel": "nuclear",
              "perc": 17.6
            },
            {
              "fuel": "hydro",
              "perc": 1.2
            },
            {
              "fuel": "storage",
              "perc": 0.8
            },
            {
              "fuel": "imports",
              "perc": 6.5
            },
            {
              "fuel": "other",
              "perc": 0.3
            },
            {
              "fuel": "wind",
              "perc": 6.9
            },
            {
              "fuel": "solar",
              "perc": 20.9
            }
          ]
        }]
      }]
    }
    
    

    Properties

    Name Type Required Description
    data object false Data object.
    regionid number false Region ID 1-17.
    dnoregion string false Name of Distribution Network Operator (DNO) in region.
    shortname string false Name of region.
    postcode string false Outward postcode i.e. RG10.
    data object false GB regions (regionid, dnoregion, shortname, intensity).
    »from string false Datetime in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2018-01-20T12:00Z. All times provided in UTC (+00:00).
    »to string false Datetime in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2018-01-20T12:30Z. All times provided in UTC (+00:00).
    »intensity object false Carbon Intensity data (forecast, actual, index).
    »»forecast number false The forecast Carbon Intensity for the half hour in units gCO2/kWh.
    »»index string false The index is a measure of the Carbon Intensity represented on a scale between 'very low', 'low', 'moderate', 'high', 'very high'.
    »generationmix object false Fuel types.
    »»fuel string false Name of fuel type.
    »»perc number false Generation output of fuel type as a percentage of total generation.

    Generation

    
    {
      "data":[
      {
        "from": "2018-01-20T12:00Z",
        "to": "2018-01-20T12:30Z",
        "generationmix":[
          {
            "fuel": "gas",
            "perc": 41.6
          },
          {
            "fuel": "coal",
            "perc": 0.7
          },
          {
            "fuel": "biomass",
            "perc": 3.4
          },
          {
            "fuel": "nuclear",
            "perc": 17.6
          },
          {
            "fuel": "hydro",
            "perc": 2.0
          },
          {
            "fuel": "imports",
            "perc": 6.5
          },
          {
            "fuel": "other",
            "perc": 0.3
          },
          {
            "fuel": "wind",
            "perc": 6.9
          },
          {
            "fuel": "solar",
            "perc": 20.9
          }
        ]
      }]
    }
    
    

    Properties

    Name Type Required Description
    data object false Data object.
    from string false Datetime in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2018-01-20T12:00Z. All times provided in UTC (+00:00).
    to string false Datetime in ISO8601 format YYYY-MM-DDThh:mmZ e.g. 2018-01-20T12:30Z. All times provided in UTC (+00:00).
    generationmix object false Fuel types.
    »fuel string false Name of fuel type.
    »perc number false Generation output of fuel type as a percentage of total generation.

    Regions

    List of GB Regions

    Region ID Shortname
    1 North Scotland
    2 South Scotland
    3 North West England
    4 North East England
    5 Yorkshire
    6 North Wales
    7 South Wales
    8 West Midlands
    9 East Midlands
    10 East England
    11 South West England
    12 South England
    13 London
    14 South East England
    15 England
    16 Scotland
    17 Wales