# EIA US Electricity Data API

> EIA US Electricity Data API is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-14).

Returns US electricity data including generation mix by fuel type, regional demand, and average retail price by state/sector from EIA grid monitor and retail surveys.

## Facts

- Endpoint: GET https://api.agentstools.dev/energy/electricity
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/eia-us-electricity-data-api-829f532a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jIooB1p8NwqTmiWcUsrYP

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability eia-us-electricity-data-api-829f532a
```

Example prompt: What's the current electricity generation mix for Texas — show me the fuel type breakdown — and also pull the last 12 data points of demand for the same region?

## When to prefer this

Use this endpoint when you need current or recent US electricity data sourced from the official EIA — particularly for grid generation mix by fuel type (latest hour), regional demand trends, or state-level retail electricity pricing by sector. Prefer this over general web search when you need structured, cited EIA data ready for analysis or comparison without scraping.

## Known failure modes

- Invalid region enum value returns 400 or empty result
- Unsupported state code for retail_price returns error or empty series
- History value out of range (>120 or <1) rejected by schema validation
- EIA data source unavailable causes upstream timeout or stale data response
- Missing required 'metric' or 'method' field in input causes validation error

## How this service works

US electricity data from the EIA grid monitor and retail survey: generation mix by fuel type with percentage breakdown (latest hour), demand by region, and average retail price by state/sector (monthly).

## Output

Returns structured electricity data: for generation_mix, a percentage breakdown by fuel type (natural gas, coal, wind, solar, nuclear, hydro, etc.) for the latest hour in the selected region; for demand, recent demand values by region; for retail_price, average monthly retail electricity price by state and sector (residential, commercial, industrial).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "state": {
       "type": "string",
       "description": "Two-letter state code or US for retail_price (default US)"
      },
      "metric": {
       "enum": [
        "generation_mix",
        "demand",
        "retail_price"
       ],
       "type": "string",
       "description": "Which electricity series (default generation_mix)"
      },
      "region": {
       "enum": [
        "us",
        "california",
        "carolinas",
        "central",
        "florida",
        "mid_atlantic",
        "midwest",
        "new_england",
        "new_york",
        "northwest",
        "southeast",
        "southwest",
        "tennessee",
        "texas"
       ],
       "type": "string",
       "description": "Grid region for generation_mix/demand (default us)"
      },
      "history": {
       "type": "integer",
       "maximum": 120,
       "minimum": 1,
       "description": "Recent data points for demand/retail_price"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/eia-us-electricity-data-api-829f532a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
