# Energy Prices Tracker (Oil, Gas, Uranium, Coal, Solar) (`gochujang/energy-prices-tracker`) Actor

Track real-time energy commodity prices: WTI/Brent crude, natural gas, coal, uranium, solar and wind ETFs. Aggregates Yahoo Finance and EIA data. Includes supply/demand signals, geopolitical risk premium, energy transition score, and portfolio allocation for energy trading and macro research.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### What does Energy Prices Tracker do?

**Energy Prices Tracker** is an **Apify Actor** that fetches real-time commodity prices for crude oil (WTI and Brent), natural gas, uranium, coal, and clean energy ETFs in a single structured snapshot. It acts as an **oil gas electricity price API**, aggregating data from Yahoo Finance and the U.S. Energy Information Administration (EIA) into one record per run — complete with macro signals, geopolitical risk premiums, and portfolio allocation guidance. No API key is required for core functionality.

It is purpose-built for **energy trading research**, macro analysis, and automated dashboards that need clean, consistent **commodity energy data** on demand.

***

### Why use Energy Prices Tracker?

- **Macro and inflation research** — monitor WTI and Brent crude alongside natural gas to classify the current **energy inflation signal** (`low`, `moderate`, `elevated`, or `severe`) before CPI releases and Fed meetings.
- **Energy trading signals** — track the WTI/Brent spread, supply/demand balance, and geopolitical risk premium to time entry and exit in oil futures and energy sector ETFs.
- **Portfolio rotation** — use the built-in `fossil_fuel_trend` vs. `clean_energy_momentum` signals to allocate between fossil fuel exposure, renewable energy, and uranium.
- **Automated alerting** — schedule daily or weekly runs and route the `energy_inflation_signal` or `macro_energy_signal` into Slack, email, or trading dashboards via webhooks.
- **Academic and policy research** — collect a time series of structured **commodity energy data** for econometric modeling, climate policy analysis, or supply chain studies.

***

### How to use Energy Prices Tracker

