canonical: https://jentic.com/apis/eia.gov/eia

# Eia Gov EIA Open Data API

The EIA Open Data API serves U.S. Energy Information Administration statistics across electricity, petroleum, natural gas, coal, and total energy from a single versioned query hierarchy. It exposes a browsable route tree where your agent lists top-level categories, drills into a dataset such as electricity retail sales, and pulls the data with facet filters applied. It also resolves legacy v1 series identifiers so existing dashboards keep working against the v2 surface.

## For AI agents

Query official U.S. energy statistics for electricity, petroleum, natural gas, and coal, browse the dataset hierarchy, discover facet values, and resolve legacy series identifiers.

## Scope

Does not handle energy trading, utility billing, or grid control. Use for retrieving published U.S. energy statistics only.

## Capabilities

- Browse the dataset hierarchy from top-level categories down to a specific series
- Retrieve electricity retail sales figures with facet and period filters
- Pull petroleum gasoline and diesel price data for a chosen period
- Query natural gas price summaries and coal shipment receipt data
- Resolve a legacy v1 series identifier against the v2 data surface
- List available facet values before building a filtered data request

## Use cases

### Agent-Driven Energy Data Retrieval

An AI agent connected through Jentic answers energy questions by browsing the EIA route hierarchy, selecting the right dataset such as petroleum prices or electricity retail sales, and pulling the figures with facet and period filters. Because the API organises every fuel type under one versioned tree, the agent discovers what is available before it queries, instead of guessing dataset names.

Example prompt: Browse the electricity category, then retrieve retail sales data filtered to the most recent available period

### Fuel Price Monitoring

Teams tracking energy costs retrieve gasoline, diesel, and natural gas price data on a schedule. The EIA API returns authoritative price summaries per fuel so a reporting pipeline can refresh a dashboard without scraping, and legacy series identifiers keep older reports pointed at the same underlying data.

Example prompt: Retrieve the latest gasoline and diesel price summary and compare it against natural gas price data

### Electricity Market Analysis

Analysts studying electricity markets pull retail sales data and first list the facet values available so they can filter by the dimensions the dataset actually supports. The EIA API returns the facet list for a dataset, which lets an agent construct a valid, filtered query rather than requesting the whole series.

Example prompt: List the facet values for electricity retail sales, then request the sales data filtered by a chosen facet

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/` | List top-level data categories |
| GET | `/electricity` | List electricity data subcategories |
| GET | `/electricity/retail-sales/data` | Retrieve electricity retail sales data |
| GET | `/petroleum/pri/gnd/data` | Retrieve gasoline and diesel prices |
| GET | `/natural-gas/pri/sum/data` | Retrieve natural gas price summary data |
| GET | `/total-energy/data` | Retrieve total energy statistics |
| GET | `/seriesid/{seriesId}` | Retrieve data by legacy v1 series ID |
| GET | `/electricity/retail-sales/facet/{facetId}` | List facet values for electricity retail sales |

## Key resources

- **Categories** — Browse the dataset route hierarchy from the top level into each fuel type
- **Electricity** — Retail sales data and the facet values that filter it
- **Petroleum** — Gasoline and diesel price data
- **Natural gas** — Price summary data
- **Coal** — Shipment receipt data
- **Series** — Resolve legacy v1 series identifiers against the v2 surface

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 46 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 93 / 100
  - Developer Experience & Jentic Compatibility: 58 / 100
  - AI-Readiness & Agent Experience: 43 / 100
  - Agent Usability: 94 / 100
  - Security: 15 / 100
  - AI Discoverability: 76 / 100
- **View full report:** https://jentic.com/apis/eia.gov/eia/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the EIA API by hand means registering for a key, learning the versioned route hierarchy, and threading the key through every query string. Through Jentic you install once, import the EIA Open Data API from the API Directory, store the key once, and your agent calls the data endpoints.
- **Permission scoping:** Every EIA operation is read-only, so you choose exactly which ones your agent may call, such as listing categories and retrieving electricity or petroleum data. There are no write or delete operations to expose, and a rule keeps the agent to the datasets you intend.
- **Credential handling:** Your EIA API key is held by your own Jentic One instance, encrypted, and injected into the query string at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get electricity retail sales' or 'retrieve gasoline prices', and Jentic returns the matching EIA operation with its input schema so the agent queries the right dataset without browsing the route tree by hand.

## Related APIs

- **Bureau of Labor Statistics API** — Another free U.S. government open-data API, covering labor and price statistics rather than energy.
- **U.S. Census Bureau API** — U.S. demographic and economic data that pairs with EIA energy figures for population-adjusted analysis.
- **USDA Economic Research Service API** — USDA economic datasets that complement EIA for cross-sector energy-and-agriculture analysis.

## FAQ

### What authentication does the EIA Open Data API use?

The EIA Open Data API authenticates with an API key passed as the `api_key` query parameter, per its OpenAPI spec. You register for a free key on the EIA Open Data site. Through Jentic the key is stored by your own Jentic One instance and attached to each request at execution time, so it never appears in your agent's prompt or logs.

### Can I retrieve electricity and fuel prices with the EIA Open Data API?

Yes. The API returns electricity retail sales data, petroleum gasoline and diesel prices, natural gas price summaries, and coal shipment receipts, each under its own route in the dataset hierarchy. You can list the facet values for a dataset first and then request the data filtered to the facets and period you need.

### What are the rate limits for the EIA Open Data API?

The OpenAPI spec does not specify rate limits. Check the EIA Open Data documentation at https://www.eia.gov/opendata/ for the current per-key limits before scheduling frequent pulls.

### Is there an EIA Open Data MCP server?

You do not need an MCP server to give your agent the EIA Open Data API. Jentic connects it directly from the API Directory: import it, store your key once, and your agent calls the data endpoints on demand without loading an extra server's tool definitions into its context.

### Can I limit what my agent is allowed to do with the EIA Open Data API?

Yes. Every operation here is a read, so you write a rule that allows only the dataset-listing and data-retrieval operations your agent needs, such as reading electricity retail sales and petroleum prices, and it can touch nothing else. Every call it makes is logged.

### How do I pull EIA energy data through Jentic?

Install the Jentic One command line with `curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh`, then add the EIA Open Data API from the Jentic directory and search by intent such as 'retrieve electricity retail sales'. Jentic returns the matching operation with its input schema so your agent builds a valid query. To run it on your own infrastructure, install Jentic One from its GitHub repo.
