Docs/Sources/Gas Prices

Gas Prices

Get Weekly Gasoline and Diesel Prices for the US, UK and EU

OperationalCredits 2 per callp50 426msFinance

Overview

Gas Prices is built on three official weekly surveys: the U.S. Energy Information Administration retail gasoline and diesel survey (since 1990, including nine states and ten metro areas), the European Commission Weekly Oil Bulletin for every EU member (since 2005) and the UK government weekly road fuel prices (since 2003). Each price is stored as published, in the currency drivers pay, and can be converted to any currency and to liters or gallons on request. Use it for fuel cost calculators, fleet budgeting, delivery surcharges and cross-country cost comparisons.

Live Test Gas Prices Source →

Formula

One function covers the whole catalog: the first argument names the source, the rest are its inputs, and the "field" pair says which single value lands in the cell. Formulas covers the grammar that applies to all of them.

=VERVE("gasprices", "field", "countryName")

Inputs

Required inputs are positional, in the order below. Everything else is passed as a "name", value pair after them — the same shape as SUMIFS. Premium inputs are accepted on every plan but only take effect on plans that include them.

InputTypeWhere it goesDescription
countryOptionalstring"country", valueCountry to get prices for: US, GB, EU (the EU average) or any EU member code such as DE, FR or PL. Defaults to US. Countries other than US require a paid plan.
USGBEUATBEBGCYCZ+22
areaOptionalstring"area", valueUS only: a state code (CA, CO, FL, MA, MN, NY, OH, TX, WA), a region (eastcoast, midwest, gulfcoast, rockymountain, westcoast and the PADD 1 sub-regions) or a city (losangeles, chicago, houston, newyorkcity and more). Omit for the national average. Requires a paid plan.
USeastcoastnewenglandcentralatlanticloweratlanticmidwestgulfcoastrockymountain+21
currencyOptionalPremiumstring"currency", valueCurrency to return prices in, as an ISO code (e.g. USD, EUR, GBP). Defaults to the country's own currency.
length 3–3
unitOptionalstring"unit", valueVolume unit to price per: liter or gallon. Defaults to the source's unit (gallon for the US, liter elsewhere).
litergallon
dateOptionalPremiumstring"date", valueDate to look up (YYYY-MM-DD). Returns the survey week in effect on that date. Omit for the latest week.
date

Passing an option

=VERVE("gasprices", "country", "US")

What lands in your sheet

The "field" pair is what makes the formula resolve to one cell. Its value is a dot-path from the table below, so swapping it is how you pull a different value — one formula per column.

Seeing everything at once

Drop the "field" pair and the formula returns the whole response instead: two columns, field name on the left and value on the right, spilling from the cell you typed in.

=VERVE("gasprices")
Good for exploring, not for filling down

The second row's table would land on top of the first's, and every cell after the first reads #REF! (#SPILL! in Excel). Keep one per sheet, or name a field, and leave the cells below and to the right empty.

Response fields

Paths are relative to data. Each one is exactly what the "field" pair accepts, so swapping it is how you pull a different value into a cell. On a plan without a Premium field the cell reads #PREMIUM(field) rather than a value, so a locked field never looks like a real answer.

