GridBase
    Console

    Search the API reference

    Find an endpoint by name or path

    Geo

    Geo answers "what is near here", and for two kinds of answer that is the same data a paid group covers:

    GET/geo/nearby/networks
    GET/geo/nearby/nodes
    GET/geo/nearby/power-grid/conditionsstandard+
    GET/geo/nearby/power-grid/load-forecaststandard+
    GET/geo/nearby/power-grid/renewablesstandard+
    GET/geo/nearby/sensors
    GET/geo/zip/{zip}
    GET/geo/zip/{zip}/emission-rates
    GET/geo/zip/{zip}/utility-ratesstandard+
    How geo behaves

    Geo answers "what is near here", and for two kinds of answer that is the same data a paid group covers:

    • /geo/nearby/power-grid/** — conditions, load-forecast and renewables are the power_grid group, the same restriction as /power-grid/**
    • /geo/zip/{postal_code}/utility-rates — the tariffs group, the same published rates as /utilities/**

    A free account gets 403 plan_required on those. Everything else here — nearby sensors, nodes and networks, the postal-code lookup, and /geo/zip/{postal_code}/emission-rates — is on every plan. Emission factors are reference data about a grid region, not a price anyone is charged, so they are not a tariff.

    Gating the /power-grid folder alone would have left these as a way round the restriction; they are gated with it rather than separately, so there is one answer to "does this customer get market data" instead of two that can disagree.

    Nearby Networks

    GET/api/v2/geo/nearby/networks

    The networks that have a node within a radius.

    Query parameters

    • latrequirede.g. 41.9
    • lonrequirede.g. -87.6
    • radius_milesrequirede.g. 50
    • zipoptionale.g. 60601
    • node_typeoptionale.g. zone

    Same origin and filter parameters as Nearby Nodes.

    nearest_node, distance_miles and nodes_in_radius say why the network is in the result — whether it is here because one node is a mile away or because forty are. Returning the networks alone discards that.

    Worth knowing

    One statement, not a lookup per matched node. The grouping is a GROUP BY in the same statement that resolved the nodes, so a transient failure cannot append a network with a nil id and an empty name alongside real data.

    The ordering is total: distance, then the id. Sorting by distance alone permutes nodes that tie, which makes three identical requests return three different orderings and makes paging over them unsound.

    Example: ?lat=41.9&lon=-87.6&radius_miles=50 returns incentives, noaa and pjm, with Cook County containing the origin.

    Errors

    as Nearby Nodes
    Security
    a read behind the v2 capability gate (`v2` + `read`, no role).
    Cache
    slow tier.
    curl "https://utility-api-86672132515.us-east1.run.app/api/v2/geo/nearby/networks?lat=41.9&lon=-87.6&radius_miles=50" \
      -H "Authorization: $GRIDBASE_API_KEY"
    Response200
    {
      "meta": { "source": "network", "class": "computed", "count": 3, "total": 3, "notes": [...] },
      "items": [
        {
          "id": "78d7c518-a8d8-43ad-83b9-0981b7159ad2",
          "name": "incentives",
          "description": "Geographic regions that energy incentives and programs apply to: ...",
          "nearest_node": { "id": "83b7f6cd-...", "name": "Cook County, IL" },
          "distance_miles": 0,
          "nodes_in_radius": 46
        }
      ]
    }
    Try it in the Explorer

    Nearby Nodes

    GET/api/v2/geo/nearby/nodes

    Nodes within a radius of a point, nearest first.

    Query parameters

    • ziprequirede.g. 60601
    • radius_milesrequirede.g. 25
    • limitrequirede.g. 25
    • latoptionale.g. 41.9
    • lonoptionale.g. -87.6
    • node_typeoptionale.g. county
    • offsetoptionale.g. 0

    Origin: either lat and lon, or zip. Giving both is refused rather than silently preferring one and dropping the other.

    Parameters: lat, lon, zip, radius_miles (1–1000, default 100), node_type (a slug), limit, offset. Anything else is refused.

    distance_miles is measured to the node's footprint where it has one, and to its coordinates otherwise. matched_on says which. contains_origin distinguishes "0 miles because you are standing inside this zone" from "0 miles because the node is at this exact point" — two different facts, and collapsing them is how a distance bug hides.

    Ordering is containment first, then distance, then the node id, so it is total and paging cannot repeat or skip a row.

    Every value is bound; the bounding-box expansion is computed in Go from a range-checked radius and bound as float8. Data class: computed distance over reference topology.

    milliseconds of PostGIS, so caching is worth more than freshness.

    Worth knowing

    One query answers both origins. zip and lat/lon resolve through the same path, so the two cannot disagree about what "nearby" means or about how a node with a footprint is ranked.

    A node with a footprint is not automatically at distance zero. Treating containment as distance 0 makes every geometry-bearing node pass any radius, which returns the whole country ranked as though all of it were underfoot. Containment and distance are reported separately — see distance_miles and the containment flag above.

    lat and lon are each parsed into their own error and both are range-checked, so a bad lat with a good lon is a 400 rather than a search of the equator.

    One name for each parameter. radius_miles for the radius and zip for the postal origin, and anything else is refused — a caller who sends radius or miles is told, instead of silently getting the 100-mile default.

    Errors

    400missing_paramno origin given
    400missing_paramlat without lon, or lon without lat
    400invalid_paramlat or lon is not a number, or out of range
    400invalid_paramboth zip and lat/lon given
    400invalid_paramradius_miles outside 1–1000
    400invalid_paraman unrecognised parameter
    404not_foundthe zip is not in the reference table
    422invalid_paramthe zip has no coordinates (645 of 41,533)
    Security
    a read behind the v2 capability gate (`v2` + `read`, no role).
    Cost
    403ms for 50 miles of Chicago.
    Cache
    slow tier — the topology is static but the search is a few hundred
    curl "https://utility-api-86672132515.us-east1.run.app/api/v2/geo/nearby/nodes?zip=60601&radius_miles=25&limit=25" \
      -H "Authorization: $GRIDBASE_API_KEY"
    Response200
    {
      "meta": {
        "source": "node", "class": "computed",
        "count": 1, "limit": 100, "offset": 0, "total": 1,
        "notes": [
          "measured from 41.8858,-87.6181 (postal code 60601) within 5 miles",
          "distance_miles is to the node's footprint where it has one and to its coordinates otherwise; ..."
        ]
      },
      "items": [
        {
          "id": "83b7f6cd-9b09-596d-9bca-b3446fc24272",
          "name": "Cook County, IL",
          "description": "County: Cook County. Source: Census TIGERweb, January 2026 vintage.",
          "lat": 41.820378500000004, "lon": -87.55569057349786,
          "network":   { "id": "78d7c518-...", "name": "incentives" },
          "node_type": { "id": "ac5a0ee9-...", "slug": "county", "name": "County" },
          "distance_miles": 0,
          "contains_origin": true,
          "matched_on": "footprint"
        }
      ]
    }
    Try it in the Explorer

    Nearby Grid Conditions

    GET/api/v2/geo/nearby/power-grid/conditions

    Grid conditions at a location: real-time price, day-ahead price and the renewable share, from the nearest node carrying each.

    Query parameters

    • ziprequirede.g. 60601
    • radius_milesrequirede.g. 50
    • latoptionale.g. 41.9
    • lonoptionale.g. -87.6

    Every member is nullable and resolved independently, so a location with a real-time price and no day-ahead price gets the one it has, with a warning naming the other. An absent sensor is null, never 0 — a zero here reads as "the price is $0".

    source says which node answered and how far away it is, so a caller can tell whether a price 40 miles away is close enough for its purpose.

    Data class: measured, per member.

    Edge cases, all of which this route answers rather than refuses:

    More than one node in the radius is the normal case, not an error. Searching 60601 within even one mile already matches several nodes; a route whose job is to search a radius cannot treat that as a 400.

    An empty radius is a 404 naming what was searched for. Adak, Alaska within one mile has no nodes at all, and that is an answer, not a fault.

    A reading in no configured band gives band: null, with a warning. A sensor that has reported but has no band rows is a different case from one that has never reported, and both have to be survivable.

    A stale reading is still returned. Each reading carries its own timestamp and meta.as_of carries the newest, so a caller decides what is too old for its purpose rather than being handed nothing at all.

    Errors

    as Nearby Nodes, plus
    404not_foundno price or renewable sensor within the radius
    Security
    a read behind the v2 capability gate (`v2` + `read`, no role).
    Cache
    live tier — prices move every five minutes.
    curl "https://utility-api-86672132515.us-east1.run.app/api/v2/geo/nearby/power-grid/conditions?zip=60601&radius_miles=50" \
      -H "Authorization: $GRIDBASE_API_KEY"
    Response200
    {
      "meta": {
        "source": "sensor_num_series_latest", "class": "measured",
        "as_of": "2026-11-08T04:00:00Z",
        "warnings": ["no renewable-generation sensor within the radius"],
        "notes": ["measured from 41.8858,-87.6181 (postal code 60601) within 50 miles", ...]
      },
      "item": {
        "source": {
          "node":    { "id": "cac36285-...", "name": "COMED" },
          "network": { "id": "f1fd9f51-...", "name": "pjm" },
          "distance_miles": 0, "contains_origin": true,
          "sensor":  { "id": "1232001d-...", "name": "Real-Time LMP" }
        },
        "real_time_price": {
          "price_mwh": 17.75,
          "at": "2026-11-07T17:50:00Z",
          "band": { "name": "low", "recommendation": "..." },
          "next_price_mwh": null, "next_at": null
        },
        "day_ahead_price": { ... },
        "renewables": null
      }
    }
    Try it in the Explorer

    Nearby Load Forecast

    GET/api/v2/geo/nearby/power-grid/load-forecast

    The daily load forecast for the next 30 days at a location.

    Query parameters

    • ziprequirede.g. 60601
    • radius_milesrequirede.g. 50
    • latoptionale.g. 41.9
    • lonoptionale.g. -87.6

    This is load, not capacity. The sensor type is ldfct — Load Forecast — and the fields are named for load. The two are different quantities, and conflating them in a field name is how a caller sizes a battery against the wrong number.

    One object rather than a collection, because source describes the whole answer; repeating it on every day would be the only other way to carry it.

    readings is how many forecast points each day rests on. Without it, a day built from one reading and a day built from 24 look identical.

    Worth knowing

    The days are in date order, every time. Bucketing rows into a map and iterating it returns them in a different order on each call, which is not a property a client can build a chart on.

    One sensor answers, and source names it. Concatenating the forecasts of every matched node into one "summary" mixes several nodes' numbers with nothing saying which contributed — so the resolution picks one sensor and says which it picked.

    Aggregation happens in SQL, not by reading 1000 raw rows per node and bucketing them in the application.

    Errors

    as Nearby Nodes, plus
    404not_foundno load-forecast sensor within the radius
    Security
    a read behind the v2 capability gate (`v2` + `read`, no role).
    Cache
    live tier — the forecast is re-published hourly.
    curl "https://utility-api-86672132515.us-east1.run.app/api/v2/geo/nearby/power-grid/load-forecast?zip=60601&radius_miles=50" \
      -H "Authorization: $GRIDBASE_API_KEY"
    Response200
    {
      "meta": {
        "source": "sensor_num_series_v2", "class": "forecast",
        "coverage": { "from": "...", "to": "..." }, "total": 8, "notes": [...]
      },
      "item": {
        "source": {
          "node": { "id": "cac36285-...", "name": "COMED" },
          "network": { "id": "f1fd9f51-...", "name": "pjm" },
          "distance_miles": 0, "contains_origin": true,
          "sensor": { "id": "...", "name": "Load Forecast" }
        },
        "days": [
          {
            "date": "2026-11-07",
            "avg_load_mw": 9268.333333333334,
            "min_load_mw": 8998, "max_load_mw": 9861,
            "min_at": "2026-11-07T20:00:00Z",
            "max_at": "2026-11-07T23:00:00Z",
            "readings": 6
          }
        ]
      }
    }
    Try it in the Explorer

    Nearby Renewables

    GET/api/v2/geo/nearby/power-grid/renewables

    The current renewable share of generation at a location.

    Query parameters

    • latrequirede.g. 42.09
    • lonrequirede.g. -78.46
    • radius_milesrequirede.g. 25
    • zipoptionale.g. 10001

    The reading is a percentage, not a fraction — the sensor type is rwgnp, Renewable Generation Percentage. age_seconds lets a caller judge staleness without comparing clocks, and a reading over an hour old is warned about.

    There are exactly two of these sensors in the fleet: ISO-NE's at 42.4072,-71.3824 and NYISO's at 42.089498,-78.457328. Anywhere else answers 404 naming the radius it searched.

    Read from sensor_num_series_latest, the trigger-maintained per-sensor latest row that CLAUDE.md names as the right source for a "latest" query.

    Worth knowing

    One shape, always. {meta, item} whether the nearest renewable sensor is a mile away or the radius is empty — there is no fallback branch that answers with a different shape.

    The radius is the question, and it is not quietly widened. If nothing in range carries a renewable-generation sensor, that is a 404 naming what was searched for. Falling back to every renewable sensor on the nearest node's network answers a different question, and a result hundreds of miles from the origin would look like a local one.

    source.distance_miles is explicit, so a caller can judge whether the answering sensor is close enough for its purpose.

    Example: NYISO's renewable mix read 26.596% at 2026-11-07T17:30Z for ?zip=10001&radius_miles=50.

    Errors

    as Nearby Nodes, plus
    404not_foundno renewable-generation sensor within the radius
    404not_foundthe nearest one has never reported a value
    Security
    a read behind the v2 capability gate (`v2` + `read`, no role).
    Cache
    live tier.
    curl "https://utility-api-86672132515.us-east1.run.app/api/v2/geo/nearby/power-grid/renewables?lat=42.09&lon=-78.46&radius_miles=25" \
      -H "Authorization: $GRIDBASE_API_KEY"
    Response200
    {
      "meta": {
        "source": "sensor_num_series_latest", "class": "measured",
        "as_of": "2026-11-07T17:35:00Z", "notes": [...]
      },
      "item": {
        "source": {
          "node":    { "id": "bf6879ce-...", "name": "nyiso" },
          "network": { "id": "cbace340-...", "name": "nyiso" },
          "distance_miles": 0.14132630794907738,
          "contains_origin": false,
          "sensor":  { "id": "fb8978ef-...", "name": "Renewable Generation Mix" }
        },
        "mix": {
          "percent_of_generation": 26.60834223720786,
          "at": "2026-11-07T17:35:00Z",
          "age_seconds": 1417
        }
      }
    }
    Try it in the Explorer

    Nearby Sensors

    GET/api/v2/geo/nearby/sensors

    The sensors on nodes within a radius.

    Query parameters

    • ziprequirede.g. 60601
    • radius_milesrequirede.g. 2
    • limitrequirede.g. 50
    • latoptionale.g. 41.9
    • lonoptionale.g. -87.6
    • node_typeoptionale.g. pricing-node
    • offsetoptionale.g. 0

    Same origin and filter parameters as Nearby Nodes. distance_miles is the sensor's node's distance. Archived sensors are excluded, matching /api/v2/sensors.

    Worth knowing

    It pages. 60601 within 2 miles is 554 sensors; without paging that is one 208,355-byte response, and a node that happens to hold a full page worth of sensors is not a client error.

    A search matching no nodes returns [], never null.

    One join, not a query per matched node.

    The ordering is total: distance, then the node id, then the sensor id. Sorting by distance alone is non-deterministic where distances tie — three identical requests can return three different orderings — and paging over that repeats and skips rows.

    Errors

    as Nearby Nodes
    Security
    a read behind the v2 capability gate (`v2` + `read`, no role).
    Cache
    slow tier.
    curl "https://utility-api-86672132515.us-east1.run.app/api/v2/geo/nearby/sensors?zip=60601&radius_miles=2&limit=50" \
      -H "Authorization: $GRIDBASE_API_KEY"
    Try it in the Explorer

    Zip Lookup

    GET/api/v2/geo/zip/{zip}

    The reference row for a 5-digit US ZIP.

    Path parameters

    • ziprequirede.g. 60601

    Returns city, state, county, FIPS, eGRID subregion, zone, coordinates and the ASHRAE/IECC climate zone. Every nullable field is an explicit null, so a ZIP at 0,0 is distinguishable from one with no coordinates.

    meta.warnings says when a ZIP is missing something a caller is likely to need next: 645 of 41,533 have no coordinates (so the /geo/nearby routes cannot resolve them) and 1,120 have no climate zone (which the load-profile estimate needs).

    The response is a hand-written shape rather than the generated model, so a new database column cannot leak into the contract.

    ZIP is validated against ^\d{5}$ before it reaches the database and is bound. Data class: reference, third-party.

    A 404 carries a machine code and says how many ZIPs the table covers.

    Errors

    400invalid_parampostal_code is not 5 digits
    404not_foundno such postal code
    Security
    a read behind the v2 capability gate (`v2` + `read`, no role). The
    Cache
    static tier.
    curl "https://utility-api-86672132515.us-east1.run.app/api/v2/geo/zip/60601" \
      -H "Authorization: $GRIDBASE_API_KEY"
    Try it in the Explorer

    Zip Emission Rates

    GET/api/v2/geo/zip/{zip}/emission-rates

    The EPA eGRID emission factor and generation mix for a ZIP's subregion.

    Path parameters

    • ziprequirede.g. 60601

    Data class: reference, third-party (EPA eGRID).

    Worth knowing

    The postal code is validated against ^\d{5}$ before it reaches the database.

    A ZIP with no eGRID subregion is a 404 naming the reason. No ZIP lacks one today — 0 of 41,533 — but one ingest of an unmapped ZIP should not take the route down.

    A database error is a 500, never a 200. This is the response a caller computes carbon from; a zero-valued subregion served with a 200 reads as "this grid is perfectly clean", which is the most expensive possible way to be wrong here.

    One row, so {meta, item}. egrid_subregion is keyed by its code.

    The fuel columns are fractions and say so. The columns are numeric(5,4), so 0.3421 means 34.21% — the fields are named *_fraction rather than *_percent, and a warning fires when the nine do not sum to 1, so an incomplete published mix is not charted as though it totalled 100%.

    Errors

    400invalid_parampostal_code is not 5 digits
    404not_foundno such postal code
    404not_foundthe ZIP is not mapped to an eGRID subregion
    404not_foundthe subregion has no emission-factor row
    Security
    a read behind the v2 capability gate (`v2` + `read`, no role).
    Cache
    static tier.
    curl "https://utility-api-86672132515.us-east1.run.app/api/v2/geo/zip/60601/emission-rates" \
      -H "Authorization: $GRIDBASE_API_KEY"
    Response200
    {
      "meta": { "source": "egrid_subregion", "class": "reference" },
      "item": {
        "subregion": "RFCW",
        "subregion_name": "...",
        "description": "...",
        "emission_factor_kg_co2_per_kwh": 0.42,
        "fuel_mix": {
          "coal_fraction": 0.3421, "natural_gas_fraction": 0.28,
          "nuclear_fraction": 0.31, "hydro_fraction": 0.01,
          "wind_fraction": 0.05, "solar_fraction": 0.005,
          "biomass_fraction": 0.0, "geothermal_fraction": 0.0,
          "other_fraction": 0.0
        }
      }
    }
    Try it in the Explorer

    Zip Utility Rates

    GET/api/v2/geo/zip/{zip}/utility-rates

    The EIA-published utility rates for a ZIP.

    Path parameters

    • ziprequirede.g. 60601

    Query parameters

    • limitrequirede.g. 25
    • offsetoptionale.g. 0

    Data class: reference, third-party (EIA).

    Worth knowing

    The rates name their unit: USD per kWh, in the field names. Neither the columns nor the published source state it, so the field names have to.

    The postal code is validated against ^\d{5}$, so /geo/zip/abcde/utility-rates is refused rather than answered with an empty list.

    An empty result says which fact it is. A ZIP that does not exist is a 404; a ZIP with no EIA utility mapped to it is an empty list with a warning. Returning [] for both leaves a caller unable to tell a typo from an unserved area.

    The ordering is total: utility name, then the primary key. The EIA id is not unique across this join, so ordering on it alone lets paging repeat a row.

    limit defaults to 100 and caps at 1000, refusing above the cap rather than clamping.

    updated_at is stored timestamp without time zone, so it carries no offset; it is read as UTC, which is what the ingest writes.

    Errors

    400invalid_parampostal_code is not 5 digits
    400limit_exceededlimit above 1000
    404not_foundno such postal code
    Security
    a read behind the v2 capability gate (`v2` + `read`, no role).
    Cache
    static tier.
    curl "https://utility-api-86672132515.us-east1.run.app/api/v2/geo/zip/60601/utility-rates?limit=25" \
      -H "Authorization: $GRIDBASE_API_KEY"
    Response200
    {
      "meta": {
        "source": "eia_utility_rate", "class": "reference",
        "count": 2, "limit": 25, "offset": 0, "total": 2
      },
      "items": [
        {
          "eiaid": 4110,
          "utility_name": "Commonwealth Edison Co",
          "service_type": "Bundled",
          "ownership": "Investor Owned",
          "description": "...",
          "residential_rate_usd_per_kwh": 0.1512,
          "commercial_rate_usd_per_kwh": 0.0981,
          "industrial_rate_usd_per_kwh": 0.0672,
          "updated_at": "2026-01-14T00:00:00Z"
        }
      ]
    }
    Try it in the Explorer