Docs/APIs/Energy Prices

Energy Prices

Get Daily Oil, Natural Gas and Fuel Spot Prices

OperationalCredits 2 per callp50 237msFinanceStar

Overview

A scheduled collector reads twelve daily spot price series from the U.S. Energy Information Administration's open data API twice a day and stores every close since 1986 (the series start at different dates; Henry Hub begins in 1997, ultra-low sulfur diesel in 2006). Requests are served from that store, never from EIA live. The data is public domain; source: U.S. Energy Information Administration, Spot Prices for Crude Oil and Petroleum Products and Natural Gas Spot and Futures Prices.

`price` is the close on `date` and `previousClose` the close on the trading day before it; `change` is the difference and `changePercent` the same as a percent of the previous close. `high52w` and `low52w` are the highest and lowest closes in the 364 days up to `date`. EIA publishes closing assessments a few days after the trading day, so `date` usually trails today by two to five days. These are spot prices, not futures settlements or live quotes.

Crude is published per barrel, refined products and propane per gallon and natural gas per MMBtu. `unit` converts with 42 gallons per barrel, 3.785411784 liters per gallon, 10 therms per MMBtu and 3.412141633 MMBtu per MWh. `history` returns closes from `days - 1` calendar days before `date` through `date`; `weekly` keeps the last close of each Monday-to-Sunday week.

Live Test Energy Prices API →

Endpoint

One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.

GEThttps://api.apiverve.com/v1/energyprices
curl "https://api.apiverve.com/v1/energyprices?benchmark=wti&unit=gallon&date=2025-06-13&history=daily&days=30" \
  -H "x-api-key: your_api_key_here"

Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.

Authentication

Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.

401 is the only auth verdict

A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.

Parameters

Sent in the query string. Premium parameters are accepted on every plan but only take effect on plans that include them.

ParameterTypeDescription
benchmarkOptionalstringBenchmark to price, or a comma-separated list (paid plans), or all. Defaults to wti.
wtibrenthenryhubgasoline_nyhgasoline_gulfrbob_laulsd_nyhulsd_gulf+5
unitOptionalstringUnit to price per: barrel, gallon or liter for crude and refined products; mmbtu, therm or mwh for natural gas. Defaults to each benchmark's published unit.
barrelgallonlitermmbtuthermmwh
dateOptionalPremiumstringDate to look up (YYYY-MM-DD). Returns the close on that day, or the latest trading day before it. Omit for the latest close.
date
historyOptionalPremiumstringInclude a price series ending at the returned date: daily closes or the last close of each week.
dailyweekly
daysOptionalPremiumintegerCalendar days of history to include (1-3650). Daily history allows up to 366. Defaults to 30.
range 1–3650

Response

Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.

Sample response
{
  "status": "ok",
  "error": null,
  "data": {
    "count": 1,
    "date": "2026-11-11",
    "prices": [
      {
        "benchmark": "wti",
        "name": "WTI Crude Oil",
        "product": "crude oil",
        "location": "Cushing, OK",
        "currency": "USD",
        "unit": "barrel",
        "nativeUnit": "barrel",
        "price": 89.62,
        "date": "2026-11-11",
        "previousClose": 89.62,
        "previousDate": "2026-11-10",
        "change": 0,
        "changePercent": 0,
        "changeDirection": "unchanged",
        "high52w": 114.58,
        "high52wDate": "2026-04-07",
        "low52w": 55.44,
        "low52wDate": "2025-12-16"
      }
    ]
  }
}

Response fields

Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.

FieldTypeExampleDescription
countnumber1Number of benchmarks returned
datestring"2026-11-11"The requested date, or the most recent close across the returned benchmarks (YYYY-MM-DD)
pricesarray[1]One entry per benchmark
benchmarkstring"wti"Benchmark id, e.g. wti or henryhub
namestring"WTI Crude Oil"Benchmark name
productstring"crude oil"Commodity: crude oil, natural gas, gasoline, diesel, heating oil, propane or jet fuel
locationstring"Cushing, OK"Delivery point the spot price is assessed at
currencystring"USD"Currency of every price in the entry (USD)
unitstring"barrel"Unit the prices are quoted per
nativeUnitstring"barrel"Unit EIA publishes the benchmark in
pricenumber89.62Closing spot price on date
datestring"2026-11-11"Trading day of the close (YYYY-MM-DD)
previousClosenumber89.62Close on the previous trading day
previousDatestring"2026-11-10"Trading day of the previous close
changenumber0Change from the previous close, in currency per unit
changePercentnumber0Change from the previous close, in percent
changeDirectionstring"unchanged"up, down or unchanged
high52wPremiumnumber114.58Highest close in the 52 weeks to date
high52wDatePremiumstring"2026-04-07"Trading day of the 52-week high
low52wPremiumnumber55.44Lowest close in the 52 weeks to date
low52wDatePremiumstring"2025-12-16"Trading day of the 52-week low

Errors

Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.

StatusMeaningWhat to do
400Input was rejectedRead error; it names the parameter.
401Key missing or invalidCheck the header name and the key value.
403Key valid, but not permittedA key restriction or IP allow-list; see key scoping.
429Rate limited, or out of creditsRead error to tell them apart; see rate limits.

Use cases

Fuel Surcharge Calculators
Freight and airline tools tie surcharges to the daily diesel or jet fuel spot close and its weekly average, recalculated automatically as the benchmark moves.
Energy Cost Dashboards
Finance teams chart WTI, Brent and Henry Hub side by side in one call, with daily change and 52-week range for context.
Utility and Heating Estimates
Home energy apps convert Henry Hub gas to therms and heating oil to gallons to estimate the wholesale cost behind a household bill.
Backtests and Research
Analysts pull years of weekly closes for crude and products to study crack spreads, seasonality and price shocks.

Other ways to use Energy Prices

Set up Energy Prices on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.

Give it to an AI agentConnect over MCP and your agent calls it as a native tool — Claude, Cursor, ChatGPT.VerveKit →Reference →
Google Sheets or ExcelA =VERVE() formula fills a column — no script, no export, recalculates in place.VerveSheets →Reference →
Ground an agent on itA cited, machine-checkable fact your model can't produce on its own.VerveContext →Reference →

More in Finance:

Was this page helpful?