US Energy Prices API (EIA): gasoline, diesel, power, stocks avatar

US Energy Prices API (EIA): gasoline, diesel, power, stocks

Pricing

from $2.00 / 1,000 series

Go to Apify Store
US Energy Prices API (EIA): gasoline, diesel, power, stocks

US Energy Prices API (EIA): gasoline, diesel, power, stocks

Latest value, change and history of official US energy data from the EIA: weekly gasoline and diesel prices by state, monthly electricity prices by state and sector, crude, fuel and gas stocks, oil output, refinery use. Ask by plain name (gasoline_retail:CA). A source link per series.

Pricing

from $2.00 / 1,000 series

Rating

0.0

(0)

Developer

Bosco Labs

Bosco Labs

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

an hour ago

Last modified

Categories

Features

Limited permissions

Share

Ask for US energy data by plain name and get the latest value, the change and the recent history. Weekly retail gasoline and diesel prices (US, regions, 9 states), monthly electricity prices for every state and sector, and the weekly crude, gasoline, distillate and natural gas stock reports, straight from the U.S. Energy Information Administration. No EIA API key needed. Built for AI agents and for anyone who needs a quick, sourced number.

Pricing (pay per event): $0.002 per series returned ($2 per 1,000). A series with no data and the catalogue are free; an unknown name fails in a second and costs nothing. The same data is free at eia.gov with your own API key; you pay for the keyless plain-name lookup, the latest/previous/change summary and the hosted API.

What you get

One JSON item per series. Real output for {"series": ["gasoline_retail"], "last": 3} (8 Nov 2026):

{
"schema_version": "1",
"series": "gasoline_retail:US",
"title": "U.S. Regular All Formulations Retail Gasoline Prices (Dollars per Gallon)",
"description": "Weekly regular gasoline retail price in United States (Mondays), all formulations, including taxes.",
"source": "EIA",
"route": "petroleum/pri/gnd",
"series_id": "EMM_EPMR_PTE_NUS_DPG",
"frequency": "weekly",
"unit": "USD per gallon",
"latest_date": "2026-11-02",
"latest_value": 4.153,
"previous_date": "2026-10-26",
"previous_value": 4.269,
"change": -0.116,
"observations": [
{ "date": "2026-10-19", "value": 4.284 },
{ "date": "2026-10-26", "value": 4.269 },
{ "date": "2026-11-02", "value": 4.153 }
],
"observation_count": 3,
"source_url": "https://www.eia.gov/dnav/pet/hist/LeafHandler.ashx?n=PET&s=EMM_EPMR_PTE_NUS_DPG&f=W",
"provided_by": "Bosco Labs (boscolabs.dev)",
"api_url": "https://api.eia.gov/v2/petroleum/pri/gnd/data/?frequency=weekly&data%5B0%5D=value&facets%5Bseries%5D%5B%5D=EMM_EPMR_PTE_NUS_DPG&sort%5B0%5D%5Bcolumn%5D=period&sort%5B0%5D%5Bdirection%5D=desc&length=4",
"attribution": "Source: U.S. Energy Information Administration (EIA), eia.gov open data. Values are reproduced unmodified. The `change` field is computed by Bosco Labs (latest_value - previous_value) and is not an EIA figure. Bosco Labs is not affiliated with or endorsed by EIA.",
"warnings": [],
"error": null,
"retrieved_at": "2026-11-08T21:53:03+00:00",
"duration_seconds": 6.29
}