1. Open the Actor on Apify and click **Try for free**.
2. Optionally enter a free **EIA API key** from [eia.gov](https://www.eia.gov/opendata/) for additional petroleum series.
3. Select the `commodities` array — e.g. `["wti", "brent", "natural_gas", "uranium"]`.
4. Set `includeMacroSignals` to `true` (default) for geopolitical risk, transition score, and portfolio guidance.
5. Click **Start** — the run completes in seconds and writes one record to the dataset.
6. Schedule runs daily or weekly via Apify's scheduler for a live **energy prices tracker** time series.
7. Connect downstream via the Apify API or webhook to power dashboards, alerts, or spreadsheets.

***

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `eiaApiKey` | string | — | Optional free key from [eia.gov](https://www.eia.gov/opendata/) for official EIA petroleum series |
| `commodities` | array | `["wti","brent","natural_gas","uranium"]` | Commodities to include in the snapshot |
| `includeMacroSignals` | boolean | `true` | Include geopolitical risk premium, macro signal, portfolio allocation, and transition score |

***

### Output

One dataset record per run — a complete **commodity energy data** snapshot:

```json
[
  {
    "snapshot_type": "energy_prices",
    "prices": {
      "wti_crude":   { "price": 82.50, "change_1d": 0.75, "change_1d_pct": 0.92, "unit": "USD/bbl" },
      "brent_crude": { "price": 86.20, "change_1d": 0.60, "change_1d_pct": 0.70, "unit": "USD/bbl" },
      "natural_gas": { "price": 2.85,  "change_1d": -0.05, "change_1d_pct": -1.72, "unit": "USD/MMBtu" },
      "uranium_etf": { "price": 28.50, "change_1d": 0.30, "change_1d_pct": 1.06, "unit": "USD/share" }
    },
    "oil_spread_brent_wti": 3.70,
    "energy_inflation_signal": "moderate",
    "fossil_fuel_trend": "stable",
    "clean_energy_momentum": "positive",
    "macro_energy_signal": "growth-positive",
    "supply_demand_balance": "tight",
    "geopolitical_risk_premium": 7.50,
    "energy_transition_score": 58,
    "portfolio_allocation": {
      "fossil_fuel_exposure": "hold",
      "clean_energy_exposure": "increase",
      "uranium_outlook": "accumulate"
    },
    "fetched_at": "2026-09-02T10:00:00Z"
  }
]
```

***

### Data fields

| Field | Type | Description |
|-------|------|-------------|
| `prices.*` | object | Per-commodity `price`, `change_1d`, `change_1d_pct`, and `unit` |
| `oil_spread_brent_wti` | number | Brent minus WTI price spread (USD/bbl) |
| `energy_inflation_signal` | string | `low` / `moderate` / `elevated` / `severe` — based on WTI price level |
| `fossil_fuel_trend` | string | `rising`, `stable`, or `falling` — trend for oil and gas |
| `clean_energy_momentum` | string | `positive`, `neutral`, or `negative` — solar/wind ETF trend |
| `macro_energy_signal` | string | `stagflation-risk`, `growth-positive`, `deflationary`, or `neutral` |
| `supply_demand_balance` | string | `tight`, `balanced`, or `oversupplied` |
| `geopolitical_risk_premium` | number | WTI current price minus 5-year average ($75) — war/supply-risk proxy |
| `energy_transition_score` | integer | 0–100 score: clean energy vs. fossil fuel daily momentum (50 = neutral) |
| `portfolio_allocation` | object | `fossil_fuel_exposure`, `clean_energy_exposure`, `uranium_outlook` guidance |
| `fetched_at` | string | ISO 8601 timestamp of data retrieval |

***

### Cost estimation

Pricing is **Pay-Per-Event** at **$0.005 per run** (one event = one snapshot record).

| Schedule | Runs per month | Estimated monthly cost |
|---|---|---|
| Manual / ad-hoc | 10 | $0.05 |
| Daily automated | 30 | $0.15 |
| Twice daily | 60 | $0.30 |
| Hourly during market hours | ~260 | $1.30 |

***

### FAQ

**Does this oil gas electricity price API require any paid API subscription?**
No. Core commodity data (WTI, Brent, natural gas, ETFs) comes from Yahoo Finance at no cost. The optional EIA API key is free to register at [eia.gov](https://www.eia.gov/opendata/) and unlocks additional official petroleum series.

**How current is the price data?**
Yahoo Finance prices are near-real-time during U.S. market hours (15-minute delay typical). EIA data lags 1–2 business days. For intraday trading signals, run the Actor during market hours and rely on the Yahoo Finance fields.

**Can I build a historical energy prices time series?**
Yes — schedule the Actor on a daily or weekly cron via Apify's scheduler and each run appends a new record to the dataset. Export the full dataset as CSV to build your own historical archive of **commodity energy data**.

> **Disclaimer**: Energy price data is sourced from publicly available Yahoo Finance feeds and the U.S. Energy Information Administration. Data is provided for informational and research purposes only. This is not financial advice. Always verify prices with primary sources before making trading or investment decisions.

***

**Keywords:** energy prices tracker, oil gas electricity price API, commodity energy data, WTI crude price, Brent crude tracker, natural gas price API, energy inflation signal, energy macro research

***

### Related actors

- [CFTC COT Tracker](https://apify.com/gochujang/cftc-cot-tracker) — Crude oil and natural gas speculator positioning that drives energy price moves
- [FRED Economic Data](https://apify.com/gochujang/fred-economic-data) — EIA energy production data and CPI energy components for macro context
- [CoinMarketCap Global Metrics](https://apify.com/gochujang/coinmarketcap-global-metrics) — Crypto market data to pair with energy price signals for mining profitability research

### Feedback

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

# Actor input Schema

## `eiaApiKey` (type: `string`):

Free EIA API key from eia.gov for additional petroleum spot price data. Get one at https://www.eia.gov/opendata/register.php

## `commodities` (type: `array`):

Which energy commodities to track: wti, brent, natural\_gas, uranium, coal, solar, wind

## `includeMacroSignals` (type: `boolean`):

Include supply/demand analysis, geopolitical signals, and trend forecasts

## Actor input object example

```json
{
  "commodities": [
    "wti",
    "brent",
    "natural_gas",
    "uranium"
  ],
  "includeMacroSignals": true
}
```

# 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/energy-prices-tracker").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/energy-prices-tracker").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/energy-prices-tracker --silent --output-dataset

```

## MCP server setup

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

```

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/6hA0d5vLTQ5EiOnJx/builds/RRSltWE6ertngPNRC/openapi.json
