Gas Prices API - US Gasoline & Diesel by State, Weekly Histo avatar

Gas Prices API - US Gasoline & Diesel by State, Weekly Histo

Pricing

from $0.70 / 1,000 results

Go to Apify Store
Gas Prices API - US Gasoline & Diesel by State, Weekly Histo

Gas Prices API - US Gasoline & Diesel by State, Weekly Histo

Official US gas prices as JSON, no API key: weekly retail regular, midgrade, premium gasoline and diesel prices (USD/gallon) for the US, 10 PADD regions, 9 states and 10 cities from the EIA survey, with week-over-week and year-over-year change, 52-week high/low, history since 1990 (weekly, monthly o

Pricing

from $0.70 / 1,000 results

Rating

0.0

(0)

Developer

Martin Petrov

Martin Petrov

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 hours ago

Last modified

Features

Limited permissions

Share

Gas Prices API - US Gasoline & Diesel by State, Weekly History

Problem: your fleet app, trip-cost calculator, fintech dashboard, newsroom or AI agent needs today's US gas price for a state or city, the diesel price for a trucking region, or a clean price history. Station-price sites forbid scraping, and the official EIA numbers come as Excel workbooks with 179,000 cells and cryptic series codes.

This API: one JSON call, no API key, answers from a maintained copy of the official EIA weekly survey (updated every week, release date on every row).

  • Fuels: regular, midgrade, premium, allGrades gasoline and diesel (on-highway No 2), USD per gallon including taxes.
  • Areas (29): US average, 10 PADD regions (PADD1 East Coast ... PADD5 West Coast, PADD5XCA), 9 states (CA, CO, FL, MA, MN, NY, OH, TX, WA), 10 cities (BOS, CHI, CLE, DEN, HOU, LAX, MIA, NYC, SFO, SEA). Names work too (California, Midwest, New York City).
  • latest: price, week-over-week and year-over-year change (USD and %), 52-week high/low, difference to the US average; sort = cheapest / most expensive / biggest weekly rise.
  • history: weekly since 1990 (gasoline) / 1994 (diesel), or monthly / yearly averages.
  • trip: fuel cost of a trip from distanceMiles or distanceKm and mpg or litersPer100km, per area, cheapest first.
  • Monitor: onlyNew + monitorId returns each new weekly release once (schedule it weekly).

Example (API)

curl -X POST "https://api.apify.com/v2/acts/martin10291~us-gas-prices-api/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode": "latest", "areas": ["US", "CA", "NYC"], "fuels": ["regular", "diesel"]}'

Output row (measured 2026-11-13, EIA release 2026-11-10):

{"area": "CA", "areaName": "California", "areaType": "state", "fuel": "regular", "week": "2026-11-09", "price": 5.562,
"previousWeekPrice": 5.748, "changeWeek": -0.186, "changeWeekPct": -3.24, "yearAgoPrice": 4.5, "changeYear": 1.062,
"high52w": 6.227, "low52w": 3.977, "vsNational": 1.567, "historyFrom": "2000-06-05", "unit": "USD per gallon (retail, including taxes)",
"releaseDate": "2026-11-10", "nextReleaseDate": "2026-11-17",
"source": "Source: U.S. Energy Information Administration, Gasoline and Diesel Fuel Update (2026-11-10), public domain"}

More inputs:

  • {"mode": "history", "areas": ["US"], "fuels": ["diesel"], "startDate": "2020-01-01", "interval": "monthly"} -> monthly average diesel price.
  • {"mode": "latest", "fuels": ["regular"], "sort": "priceAsc"} -> every area, cheapest first.
  • {"mode": "trip", "areas": ["TX", "CA"], "distanceKm": 500, "litersPer100km": 7} -> trip cost per area.
  • {"mode": "areas"} -> covered areas, fuels and first week.

Use from agents (MCP)

Add the Apify MCP server (https://mcp.apify.com?tools=martin10291/us-gas-prices-api) to Claude, Cursor or any MCP client and ask: "What does regular gas cost in California this week, and how much did it change in a year?".

Data source

U.S. Energy Information Administration (EIA), Gasoline and Diesel Fuel Update (https://www.eia.gov/petroleum/gasdiesel/). EIA content is public domain; every row carries the acknowledgment with the release date as EIA asks. EIA surveys retail stations every Monday and publishes on Monday/Tuesday. No scraping, no personal data.

FAQ

  • How fresh is the data? EIA surveys stations every Monday and publishes Monday/Tuesday; our copy refreshes every 3 hours, so a new week appears within hours of the release. releaseDate and nextReleaseDate are on every row; if EIA is down the last copy is served with "stale": true.
  • Limits: up to 60 areas and 20,000 rows per call (limit, default 1000). Diesel exists for US, PADD regions, CA and PADD5XCA only (EIA does not publish other diesel areas).
  • Errors: an unknown area, fuel, mode or a bad date returns a clear invalid input message with the valid values; nothing is charged for an error.
  • Station prices? No: this is the official weekly average per area (what news and government reports quote), not a per-station feed.

Pricing

$1.00 per 1,000 rows. A latest call for one state and fuel = 1 row.