# Grid and Energy Data API
GET/v1/griddata/regions
Every market region we serve with market, timezone, currency, source and price cadence. Refreshes every 24 hours.
Price
$0.005/ callEdge cache
21600s
Uptime 24h
100.00%
p95
255ms
MCP tool
griddata_regions
The Grid and energy data API provides wholesale electricity prices per market region. It includes data from AEMO NEM, Elexon GB, ENTSO-E EU zones, and EIA US balancing authorities. The API also offers grid demand and generation by fuel, NESO carbon intensity, and cheapest-window signals for charging and demand response. One schema is used across four market structures, with UTC timestamps, integer micro units, and region codes in one list. The API is provided by AgentDataAPI and costs $0.005 per request.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| market | query | string | nem, gb, eu or us |
Code
# 1. No key, no payment: the gateway answers 402 with the price
curl -i "https://api.realtimeapi.ai/v1/griddata/regions"
# 2. Pay: retry with a signed x402 payment (any x402 client builds this header)
curl "https://api.realtimeapi.ai/v1/griddata/regions" -H "PAYMENT-SIGNATURE: $X402_PAYMENT"// npm i @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = x402Client.fromConfig({ schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(privateKeyToAccount(PRIVATE_KEY)) }] });
const pay = wrapFetchWithPayment(fetch, client);
const data = await (await pay("https://api.realtimeapi.ai/v1/griddata/regions")).json();
console.log(data);# pip install "x402[requests,evm]==2.27.0" eth-account
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact import register_exact_evm_client
client = x402ClientSync()
register_exact_evm_client(client, EthAccountSigner(Account.from_key(PRIVATE_KEY)))
session = x402_requests(client)
print(session.get("https://api.realtimeapi.ai/v1/griddata/regions").json())curl "https://api.realtimeapi.ai/v1/griddata/regions" -H "X-API-Key: $RTAPI_KEY"Frequently asked questions
What data does the API provide?
Wholesale electricity prices, grid demand, generation by fuel, NESO carbon intensity, and cheapest-window signals.
What market regions are covered?
AEMO NEM, Elexon GB, ENTSO-E EU zones, and EIA US balancing authorities.
How often is the data updated?
Every 24 hours.
What is the pricing model?
Pay per request in USDC ($0.005) or with an API key.