Department of Energy Electricity API

The Electricity API from Department of Energy — 2 operation(s) for electricity.

GitHub OpenAPI
Business capability
Open Government Data AE-230.50

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /electricity List electricity data routes · Electricity dataset metadata #
Ask an LLM
“What electricity sub-routes does the EIA electricity dataset offer?”
“Can I see the electricity metadata before pulling retail sales?”
Tell an agent
Show the electricity dataset metadata.
List electricity data routes using API key {api_key}.
GET /electricity/retail-sales/data Get electricity retail sales data · Electricity retail sales data #
Ask an LLM
“How much electricity was sold retail in the U.S. each month?”
“Can I get annual electricity retail sales data for a date range?”
Tell an agent
Get electricity retail sales data from {start} to {end}.
Pull {frequency} electricity retail sales data for the last year.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/doe:doe-electricity-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

doe-electricity-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: EIA Open Data API V2 Aeo Electricity API
  description: The U.S. Energy Information Administration (EIA) Open Data API v2 is a fully RESTful implementation of EIA's public energy statistics. Routes are arranged in a logical hierarchy across petroleum, natural gas, coal, electricity, nuclear, renewables, total energy, international, and consumption series.
  version: '2.0'
servers:
- url: https://api.eia.gov/v2
  description: EIA Open Data API v2
security:
- apiKeyQuery: []
tags:
- name: Electricity
paths:
  /electricity:
    get:
      summary: Electricity dataset metadata
      description: Returns metadata for electricity sub-routes.
      operationId: getElectricity
      parameters:
      - $ref: '#/components/parameters/ApiKey'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteResponse'
      tags:
      - Electricity
  /electricity/retail-sales/data:
    get:
      summary: Electricity retail sales data
      description: Returns electricity retail sales data points.
      operationId: getElectricityRetailSalesData
      parameters:
      - $ref: '#/components/parameters/ApiKey'
      - $ref: '#/components/parameters/Frequency'
      - $ref: '#/components/parameters/Start'
      - $ref: '#/components/parameters/End'
      - $ref: '#/components/parameters/Offset'
      - $ref: '#/components/parameters/Length'
      responses:
        '200':
          description: Successful data response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataResponse'
      tags:
      - Electricity
components:
  schemas:
    DataResponse:
      type: object
      additionalProperties: true
      properties:
        response:
          type: object
          additionalProperties: true
          properties:
            total:
              type: integer
            data:
              type: array
              items:
                type: object
                additionalProperties: true
        request:
          type: object
          additionalProperties: true
        apiVersion:
          type: string
    RouteResponse:
      type: object
      additionalProperties: true
      properties:
        response:
          type: object
          additionalProperties: true
        request:
          type: object
          additionalProperties: true
        apiVersion:
          type: string
  parameters:
    ApiKey:
      name: api_key
      in: query
      required: true
      schema:
        type: string
      description: EIA Open Data API key.
    Start:
      name: start
      in: query
      schema:
        type: string
      description: Period start (inclusive).
    Offset:
      name: offset
      in: query
      schema:
        type: integer
      description: Pagination offset.
    Frequency:
      name: frequency
      in: query
      schema:
        type: string
      description: Period frequency (e.g., monthly, quarterly, annual).
    Length:
      name: length
      in: query
      schema:
        type: integer
      description: Maximum rows to return.
    End:
      name: end
      in: query
      schema:
        type: string
      description: Period end (inclusive).
  securitySchemes:
    apiKeyQuery:
      type: apiKey
      in: query
      name: api_key
x-generated-from: https://www.eia.gov/opendata/documentation.php
x-generated-by: claude-crawl-2026-05-08