So: regular gasoline averaged $4.153 a gallon in the week of 2 November 2026, down 11.6 cents.

  • latest / previous / change: the newest value, the one before it, and the difference. change is the only value we compute; everything else is EIA's own.
  • observations: the newest 12 by default, oldest first.
  • source_url and api_url: the series page on eia.gov, and the exact API query (add your own api_key to re-run it).
  • error: a series with no data (e.g. diesel for a state EIA doesn't survey) comes back as a row with error saying why. It is not charged, and the other series are still delivered.

Series catalogue

NameWhatUnitFrequency
gasoline_retail[:<area>]Regular gasoline retail price, all formulations, incl. taxes. Area: US (default), PADD1-PADD5 (or east_coast, midwest, gulf_coast, rocky_mountain, west_coast), CA, CO, FL, MA, MN, NY, OH, TX, WAUSD per gallonweekly (Mondays)
diesel_retail[:<area>]No. 2 diesel retail price. Area: US, PADD1-PADD5, CAUSD per gallonweekly
electricity_price[:<state>[:<sector>]]Average retail electricity price. State: US (default) or any 2-letter code incl. DC; sector ALL (default), RES, COM, IND, TRAUS cents per kWhmonthly, ~2-month lag
crude_stocksUS commercial crude oil stocks, excl. SPRthousand barrelsweekly
spr_stocksStrategic Petroleum Reservethousand barrelsweekly
gasoline_stocksUS total motor gasoline stocksthousand barrelsweekly
distillate_stocksUS distillate fuel oil stocks (diesel, heating oil)thousand barrelsweekly
crude_productionUS crude oil field production (weekly estimate)thousand barrels per dayweekly
refinery_utilizationUS refinery utilization% of operable capacityweekly
gas_storageNatural gas in underground storage, Lower 48 (working gas)billion cubic feetweekly

{"mode": "catalogue"} returns this list as data, for free.

Not included: WTI, Brent and Henry Hub spot or futures prices. EIA publishes them under licence from Refinitiv and NYMEX, so we don't resell them; asking for wti fails at once, free, with that reason.

Input

{ "series": ["gasoline_retail", "crude_stocks", "electricity_price:TX"] }
FieldMeaning
seriesPlain names from the catalogue, up to 20 per run
lastObservations per series. Default 12, or the whole date window (max 1000) when dateFrom is set
dateFrom, dateToOptional window, YYYY-MM-DD. dateTo + last: 1 = the value on that date (or the last one before it)
modeseries (default) or catalogue

Typical questions and the input that answers them:

QuestionInput
What does gas cost in California this week, vs the US?{"series": ["gasoline_retail:CA", "gasoline_retail"], "last": 2} ($5.748 vs $4.153, week of 2 Nov 2026)
Did US crude inventories rise or fall last week?{"series": ["crude_stocks"], "last": 2} (409.8 million barrels, down 0.9 million, week to 30 Oct 2026)
What do Texas households pay for power?{"series": ["electricity_price:TX:RES"], "last": 1} (15.91 cents/kWh, August 2026)
Diesel price on the West Coast in 2026{"series": ["diesel_retail:PADD5"], "dateFrom": "2026-01-01"}

Use from an AI agent (MCP)

Agents can call this Actor as a tool through the Apify MCP server. Add this server URL to your MCP client (Claude, Cursor, VS Code, ...):

https://mcp.apify.com?tools=bosco_labs/us-energy-prices

It loads this Actor as a tool, plus the tools that read its results (get-actor-run, get-dataset-items). The hosted server signs you in with OAuth, or accepts your Apify token as Authorization: Bearer <APIFY_TOKEN>.

Example prompt: "How much did US gasoline and diesel prices change last week, and how full is natural gas storage? Cite the source." The agent passes:

{ "series": ["gasoline_retail", "diesel_retail", "gas_storage"], "last": 2 }

Output for agents: one small JSON item per series (about 2 KB with the default 12 observations), stable snake_case fields, numbers as numbers, ISO dates, null for unknown, a source link and the API query per series. Unknown names fail at once with "did you mean" suggestions. 14 series take about 6 seconds.

Cost: $0.002 per series returned, billed to the Apify account the MCP server is signed in with. Error rows and the catalogue are free.

FAQ

How fresh is it? Live: every call reads the EIA API. Retail gasoline and diesel prices are surveyed on Mondays and published Monday evening or Tuesday. Petroleum stocks, production and refinery use come from the Weekly Petroleum Status Report (Wednesdays), gas storage from the Weekly Natural Gas Storage Report (Thursdays). Monthly electricity prices lag about two months. Federal holidays shift the schedule.

Why no WTI or Brent price? See "Not included" above: those are licensed vendor prices.

Why no diesel price for Texas? EIA's weekly diesel survey covers the US, the five PADD regions and California only; other areas come back as a free error row.

Do I need an EIA API key? No. We call EIA with our own key; it never appears in the output or logs.

Can I republish the values? EIA data is US government work in the public domain. Name EIA as the source (each row has an attribution), don't present changed values as EIA's, and don't imply EIA endorses you. Our change field is marked as computed by Bosco Labs.

Personal data? None. National, regional and state aggregates only.