GridCO2
GridCO2 API

Datacenters


Carbon intensity

GET
https://api.gridco2.com
/v1/datacenters/co2/{provider}/{datacenter_code}

Returns the carbon intensity of the current hour for a specific cloud provider datacenter region in grams of CO2 equivalent per kWh (gCO2eq/kWh).

Carbon intensity › path Parameters

provider
​string · enum · required

Cloud provider identifier.

Enum values:
aws
azure
gcp
datacenter_code
​string · pattern: ^[A-Za-z0-9-_]{2,64}… · required

Provider-specific region or datacenter code, e.g. eu-west-1.

Carbon intensity › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Carbon intensity › Responses

Carbon intensity for the requested datacenter.

provider
​string · enum

Cloud provider identifier the datacenter belongs to.

Enum values:
aws
azure
gcp
datacenter_code
​string

Provider-specific region or datacenter code.

timestamp
​string · date-time

Start of the hour this value applies to (UTC).

carbon_intensity
​number

Carbon intensity of the electricity serving this datacenter in grams of CO2 equivalent per kWh (gCO2eq/kWh).


Carbon intensity forecast

GET
https://api.gridco2.com
/v1/datacenters/co2/forecast/{provider}/{datacenter_code}

Returns the forecast carbon intensity for the next 24 hours for a specific cloud provider datacenter region, as hourly values in grams of CO2 equivalent per kWh (gCO2eq/kWh).

Carbon intensity forecast › path Parameters

provider
​string · enum · required

Cloud provider identifier.

Enum values:
aws
azure
gcp
datacenter_code
​string · pattern: ^[A-Za-z0-9-_]{2,64}… · required

Provider-specific region or datacenter code, e.g. eu-west-1.

Carbon intensity forecast › query Parameters

hours
​integer · min: 1 · max: 24

Number of hours to forecast ahead, from 1 to 24. Defaults to 24.

Default: 24

Carbon intensity forecast › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Carbon intensity forecast › Responses

Hourly carbon intensity forecast for the requested datacenter.

provider
​string · enum

Cloud provider identifier the datacenter belongs to.

Enum values:
aws
azure
gcp
datacenter_code
​string

Provider-specific region or datacenter code.

​object[]

Hourly forecast points, ordered from the current hour forwards.


Electricity mix

GET
https://api.gridco2.com
/v1/datacenters/electricitymix/{provider}/{datacenter_code}

Returns the composition of electricity at the current hour for a specific cloud provider datacenter region. Split into the percentages of each source.

Electricity mix › path Parameters

provider
​string · enum · required

Cloud provider identifier.

Enum values:
aws
azure
gcp
datacenter_code
​string · pattern: ^[A-Za-z0-9-_]{2,64}… · required

Provider-specific region or datacenter code, e.g. eu-west-1.

Electricity mix › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Electricity mix › Responses

Electricity mix for the requested datacenter.

provider
​string · enum

Cloud provider identifier the datacenter belongs to.

Enum values:
aws
azure
gcp
datacenter_code
​string

Provider-specific region or datacenter code.

timestamp
​string · date-time

Start of the hour this value applies to (UTC).

​SourceBreakdown

Share of electricity by source, as a percentage. Values sum to 100. Any sources with 0 are omitted.


Electricity mix forecast

GET
https://api.gridco2.com
/v1/datacenters/electricitymix/forecast/{provider}/{datacenter_code}

Returns the forecast electricity mix for the next 24 hours for a specific cloud provider datacenter region, as hourly percentages of each source.

Electricity mix forecast › path Parameters

provider
​string · enum · required

Cloud provider identifier.

Enum values:
aws
azure
gcp
datacenter_code
​string · pattern: ^[A-Za-z0-9-_]{2,64}… · required

Provider-specific region or datacenter code, e.g. eu-west-1.

Electricity mix forecast › query Parameters

hours
​integer · min: 1 · max: 24

Number of hours to forecast ahead, from 1 to 24. Defaults to 24.

Default: 24

Electricity mix forecast › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Electricity mix forecast › Responses

Hourly electricity mix forecast for the requested datacenter.

provider
​string · enum

Cloud provider identifier the datacenter belongs to.

Enum values:
aws
azure
gcp
datacenter_code
​string

Provider-specific region or datacenter code.

​object[]

Hourly forecast points, ordered from the current hour forwards.