# EIA Energy Data — Natural Gas, Crude Oil & Electricity (`gochujang/eia-energy-data`) Actor

US Energy Information Administration data: weekly natural gas storage (Thursday release), crude oil stocks (Wednesday release), Cushing inventories, SPR, refinery runs, gasoline/distillate stocks, retail prices, and monthly electricity generation by source. Free API key required.

- **URL**: https://apify.com/gochujang/eia-energy-data.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Business
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 eia series fetcheds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

### EIA Energy Data — Natural Gas, Crude Oil, Petroleum & Electricity

Fetch **US energy market data** from the US Energy Information Administration (EIA) — the authoritative source for US energy statistics. Track weekly **natural gas storage** (the Thursday 10:30 AM release that moves gas futures ±5%), **crude oil and petroleum inventories** (the Wednesday release that moves WTI and Brent), Cushing stocks, the Strategic Petroleum Reserve, refinery runs, gasoline and distillate inventories, retail fuel prices, and monthly electricity generation by source. A free EIA API key is required.

EIA data releases are among the most predictable, highest-impact market events in commodity trading. Natural gas storage surprises routinely move NYMEX Henry Hub futures 3-7% within minutes of release. Crude oil inventory data drives WTI and Brent, jet fuel prices, and energy equity prices globally.

### Built-In Series

| Key | Description | Frequency | Release |
|-----|-------------|-----------|---------|
| `natgas_storage` | Natural Gas in Underground Storage (Lower 48) | Weekly | Thursday 10:30 AM ET |
| `crude_stocks` | US Crude Oil Stocks (ex Strategic Reserve) | Weekly | Wednesday 10:30 AM ET |
| `crude_production` | US Crude Oil Field Production | Weekly | Wednesday |
| `cushing_stocks` | Cushing, OK Crude Oil Stocks (WTI delivery) | Weekly | Wednesday |
| `spr_stocks` | Strategic Petroleum Reserve Stocks | Weekly | Wednesday |
| `refinery_runs` | Gross Inputs to Refineries | Weekly | Wednesday |
| `gasoline_stocks` | US Motor Gasoline Stocks | Weekly | Wednesday |
| `distillate_stocks` | US Distillate Fuel Oil / Diesel Stocks | Weekly | Wednesday |
| `gasoline_price` | US Regular Gasoline Retail Price | Weekly | Monday |
| `natgas_price_henry_hub` | Henry Hub Natural Gas Spot Price | Daily | Daily |
| `electricity_gen_total` | US Total Electricity Net Generation | Monthly | Monthly |
| `electricity_gen_solar` | US Solar Electricity Generation | Monthly | Monthly |
| `electricity_gen_wind` | US Wind Electricity Generation | Monthly | Monthly |

You can also pass any raw EIA series ID — access 1 million+ series from eia.gov.

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `apiKey` | string | **required** | Free EIA API key |
| `series` | array | 6 weekly petroleum series | Series keys or raw EIA IDs |
| `numPoints` | integer | `104` | Most recent N observations per series |
| `startDate` | string | — | Optional start date (YYYY-MM-DD) |
| `endDate` | string | — | Optional end date (YYYY-MM-DD) |

### Sample Output

```json
{
  "series_key": "natgas_storage",
  "series_id": "NG.NW2_EPG0_SWO_R48_BCF.W",
  "series_name": "Natural Gas Working Gas in Underground Storage (Lower 48 States)",
  "unit": "billion cubic feet",
  "frequency": "weekly",
  "notes": "Thursday 10:30 AM ET release — major price mover",
  "date": "2025-01-10",
  "value": 2985.0
}
```

```json
{
  "series_key": "cushing_stocks",
  "series_id": "PET.WCSSTUS1.W",
  "series_name": "Cushing, OK Crude Oil Stocks (WTI Delivery Point)",
  "unit": "million barrels",
  "frequency": "weekly",
  "date": "2025-01-08",
  "value": 24.3
}
```

### Why Energy Inventory Data Matters

**Natural Gas Storage** is the market's primary supply-demand balance indicator. When storage is below the 5-year average, prices rise; above average, prices fall. The weekly change vs. analyst consensus (the "surprise") is what moves prices. A surprise draw of 100 BCF can push Henry Hub up 5% instantly.

**Crude Oil Stocks** serve the same function for oil markets. When Cushing crude rises, it signals WTI oversupply and prices typically fall. When Cushing drains, WTI strengthens. Energy equity valuations and refinery margins also track inventory closely.

**Strategic Petroleum Reserve (SPR)** draws made during supply shocks (COVID, Russia-Ukraine) directly affect market expectations for future supply tightness. The SPR rebuild (after historic 2022 drawdowns) supports crude prices by signaling government buying.

