API

You need to be registed to use this API. Once you are registered you will be assigned a key which you have to pass as a query parameter in every request you make.
Use: https://api.pizone.dev/api/<api name>/<endpoint>?key=<your key>
Example request: GET https://api.pizone.dev/api/grid/demand?key=123456789
You can only make up to 5 requests per second to the whole of the /api endpoint. If you exceed this limit you will be blacklisted for 30 seconds. If you intend on requesting this data for a website, it is strongly recommended you use cache on your webserver.
All responses are served using JSON. Each response will contain a property named error. If this is true, the response will also contain a property named message. This allows you to easily detect a failed request.

DVLA

An API to query numberplates from the United Kingdom using the DVLA (Driver's licensing and licensing agency)


Fetches your specified vehicle registration number from the DVLA.:

/dvla/get/SN65OGA

Request

Parameter Description Options
registration Registration number of the vehicle you are searching. It must be 7 characters or less.

Response

Property Type Description
data object Object containing response from DVLA.
data.engineCapacity integer Engine capacity of the vehicle.
data.markedForExport boolean Whether the vehicle is marked for export.
data.fuelType string Fuel type of the vehicle.
data.colour string Colour of the vehicle
data.make string Make of the vehicle.
data.motStatus string MOT Status of the vehicle.
data.yearOfManufacture integer Year the vehicle was manufactured.
data.taxDueDate string Date tax is due on the vehicle, in format YYYY-MM-DD.
data.taxStatus boolean Whether the vehicle is taxed or not.
dateOfLastV5CIssued string Date the last V5C was issued.
wheelplan string Wheel plan of the vehicle.
monthOfFirstRegistration string Month when the vehicle was first registered in format YYYY-MM

Grid

An API to access electricity grid information of countries in Europe. Currently only the United Kingdom is supported.


Get the current demand on the grid. Default unit is MW (Megawatts):

/grid/demand

Request

Parameter Description Options
unit Wattage unit to return the demand figures in. W, KW, MW, GW, HP

Response

Property Type Description
demand object Object containing demand properties.
demand.solar float Contains the demand figure from Elexon combined with the estimation from Sheffield Solar.
demand.nosolar float Contains the demand figure from Elexon.

Get the current grid frequency.:

/grid/frequency

Response

Property Type Description
frequency float The current grid frequency in Hz

Get current generation for a source:

/grid/source/Wind?unit=MW

Request

Parameter Description Options
type Type of source, whether it is Elexon's ID for the source or the name. Please note this paramater is case sensitive. name: Wind, Solar, Hydro, Pumped Storage, Biomass, CCGT, OCGT, Nuclear, Coal, Oil, Other. Interconnector names are: IC_France, IC_France2, IC_Irl, IC_Ned, IC_Ew, IC_Nem, IC_Elec, IC_Nsl, id: WIND, SOLAR, NPSHYD (that's Non Pumped Storage HydroElectric), PS (Pumped HydroElectric), BIOMASS, CCGT (that's closed cyle gas turbine), OCGT (that's the same as before but open), NUCLEAR, COAL, OIL, OTHER. Interconnectors are INTFR, INTIFA2, INTIRL, INTNED, INTEW, INTNEM, INTELEC, INTNSL.
unit Wattage unit to return the figure in. W, KW, MW, GW, HP

Response

Property Type Description
source float The current generation/import/export figure for the specified source as specified by unit, default is MW.

Get current flows of interconnectors:

/grid/interconnectors

Request

Parameter Description Options
unit Wattage unit to return the demand figures in. W, KW, MW, GW, HP

Response

Property Type Description
interconnectors object An object containing interconnector flows and also Import and Export totals. Each property within this is an object.
interconnectors.Export, Import, IC_France, IC_France2, IC_Elec, IC_Irl, IC_Ew, IC_Nem, IC_Nsl object An object containing the current value and percent if the value is positive.
value float Current power transmission of the interconnector using parameter unit.
percent float Only existent if value is greater than 0. Percentage of the demand is being met from the interconnector.

Get the current carbon intensity of electricity of the grid:

/grid/carbon/current

Response

Property Type Description
forecast integer The forecast for carbon intensity at the current time.
actual integer The actual carbon intensity at the current time.
index string The index of carbon intensity such as low or medium.

Get the current carbon intensity of electricity of the grid today:

/grid/carbon/today

Response

Property Type Description
forecast integer The forecast for carbon intensity today.
actual integer The actual carbon intensity today.
index string The index of carbon intensity such as low or medium.

Get the carbon intensity of electricity on a date. The earliest you can go is 12th September 2017 (2017-09-12). You can usually get predictions for a couple days ahead.:

/grid/carbon/date/<date>/<period>

Request

Parameter Description Options
date Date in the format YYYY-MM-DD. Optional Any date in format YYYY-MM-DD
period A number between 1 and 48. The day is split into 48 half an hour slots. The first period starts at 23:00 the previous day. Any number between 1 and 48

Response

Property Type Description
forecast integer The forecast for carbon intensity today.
actual integer The actual carbon intensity today.
index string The index of carbon intensity such as low or medium.

Get the carbon intensity of electricity on a date. The earliest you can go is 12th September 2017 (2017-09-12). You can usually get predictions for a couple days ahead.:

/grid/carbon/factors

Response

Property Type Description
intensity object An object with carbon intensity.
Biomass integer The carbon intensity of Biomass.
Coal integer The carbon intensity of Coal.
French Imports integer The carbon intensity of French Imports.
Dutch Imports integer The carbon intensity of Dutch Imports.
Gas (Combined Cycle) integer The carbon intensity of Gas (Combined Cycle).
Gas (Open Cycle) integer The carbon intensity of Gas (Open Cycle).
Hydro integer The carbon intensity of Hydro.
Irish Imports integer The carbon intensity of Irish Imports.
Nuclear integer The carbon intensity of Nuclear.
Oil integer The carbon intensity of Oil.
Other integer The carbon intensity of Other.
Pumped Storage integer The carbon intensity of Pumped Storage.
Solar integer The carbon intensity of Solar.
Wind integer The carbon intensity of Wind