Cleantech Content DataUK energy tariff and EV charging price API

REST API reference

Base URL https://data.cleantechcontent.co.uk/v1. All endpoints are GET unless stated. The machine-readable version is the OpenAPI 3.1 document.

Tariffs

EndpointWhat it returnsFilters
/tariffsTariff products with their regional rates nested under ratesregion, type, supplier, fuel, payment_method, include_unverified, include_unavailable, limit, offset
/tariffs/{id}One tariff by numeric id or slugregion
/tariffs/evEV time-of-use tariffs and EV add-onsregion, supplier, include_unverified
/tariffs/capOfgem default tariff cap rowsregion, payment_method, fuel, period (YYYY-MM-DD), include_history

Tariff types: standard_variable, fixed, ev_tou, smart_tou, economy_7, tracker, agile, heat_pump, export, ev_addon, prepayment. Payment methods: direct_debit, standard_credit, prepayment (Octopus tariffs priced the same for every method appear as varying and match a direct debit filter).

curl "https://data.cleantechcontent.co.uk/v1/tariffs?region=C&type=ev_tou"
curl "https://data.cleantechcontent.co.uk/v1/tariffs/octopus-go-fix-12m-26-08-19-electricity?region=M"
curl "https://data.cleantechcontent.co.uk/v1/tariffs/cap?region=N&fuel=gas&payment_method=prepayment"

Rate fields

unit_rate_pence, standing_charge_pence_per_day, off_peak_rate_pence and off_peak_windows, peak_rate_pence and peak_windows, bands (full list for three-band tariffs), export_rate_pence and export_bands for export tariffs, dynamic_summary (7, 30 and 90-day averages) for Agile and Tracker, and provenance: source_url, verified_at, verified_by, confidence, notes.

EV public charging

EndpointWhat it returnsFilters
/charging/networksNetworks with operator, pricing page and notesinclude_unverified
/charging/pricesPrice rows per network, power band and pricing basisnetwork, power_band, basis, include_unverified, limit, offset
/charging/compareCost table for one session, cheapest firstkwh (required), power_band (required), basis
curl "https://data.cleantechcontent.co.uk/v1/charging/compare?kwh=40&power_band=dc_ultra_150kw_plus"

Power bands: ac_slow_7kw, ac_fast_22kw, dc_rapid_50kw, dc_ultra_150kw_plus. Bases: contactless_payg, app_payg, member, subscription. More in the EV charging guide.

Meta (never metered)

EndpointWhat it returns
/meta/statusRow counts and newest and oldest verified_at per dataset, the cap period in force, recent syncs
/meta/changelogEvery insert, update and retirement with old and new values (limit, table)
/meta/sourcesEvery source URL the data cites, with first and last seen dates
/meta/enumsAllowed values for regions, types, bands and bases

Keys and credit

EndpointWhat it does
POST /keys/freeIssues a free key (100 calls a day). Body optional: { "label", "email" }
POST /credits/checkoutBody { "pack": "1200" | "7000", "email"?, "api_key"? }. Returns a Stripe Checkout link and a credit key that is topped up when payment completes
POST /credits/buy?pack=50|250|750Stripe Machine Payments: returns a 402 challenge; retry with the credential to receive a key holding the pack
GET /credits/balanceRemaining calls for the key in Authorization

Paying per call

When the free tier is used up you get a 402 Payment Required. That one response carries three ways to continue:

# Node example with the official x402 client
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { toClientEvmSigner } from "@x402/evm";
const client = new x402Client();
registerExactEvmScheme(client, { signer: toClientEvmSigner(account) }); // a viem account holding USDC on Base
const paidFetch = wrapFetchWithPayment(fetch, client);
const res = await paidFetch("https://data.cleantechcontent.co.uk/v1/tariffs?region=H&type=ev_tou");