**Electricity Generation Mix** tracks the energy transition — the growth of solar and wind generation relative to natural gas and coal. This data drives the long-run demand outlook for each fuel.

### Use Cases

- **Energy futures trading** — track storage vs. 5-year average to predict direction of gas/oil prices
- **Commodity momentum signals** — use weekly inventory changes as a systematic factor
- **Energy equity research** — inventory levels drive E\&P and refinery earnings expectations
- **Inflation modeling** — gasoline and energy prices are components of CPI; EIA data leads the print
- **Clean energy transition tracking** — monitor solar, wind, and fossil fuel generation share trends
- **Supply chain analysis** — distillate stocks affect trucking, diesel-dependent industries
- **Algorithm triggers** — schedule actor at 10:30 AM ET Wednesday/Thursday for real-time signals

### Getting a Free EIA API Key

1. Visit [eia.gov/opendata/register.php](https://www.eia.gov/opendata/register.php)
2. Register with email — takes 30 seconds
3. Key is delivered instantly

Rate limit: 100,000 requests per hour.

### Pricing

Pay-per-event: **$0.002 per series fetched** — default 6 series = $0.012 per run. Fetch 2 years of weekly data for all 13 built-in series for $0.026.

### FAQ

**How accurate is the weekly data?**
EIA conducts mandatory surveys of petroleum refiners, bulk terminal operators, and pipeline operators. Natural gas storage data comes from weekly surveys of underground storage operators. Data quality is high, though revisions occur monthly when the EIA releases its monthly surveys.

**What is the difference between working gas and total gas storage?**
Working gas is gas available for delivery to the market. Base gas (cushion gas) is the minimum volume required to maintain pressure and is not counted in the "storage" figure that markets trade on.

**When exactly does data become available?**
The petroleum report (Weekly Petroleum Status Report, WPSR) releases Wednesday at 10:30 AM ET. Natural gas storage (Natural Gas Weekly Update) releases Thursday at 10:30 AM ET. API data is updated within minutes of official release.

**Can I get data back to the 1970s?**
Yes — EIA has historical petroleum data back to the late 1970s and natural gas data back to the 1990s. Set `startDate` or increase `numPoints` to retrieve longer histories.

***

### Related actors

- [Energy Prices Tracker](https://apify.com/gochujang/energy-prices-tracker) — WTI, Brent, and natural gas spot prices to pair with EIA inventory/supply data
- [CFTC COT Tracker](https://apify.com/gochujang/cftc-cot-tracker) — Crude oil and natural gas speculator positioning that reacts to EIA inventory surprises
- [FRED Economic Data](https://apify.com/gochujang/fred-economic-data) — EIA production data also available through FRED for integrated macro context

### Feedback

If this actor powers your energy market research, a review helps others find it: [Leave a review on Apify Store](https://apify.com/gochujang/eia-energy-data#reviews)

***

**Keywords:** EIA energy data, natural gas storage, crude oil inventory, EIA weekly data, US energy statistics, Cushing inventory, SPR strategic reserve, refinery runs, gasoline stocks, distillate stocks, electricity generation, energy prices, oil market data, EIA API scraper

# Actor input Schema

## `apiKey` (type: `string`):

Free EIA API key from eia.gov/opendata/register.php

## `series` (type: `array`):

EIA series keys. Built-in: 'natgas_storage', 'crude_stocks', 'crude_production', 'cushing_stocks', 'spr_stocks', 'refinery_runs', 'gasoline_stocks', 'distillate_stocks', 'gasoline_price', 'natgas_price_henry_hub', 'electricity_gen_total', 'electricity_gen_solar', 'electricity_gen_wind'. Also accepts raw EIA series IDs.

## `numPoints` (type: `integer`):

Most recent N observations to return per series (max 2000). Weekly series: 104 = 2 years.

## `startDate` (type: `string`):

Filter by start date (YYYY-MM-DD). Leave empty to use numPoints instead.

## `endDate` (type: `string`):

Filter by end date (YYYY-MM-DD). Leave empty for latest data.

## Actor input object example

```json
{
  "series": [
    "natgas_storage",
    "crude_stocks",
    "crude_production",
    "cushing_stocks",
    "gasoline_stocks",
    "distillate_stocks"
  ],
  "numPoints": 104
}
```

# Actor output Schema

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/eia-energy-data").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("gochujang/eia-energy-data").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 '{}' |
apify call gochujang/eia-energy-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gochujang/eia-energy-data"
        }
    }
}
```

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/iQTN2dLgaQim58gT8/builds/jopWya7iBL2syJgFy/openapi.json
