API reference · v2
GridBase API
Load, prices, forecasts, generation, grid events, utility rates and incentives for the seven US ISOs — 143 REST endpoints, one envelope, one error shape, and your rate-limit allowance on every response.
https://utility-api-86672132515.us-east1.run.app/api/v2Power-grid data is a paid group. A free account calling any route in this folder gets `403 plan_required` with `detail.group: "power_grid"`, and so do `/geo/nearby/power-grid/**` and `/signals/renewable`, which serve the same readings by coordinate and by postal code.
Geo answers "what is near here", and for two kinds of answer that is the same data a paid group covers:
Published residential, commercial and industrial utility tariffs for a US postal code, by utility type.
Incentives are a paid group. A free account calling any route in this folder — including `/incentives/regions` — gets `403 plan_required` with `detail.group: "incentives"`.
Grid events — outages, alerts, planned work — attached to a target sensor, with their affected areas and the nodes those areas touch.
Sensors and their readings: latest values, history, statistics and health.
The places sensors live — plants, substations, zones — and how they relate.
Networks group nodes; each market is one. Their status, now and over time.
User-defined reference tables, their schemas and their rows.
A single current number for a place, resolved through the grid zone its postal code belongs to.
The reference vocabularies: the type and role tables every other response points at.
Arbitrary name/value metadata attached to any entity by its uuid.
Free-text notes attached to any entity by its uuid, under a topic.
Push data out: destinations, rules that decide what to send, and delivery logs.
The caller's own account: profile, roles, API tokens, workspaces and request history. Every route here is scoped to whoever the token belongs to — there is no user id in any path.
What this credential is and what allowance is left on it.
The plans on offer, the caller's subscription, and cancelling it.
Authentication
Send your API key in the Authorization header, as is — with no Bearer prefix.
Create and revoke keys under API keys in the console. A key carries its own per-minute allowance and, for writes, needs the contributor role. Keep keys on the server: anyone holding one can spend its allowance.
A missing, invalid, expired or revoked key is a 401 unauthorized; a key without the needed role or capability is a 403 forbidden.
Authorization: $GRIDBASE_API_KEYYour first request
Current load and real-time price for two markets, in one call. Set your key in the environment and run the request.
export GRIDBASE_API_KEY=…- Run the request on the right.
- Read
items; checkmeta.warningsfor anything to act on.
curl "https://utility-api-86672132515.us-east1.run.app/api/v2/power-grid/vitals?networks=pjm,ercot" \
-H "Authorization: $GRIDBASE_API_KEY"{
"meta": {
"source": "sensor_num_series_latest",
"class": "measured",
"count": 2,
"warnings": []
},
"items": [
{
"network": "pjm",
"load_mw": 104615.2,
"load_at": "2026-08-27T13:25:00Z",
"load_age_seconds": 116,
"price_usd_per_mwh": 26.52,
"price_at": "2026-08-27T13:25:00Z",
"price_age_seconds": 116
}
]
}Conventions
The same rules hold on every endpoint, so a client written against one works against the rest.
- One collection envelope
- One error shape
- Your rate-limit allowance is on every response
- Unknown paths and wrong methods
- Timestamps
- Field presence
- meta.warnings
- meta.class and meta.source
- Paging and ordering
- Writes
- Limits
One collection envelope
Every collection answers {meta, items}, with items always an array and
never null. Every single object answers {meta, item}, and so does every
successful mutation: a POST, PATCH or DELETE returns the resource it
changed, with a 201 on create.
count, limit, offset and total all live inside meta. "How many did
I get, of how many, from where in the list" is one question, so it is
answered in one place. A single-object response has no count at all; there
is no collection to count.
One error shape
Every error carries a machine-readable code, a human message, the
request_id, and detail when there is something structured to say.
Branch on code; the message wording is not part of the contract.
// 401
{
"code": "unauthorized",
"message": "authorization token required",
"request_id": "01JD4F8K2M7Q9XZ..."
}
The codes you can be refused with: unauthorized (401) for a missing,
invalid, expired or revoked key; forbidden (403) for a disabled account,
a key used from a disallowed address, or a request needing a role or a
capability the key does not have; plan_required (403) for an endpoint your
subscription does not include at all; rate_limited (429) when the key's
per-minute allowance is spent. rate_limited is the one to wire up
first — backing off is the thing a client has to get right.
forbidden and plan_required are both 403 and have different fixes, which
is why they are different codes: forbidden is answered by using another
credential or being granted a role, plan_required only by changing the
subscription. Retrying it with a different key will never work.
Oversized requests are refused, not quietly trimmed: limit_exceeded
when a page asks for more rows than an endpoint serves, window_too_large
when a time range is wider. The two have different fixes, so they are
different codes, and both name the limit in detail.
Your rate-limit allowance is on every response
You do not have to be refused to learn your budget. Every v2 response carries three headers:
RateLimit-Limit: 500
RateLimit-Remaining: 487
RateLimit-Reset: 34
RateLimit-Limit is the per-minute allowance that binds -- your
account's or the key's, whichever is smaller (see Limits below) --
-Remaining what is left of it, and -Reset the number of seconds
until the window rolls: a delta, not a timestamp, so it needs no
agreement about the clock. A 429 also carries Retry-After, with the
same delta.
The window is a fixed minute shared by every key, not a sliding one per key.
So a first call made late in a window gets a short one: the allowance is
whole, but it may reset a few seconds later. Read RateLimit-Reset rather
than assuming sixty seconds.
The figures are live on cached responses too -- a cache hit reports your real remaining allowance, not the one the stored copy was made with.
The headers are absent, rather than guessed, if the allowance cannot be established. A number that nothing enforces is worse than no number.
Unknown paths and wrong methods
// 404
{
"code": "not_found",
"message": "no such endpoint",
"request_id": "...",
"detail": { "path": "/api/v2/account/nope", "method": "GET" }
}
// 405
{
"code": "method_not_allowed",
"message": "this endpoint does not accept that method",
"request_id": "...",
"detail": { "method": "PUT", "allow": ["GET", "PATCH"] }
}
The 405 also carries an Allow header, so a mistyped path and a PUT that
should have been a PATCH are distinguishable without guessing.
Timestamps
Every timestamp is RFC 3339 in UTC, with sub-second precision:
2024-09-07T12:02:14.356858Z. Never a local offset, on any route, whatever
the underlying column type. A date with no time of day stays a date
(2026-01-01).
Requests may send any zone; the response is always UTC.
Field presence
Absent and empty mean different things, so they are spent on different
situations. "matched_by": "" would be worse than no matched_by: the
empty string is not one of the field's documented values.
meta.warnings
Non-fatal notes about the response: things you may need to act on, not
a description of how the endpoint works. Always present, [] when there is
nothing to say.
A warning that fires on every request of a given shape is worse than no
warning, because it teaches callers to ignore the field. Methodology
belongs in these docs and in meta.class.
Where a warning names things you might want individually — territories, skipped sensors, dropped ids — there is a structured field carrying them too. Read that; the prose is for a human.
meta.class and meta.source
class states what kind of number you are reading: measured, computed,
estimated, forecast or reference. source names where it came from.
Both are omitted where they do not apply — a typed label on an entity is
not a reading.
meta.coverage states the window actually served, which may be
narrower than the one requested. Retention is finite, and silence about
that is how a caller mistakes a truncated answer for a complete one.
Paging and ordering
limit/offset for pages, from/to for time windows, sort/dir for
ordering. Every ordering breaks ties on a stable field, so a row cannot
appear on two pages or none. meta.sortable lists the fields an endpoint
will order by, and a refusal names the accepted values.
Writes
A write needs a key permitted to write and, on shared data, the
contributor role; the two are an intersection, not a fallback.
Whether your credential may write depends on what it is. A session from
signing in may write by default. An API key may not: writing through a key
is an explicit grant, because a key lives in your infrastructure rather than
in a browser session, and GET /auth/introspect reports what yours has.
Two things need no role. Revoking a token — killing a compromised credential
must not need a role the holder might not have — and everything under
/account, which acts on your own record and nothing else.
Limits
Three things come from your subscription, and all three are v2 only.
Requests per minute are counted per account, not per token. All of your
tokens draw on one allowance, so minting another credential does not buy
more throughput. A call is a call: a request from a signed-in browser
session and a request from an API key cost the same and come out of the
same bucket. RateLimit, RateLimit-Remaining and RateLimit-Reset
report whichever limit binds — your account's or the token's — and a refusal
is 429 rate_limited with detail.scope: "account" when it was the account
ceiling. Everything under /account is exempt, so you can always read why
you were throttled.
Free accounts read 7 days of history. On endpoints that serve a row per reading, interval, event or day:
- ask for a
fromfurther back than that and you get403 history_limit, withdetail.earliest_available— the value to clamp a date picker to - send no
fromat all and the window is shortened to the floor, served, and reported inmeta.warnings. A default you did not send is not a request to refuse
Endpoints whose rows are coarser than the floor are not limited by it — annual peaks and capacity auction prices would return nothing rather than less. Nor is anything that computes a figure over a window, because shortening that input changes the answer instead of shortening it.
Paid plans have no history floor.
Some endpoint groups are not on every plan. Free accounts do not get power-grid, tariff or incentive data at all. A request to one answers:
// 403
{
"code": "plan_required",
"message": "this account's plan does not include power-grid data",
"request_id": "...",
"detail": {
"group": "power_grid",
"denied_groups": ["power_grid", "tariffs", "incentives"]
}
}
detail.group is the group this endpoint belongs to and denied_groups is
everything your plan withholds, so one refusal is enough to render a
complete upgrade prompt rather than discovering the rest one 403 at a time.
A group is a whole subtree, and three of them reach beyond the obvious path:
| group | endpoints |
|---|---|
power_grid | /power-grid/**, /geo/nearby/power-grid/**, /signals/renewable |
tariffs | /utilities/**, /geo/zip/{postal_code}/utility-rates |
incentives | /incentives/** |
/signals/renewable and /geo/nearby/power-grid/renewables return the same
reading, and /geo/zip/{postal_code}/utility-rates reads the same published
rates as /utilities, so they are gated together. Sensors, nodes, networks,
events, publications and everything under /account are your own data and
are on every plan. /geo/zip/{postal_code}/emission-rates is not a tariff
and is not restricted.
As configured today
| plan | requests per minute | history | groups withheld |
|---|---|---|---|
| Free | 50 | 7 days | power_grid, tariffs, incentives |
| Standard | 500 | unlimited | none |
| Enterprise | 10000 | unlimited | none |
Read your own from GET /account/profile under quotas.v2_account rather
than hard-coding these — they are configuration, not contract, and an
account can carry an individual override.