# US Electricity Data API — EIA Generation, Prices & Sales (`nexgensignal/eia-electricity-time-series-observations`) Actor

US electricity statistics from EIA's official bulk file: retail prices, sales, revenue, customers, generation, fuel use and receipts by state, sector and plant. Filter by series, name, state, frequency and period. No API key. Part of NexGen Signal — official-source data products

- **URL**: https://apify.com/nexgensignal/eia-electricity-time-series-observations.md
- **Developed by:** [NexGen Signal](https://apify.com/nexgensignal) (community)
- **Categories:** News, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $33.50 / 1,000 eia electricity observations

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## ⚡ US Electricity Data API — EIA Generation, Prices & Sales

Get US electricity statistics as clean records — retail prices, sales, revenue and customers by state and sector, net generation and fuel consumption by fuel type, fuel receipts, costs and stocks, down to individual power plants — straight from the U.S. Energy Information Administration's official Open Data bulk file `ELEC.zip`.

Energy analysts, utilities, traders and researchers use it to track power prices, follow generation by fuel and benchmark plants. EIA publishes it as one 293 MB ZIP of 765,211 series: this actor streams the file, keeps only the series you ask for, and delivers one record per observation with units, period and geography — no API key.

The unit of output is one observation (one series, one period). You pay per observation delivered; a run that finds nothing costs nothing.

### 📊 Sample Output

![Table of EIA electricity observations: Texas net generation, all fuels, monthly values in thousand megawatthours.](https://api.apify.com/v2/key-value-stores/IXCaMKjxSmUTLHhmq/records/eia-electricity-time-series-observations.png)

| series_id | period | value | units | geography |
|---|---|---|---|---|
| ELEC.GEN.ALL-TX-99.M | 202607 | 63541.83825 | thousand megawatthours | USA-TX |
| ELEC.GEN.ALL-TX-99.M | 202606 | 57844.67108 | thousand megawatthours | USA-TX |
| ELEC.GEN.ALL-TX-99.M | 202605 | 50690.01944 | thousand megawatthours | USA-TX |
| ELEC.GEN.ALL-TX-99.M | 202604 | 46957.59145 | thousand megawatthours | USA-TX |
| ELEC.GEN.ALL-TX-99.M | 202603 | 46858.08699 | thousand megawatthours | USA-TX |

Rows from live run `TvCfcLuOxpNNdesDp` on Apify (input: name contains net generation, Texas, "all fuels", "all sectors"; monthly; 40 records). Notice the newest month first, the EIA series id that identifies the exact series, and units on every row.

### ✅ What you get

Every field of each record:

- `record_id` — `<series_id>:<period>`, unique per observation.
- `series_id` — EIA series id, e.g. `ELEC.PRICE.TX-RES.M`.
- `series_name` — series name as EIA publishes it.
- `units` — units, e.g. `cents per kilowatthour`.
- `units_short` — short units, when EIA gives them.
- `frequency` — `A`, `Q`, `M`, `W`, `D` or `4` (four-week average).
- `frequency_label` — annual, quarterly, monthly, weekly, daily, four-week average.
- `period` — period exactly as published: `2025`, `2025Q2`, `202506` or `20250613`.
- `period_start` — first day of the period as an ISO date.
- `value` — the observation. Only non-null observations are delivered.
- `geography` — EIA geography code(s), e.g. `USA-TX`.
- `geography2` — second geography for flows between two areas.
- `iso3166` — ISO 3166 code, when given.
- `latitude`, `longitude` — plant-level series only.
- `series_description` — EIA's description of the series, when given.
- `series_start`, `series_end`, `series_last_updated` — the series' first and last period, and when EIA last updated it.
- `source`, `source_dataset`, `licence`, `attribution`, `observed_at` — provenance on every record: EIA and the dataset, the bulk file and its last-modified date, EIA's public-domain statement quoted, the acknowledgment EIA asks for (e.g. `Source: U.S. Energy Information Administration (Sep 2026)`), and the UTC time the record was read.

### ⚙️ Sample inputs

**1. Store example — Texas residential electricity price (monthly, quarterly, annual)**

```json
{
  "seriesIdPrefixes": ["ELEC.PRICE.TX-RES."],
  "maxRecords": 10
}
```

Returns the 10 newest observations of the first matching series; about $0.50 on the Free plan.

**2. Narrowed — Texas net generation, all fuels, monthly, since 2024**

```json
{
  "nameContains": ["net generation texas \"all fuels\" \"all sectors\""],
  "frequencies": ["M"],
  "periodFrom": "2024",
  "maxRecords": 100
}
```

Name search reads the file until the series is found; monthly values since January 2024.

**3. Bulk — latest retail price for every state and sector**

```json
{
  "seriesIdPrefixes": ["ELEC.PRICE."],
  "frequencies": ["M"],
  "latestOnly": true,
  "maxRecords": 500
}
```

One record per monthly price series (352 state × sector series in the 25 September file): the newest month. About $17.60 on Free, $11.79 on Gold.

Input fields:

| Field | Meaning |
|---|---|
| `seriesIdPrefixes` | series ids starting with any of these — end with a dot to take every frequency of one series |
| `seriesIds` | exact series ids |
| `nameContains` | series whose name has every word of an entry, any order; put a phrase in double quotes to keep its words together |
| `geography` | text in the geography or ISO code, e.g. `USA-TX` |
| `frequencies` | any of `A`, `Q`, `M`, `W`, `D`, `4` |
| `periodFrom` | first period wanted: `2024`, `2024Q2`, `2024-06` or `2024-06-15` |
| `periodTo` | last period wanted (same formats) |
| `latestOnly` | one record per series: its newest observation inside the window |
| `maxRecords` | most observations delivered and billed in this run (default 1,000) |

### 🧾 JSON sample record

```json
{
  "record_id": "ELEC.GEN.ALL-TX-99.M:202607",
  "series_id": "ELEC.GEN.ALL-TX-99.M",
  "series_name": "Net generation : Texas : all sectors : all fuels : monthly",
  "units": "thousand megawatthours",
  "units_short": null,
  "frequency": "M",
  "frequency_label": "monthly",
  "period": "202607",
  "period_start": "2026-07-01",
  "value": 63541.83825,
  "geography": "USA-TX",
  "geography2": null,
  "iso3166": "USA-TX",
  "latitude": null,
  "longitude": null,
  "series_description": "Summation of all fuels used for electricity generation; All sectors; ",
  "series_start": "200101",
  "series_end": "202607",
  "series_last_updated": "2026-09-23T16:26:26-04:00",
  "source": "U.S. Energy Information Administration (EIA) — Electricity (EIA Open Data bulk download)",
  "source_dataset": "EIA Open Data bulk file ELEC.zip (ELEC.txt), last modified Fri, 25 Sep 2026 10:09:38 GMT",
  "licence": "Public domain. EIA: \"U.S. government publications are in the public domain and are not subject to copyright protection. You may use and/or distribute any of our data, files, databases, reports, graphs, charts, and other information products that are on our website or that you receive through our email distribution service.\" (eia.gov/about/copyrights_reuse.php)",
  "attribution": "Source: U.S. Energy Information Administration (Sep 2026)",
  "observed_at": "2026-10-04T03:48:35Z"
}
```

### 🔧 How it works

1. **Robots check.** `www.eia.gov/robots.txt` is read on every run; it allows `/opendata/bulk/`. A real disallow stops the run with nothing charged.

2. **Streamed download.** The actor opens `https://www.eia.gov/opendata/bulk/ELEC.zip` and decompresses the ZIP line by line as it arrives. Nothing is saved to disk and the file is never downloaded first.

3. **Filter before parsing.** Each line is one series. Its id is checked against your prefixes, ids and frequencies before the line is parsed, so a narrow request skips most of the file. Name and geography filters parse every series line.

4. **Deliver, then charge.** Non-null observations inside your period window become records, newest first, pushed in batches; each batch is charged after delivery, so records and charges always match. The download stops the moment `maxRecords` or your maximum charge is reached.

5. **Receipt.** `RUN_RECEIPT` records the file and its date, lines read, series matched, whether the file was read to the end, and delivered and charged counts.

No login, API key, proxy or bot workaround — one public EIA file, and no personal data in it.

### 💰 Pricing example

Per observation delivered, no start fee, no monthly charge:

| Apify plan | Price per observation |
|---|---|
| Free | $0.05 |
| Bronze | $0.045 |
| Silver | $0.04 |
| Gold, Platinum, Diamond | $0.0335 |

- 10 observations (the Store example): $0.50 on the Free plan, $0.335 on Gold.
- 1,000 observations (the default cap): $50 on Free, $45 on Bronze, $40 on Silver, $33.50 on Gold.

**Coverage and size.** Live count from the file read on 3 October 2026 (ELEC.zip, last modified 25 September 2026): **59,748,561 non-null observations in 765,211 series** (plus 22,491 category lines = 787,702 lines; the planning index counted 787,702 series and 59,748,561 observations — the observation counts agree). The file is 293 MB compressed and 1.42 GB of text. A filter is required; a run that must scan the whole file (name or geography filters, or an id that does not exist) reads it in about 35 seconds on Apify. A full pull of every observation is a multi-hour job and is billed per observation. Plant-level series (`ELEC.PLANT…`, 679,137 of them) carry latitude and longitude.

### ⚖️ Legal & ToS

Data: U.S. Energy Information Administration, Open Data bulk download (`ELEC.zip`). EIA's copyright and reuse page says: "U.S. government publications are in the public domain and are not subject to copyright protection. You may use and/or distribute any of our data, files, databases, reports, graphs, charts, and other information products that are on our website or that you receive through our email distribution service." EIA asks for an acknowledgment with the publication date; every record carries one in `attribution`.

The actor reads only this public file with a declared User-Agent; `www.eia.gov/robots.txt` allows the path and is checked on every run. No login, key, proxy or form. Energy statistics and facility-level series only — no personal data.

This actor is not affiliated with or endorsed by EIA. Figures are EIA's as published in the file; check EIA's release notes for revisions.

### ❓ FAQ

**Do I need an EIA API key or account?**
No. The actor reads EIA's public bulk file, which needs no key, login or registration.

**Why must I give a series prefix, id, name or geography?**
Because the file is large (1.42 GB of text, 59.7 million observations). A filter keeps runs fast and bills only what you asked for; the actor refuses an unfiltered run with a clear message.

**Why did my run return 0 records?**
Nothing in the file matched — usually a prefix that is too specific or a period window with no data. The receipt shows how many series matched. A zero-record run is not charged.

**How fresh is the data?**
As fresh as EIA's `ELEC.zip`, which EIA republishes as its releases update; each record names the file's last-modified date.

**Can I get the whole file?**
Yes: widen the filters and raise `maxRecords`. The file is streamed, never held in memory; the receipt states how far it was read. Large pulls take a long time and are billed per observation.

**Which series families are in the file?**
Retail price, sales, revenue and customers (`ELEC.PRICE`, `ELEC.SALES`, `ELEC.REV`, `ELEC.CUSTOMERS`), net generation (`ELEC.GEN`), fuel consumption (`ELEC.CONS_…`), fuel receipts, cost and quality (`ELEC.RECEIPTS`, `ELEC.COST`, `ELEC.SULFUR_CONTENT`, `ELEC.ASH_CONTENT`), stocks (`ELEC.STOCKS`) and plant-level series (`ELEC.PLANT`).

### 🆘 Troubleshooting

- **0 records with a prefix** — check the id format on EIA's site — e.g. `ELEC.PRICE.TX-RES.M`; prefixes are matched from the start of the id.
- **Name search matched the wrong series** — words match in any order; put phrases in double quotes, e.g. `"all fuels"`, so `wood-derived fuels` no longer matches.
- **Run is slow** — name and geography filters scan the whole 1.42 GB file; a series-id prefix stops much sooner.
- **CAPPED message** — your maximum total charge was reached; raise it in the run options.

### 🔗 Related Actors

- [CFTC Commitments of Traders (COT) Data — Weekly Positions](https://apify.com/nexgensignal/cftc-commitments-of-traders-records) — weekly futures positioning in crude oil, natural gas and power alongside EIA prices.
- [EU Fuel Prices — Weekly Oil Bulletin by Country Since 2005](https://apify.com/nexgensignal/eu-weekly-oil-bulletin-records) — European pump prices to compare with US gasoline and diesel.
- [Spain Fuel Prices by City & Station — Cheapest (MINCOTUR)](https://apify.com/nexgensignal/es-fuel-station-price-records) — station-level fuel prices in Spain.
- [ENERGY STAR Product Records — EPA Certified Products](https://apify.com/nexgensignal/energy-star-product-records) — efficiency ratings for appliances and equipment.

🏢 **About NexGen Signal** — official-source data products from government and regulator publications. Browse the catalog: [apify.com/nexgensignal](https://apify.com/nexgensignal)

### ⭐ Found this useful?

If this actor saved you time, a rating on its Apify Store page helps other buyers find it.

Part of NexGen Signal — official-source data products.

# Actor input Schema

## `seriesIdPrefixes` (type: `array`):

Series ids starting with any of these, e.g. ELEC.PRICE.TX-RES. (end with a dot to include every frequency of one series). Ids in this dataset start with ELEC.

## `seriesIds` (type: `array`):

Exact series ids, e.g. ELEC.PRICE.US-ALL.M.

## `nameContains` (type: `array`):

Series whose name has every word of an entry, in any order (not case-sensitive), e.g. net generation all fuels texas. Reads the whole file.

## `geography` (type: `array`):

Geography or ISO code text, e.g. USA-TX. Reads the whole file.

## `frequencies` (type: `array`):

Any of A (annual), Q (quarterly), M (monthly), W (weekly), D (daily), 4 (four-week average).

## `periodFrom` (type: `string`):

Only observations from this period: 2024, 2024Q2, 2024-06 or 2024-06-15.

## `periodTo` (type: `string`):

Only observations up to this period (same formats).

## `latestOnly` (type: `boolean`):

One record per series: its most recent observation (inside the period window).

## `maxRecords` (type: `integer`):

Most observations delivered and billed in this run. One record = one observation.

## Actor input object example

```json
{
  "seriesIdPrefixes": [
    "ELEC.PRICE.TX-RES."
  ],
  "seriesIds": [],
  "nameContains": [],
  "geography": [],
  "frequencies": [],
  "latestOnly": false,
  "maxRecords": 10
}
```

# Actor output Schema

## `results` (type: `string`):

The delivered (and billed) observations.

## `receipt` (type: `string`):

File used, lines read, series matched, delivered and charged counts.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "seriesIdPrefixes": [
        "ELEC.PRICE.TX-RES."
    ],
    "maxRecords": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgensignal/eia-electricity-time-series-observations").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "seriesIdPrefixes": ["ELEC.PRICE.TX-RES."],
    "maxRecords": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgensignal/eia-electricity-time-series-observations").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "seriesIdPrefixes": [
    "ELEC.PRICE.TX-RES."
  ],
  "maxRecords": 10
}' |
apify call nexgensignal/eia-electricity-time-series-observations --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nexgensignal/eia-electricity-time-series-observations"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Tp6g6DdeOnNIj3I40/builds/bfiy43qlXQSOA77P5/openapi.json
