Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Energy Information Administration Electricity API

Electricity generation, retail sales, and balancing authority data.

Energy Information Administration Electricity API is one of 10 APIs that Energy Information Administration publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Electricity. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 2 operations across 2 paths, and defines 2 schemas. It is described by OpenAPI 3.1.0, at version 2.1.

Requests are made against a single base URL, https://api.eia.gov/v2.

2 operations 2 paths 2 schemas 2 GET

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
2.1
Base URL
https://api.eia.gov/v2
Authentication
API Key
Resource Areas
1

Authentication & Security 1

Energy Information Administration Electricity API declares 1 security scheme for authenticating requests. An API key is passed in the query as api_key (apiKeyQuery). By default, every request must be authenticated.

  • apiKeyQuery — Free API key obtained at https://www.eia.gov/opendata/register.php. Must be supplied on every request as the apikey URL parameter.

Paths & Operations 2

Across 2 paths, the API surfaces 2 operations — 2 GET. Each is listed below with its method, path, parameters, and response codes.

Electricity 2

Electricity generation, retail sales, and balancing authority data.

GET
/electricity
List electricity child routes
getElectricityRoutes → 200
GET
/electricity/retail-sales/data
Query electricity retail sales time series
getElectricityRetailSales 7 params → 200

Schemas 2

The contract defines 2 schemas that model the data the API accepts and returns. The most detailed are SeriesResponse (3 properties), RouteMetadata (3 properties). Each schema is shown below with its type and property counts.

RouteMetadata
object
Metadata about a route, including its child routes, facets, and frequencies.
3 properties
SeriesResponse
object
Time-series data response.
3 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

energy-information-administration-electricity-api-openapi.yml Raw ↑

Other APIs Energy Information Administration publishes across the network.

Energy Information Administration CO2 Emissions API
Energy Information Administration Coal API
Energy Information Administration Discovery API
Energy Information Administration International API
Energy Information Administration Natural Gas API
Energy Information Administration Nuclear API
Energy Information Administration Petroleum API
Energy Information Administration SEDS API
Energy Information Administration Total Energy API