Use as "field"TypeExample cell valueDescription
countrystringUSISO country code the prices apply to (EU for the European Union average)
countryNamestringUnited StatesCountry name
areastringUSArea code the prices apply to: the country code for national prices, or a US state code, region or city key
areaNamestringUnited StatesHuman-readable area name
areaTypestringnationalArea granularity: national, union, region, state or city
weekstring2026-09-28Survey week (Monday) in YYYY-MM-DD format
currencystringUSDISO currency code of all prices and changes in this response
unitstringgallonVolume unit prices are quoted per: gallon or liter
pricesobject{…}Average retail price per unit by fuel grade
prices.regularnumber4.465Average retail price of regular unleaded per unit; null where the source does not survey it for this area
prices.midgradePremiumnumber5.073Average retail price of midgrade per unit; null where the source does not survey it for this area
prices.premiumPremiumnumber5.482Average retail price of premium per unit; null where the source does not survey it for this area
prices.dieselPremiumnumber6.382Average retail price of No. 2 diesel per unit; null where the source does not survey it for this area
prices.allGradesPremiumnumber4.603Average retail price of all gasoline grades combined per unit; null where the source does not survey it for this area
prices.lpgPremiumobjectnullAverage retail price of LPG (autogas) per unit; null where the source does not survey it for this area
changeDirectionstringdownDirection of the weekly change in regular gasoline: up, down or unchanged
previousWeekPremiumstring2026-09-21Date of the prior survey week used for the weekly change
weeklyChangeobject{…}Change in price per unit from the previous survey week, by grade
weeklyChange.regularPremiumnumber-0.013Week-over-week change in the regular unleaded price, in currency per unit
weeklyChange.midgradePremiumnumber0.012Week-over-week change in the midgrade price, in currency per unit
weeklyChange.premiumPremiumnumber0.022Week-over-week change in the premium price, in currency per unit
weeklyChange.dieselPremiumnumber-0.147Week-over-week change in the No. 2 diesel price, in currency per unit
weeklyChange.allGradesPremiumnumber-0.007Week-over-week change in the all gasoline grades combined price, in currency per unit
weeklyChange.lpgPremiumobjectnullWeek-over-week change in the LPG (autogas) price, in currency per unit
yearAgoWeekPremiumstring2025-09-29Date of the survey week one year earlier used for the yearly change
yearlyChangeobject{…}Change in price per unit from the same week a year earlier, by grade
yearlyChange.regularPremiumnumber1.347Year-over-year change in the regular unleaded price, in currency per unit
yearlyChange.midgradePremiumnumber1.366Year-over-year change in the midgrade price, in currency per unit
yearlyChange.premiumPremiumnumber1.415Year-over-year change in the premium price, in currency per unit
yearlyChange.dieselPremiumnumber2.628Year-over-year change in the No. 2 diesel price, in currency per unit
yearlyChange.allGradesPremiumnumber1.355Year-over-year change in the all gasoline grades combined price, in currency per unit
yearlyChange.lpgPremiumobjectnullYear-over-year change in the LPG (autogas) price, in currency per unit
nativeCurrencystringUSDCurrency the source publishes in (USD for the US, GBP for the UK, EUR or the local currency in the EU)
nativeUnitstringgallonUnit the source publishes in (gallon for the US, liter elsewhere)
exchangeRatenumber1Rate applied to convert from nativeCurrency to currency; 1 when no conversion was requested

When a cell doesn't fill

A failed lookup returns readable text starting with #ERR rather than a spreadsheet error, because Excel cannot show a custom message on a real error — you would get a bare #VALUE! with no reason. The trade-off is that IFERROR() will not catch it; test with LEFT(cell, 4) = "#ERR" instead. Error handling covers the rest.

Cell readsWhat happened
#ERR Not connectedNo API key saved. Open the side panel and connect your account.
#ERR Replace <name> with a cell or valueA preview formula was copied as-is. Swap the placeholder for a cell reference.
#ERR No "x" in gaspricesAn option name this source does not take. The message lists the ones it does.
#ERR No data point "…"The "field" path is not in the response. Check it against the table above.
#PREMIUM(field)The field exists but your plan does not include it.
#ERR Out of creditsThe cycle's credits are spent. Usage resets on your billing date.

Before the formula works

The add-in reads the API key you saved once in the side panel — the key never goes in the formula, so a shared sheet does not leak it and a collaborator without access simply sees the last calculated values.

  1. Install the add-in for Google Sheets or Excel.
  2. Open the side panel and sign in, or paste a key from your dashboard.
  3. Type the formula above into any cell.

Use cases

Trip Fuel Cost Calculators
Estimate the fuel cost of a road trip by multiplying route distance and vehicle efficiency by the current price for the country, state or city being driven through.
Fleet Fuel Budgeting
Logistics teams forecast monthly fuel spend by tracking weekly diesel prices and the year-over-year change in every country their trucks operate in.
Delivery Fuel Surcharges
Couriers and freight brokers tie fuel surcharges to the weekly national diesel average so pricing adjusts automatically as pump prices move.
Cross-Country Cost Comparisons
Travel and relocation sites compare what drivers pay across Europe and the US by requesting every country in one currency and per liter.

Other ways to use Gas Prices

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

Call it as a REST APIOne HTTPS endpoint and an x-api-key header, with SDKs for Node, Python and .NET.APIVerve →Reference →
Give it to an AI agentConnect over MCP and your agent calls it as a native tool — Claude, Cursor, ChatGPT.VerveKit →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?