RRadar
Finance & rates

Gas Prices API

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 or yearly averages) and a trip fuel cost calculator. Monitor mode returns only new weeks. Usable from AI agents via MCP.

Example request

curl -X POST https://radarbg.com/v1/us-gas-prices-api \
  -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"mode": "latest", "areas": ["US", "CA", "TX", "NYC"], "fuels": ["regular", "diesel"], "sort": "area"}'

Answer: {"ok": true, "count": N, "items": [...], "usage": {...}}. Failed calls are not counted.

Inputs

FieldTypeDescription
modestringlatest = newest weekly price per area and fuel with weekly/yearly change and 52-week high/low; history = price series between startDate and endDate (weekly, or monthly/yearly averages); trip = fuel cost of a trip from distance and fuel econ
areasarrayUS, PADD1..PADD5 (East Coast, Midwest, Gulf Coast, Rocky Mountain, West Coast), PADD1A/1B/1C, PADD5XCA, states CA CO FL MA MN NY OH TX WA, cities BOS CHI CLE DEN HOU LAX MIA NYC SFO SEA, or names like 'California' / 'New York City'. 'all' =
fuelsarrayregular, midgrade, premium, allGrades, diesel ('all' = every fuel). Empty = regular + diesel for latest, regular for history and trip. Diesel is published for US, PADD regions, CA and PADD5XCA.
sortstringlatest mode: area order (default), cheapest first, most expensive first, or biggest weekly rise first.
startDatestringhistory mode: first week, YYYY-MM-DD (or YYYY / YYYY-MM). Default one year ago. Gasoline from 1990/1994, diesel from 1994.
endDatestringhistory mode: last week, YYYY-MM-DD. Default latest.
intervalstringhistory mode: weekly survey values, or monthly / yearly averages of the weekly values.
distanceMilesnumbertrip mode: trip distance in miles (or use distanceKm).
distanceKmnumbertrip mode: trip distance in kilometers (used when distanceMiles is empty).
mpgnumbertrip mode: vehicle fuel economy in US mpg. Default 25 when litersPer100km is also empty.
litersPer100kmnumbertrip mode: fuel economy in L/100 km (used when mpg is empty).
limitintegerMaximum rows returned (1-20000). Default 1000.
onlyNewbooleanReturn only rows not returned before for this Monitor ID, e.g. schedule weekly to get each new EIA release once.
monitorIdstringName of the monitor state used by onlyNew. Different IDs keep separate memories.

Price

Included in every plan: 100 calls a month free, then from €9 a month for 3,000 calls across all APIs.

Related APIs

Central Bank Rates APIFuel Prices APIInflation APIMortgage Rates APITreasury Yields API