Docs/Sources/Vehicle Fuel Economy

Vehicle Fuel Economy

EPA MPG, EV range and running costs for every car since 1984

OperationalCredits 1 per callp50 331msTransportation

Overview

Either `make` or `model` is required. `make` is matched after dropping punctuation and case, with Chevy, VW and Mercedes accepted; `model` matches the start or any part of the EPA's full model name or base model, so `model=Camry` returns Camry, Camry Hybrid LE and Camry AWD LE/SE. A model without a make searches every make that builds it. `year` and `fuelType` narrow the result, and results are ordered newest model year first, then by model name; `limit` (default 20, at most 50) and `page` walk through them.

The data is fueleconomy.gov's vehicles file, rebuilt weekly, joined to its emissions file for the smog rating (the federal rating where a vehicle has both a federal and a California one). Each row is one EPA test configuration: a model year, engine, transmission and drive. `mpg` is the EPA's adjusted label value on the primary fuel, in MPGe for electric vehicles; plug-in hybrids show gasoline MPG in `mpg` and MPGe on electricity in `mpgAlternateFuel`, with their charge-depleting electric range in `electric.rangeMiles`.

`powertrain` is derived from the EPA's alternative fuel type and fuel: electric, plugin_hybrid, hybrid, hydrogen, flex_fuel, cng, diesel or gasoline. Values the EPA leaves blank or zero are null. No match returns 404. On the Free plan kWh per 100 miles, charge times, the onboard charger, annual fuel cost, five-year savings, CO2 and scores are null.

Live Test Vehicle Fuel Economy Source →

Formula

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

=VERVE("vehiclefueleconomy", "count")

Inputs

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

InputTypeWhere it goesDescription
makeOptionalstring"make", valueVehicle make, for example Toyota, Ford or Tesla. Either make or model is required
length 0–40
modelOptionalstring"model", valueModel name or the start of it, for example Camry or Model 3. Either make or model is required
length 0–60
yearOptionalinteger"year", valueModel year, 1984 or later
range 1984–2030
fuelTypeOptionalstring"fuelType", valueOnly vehicles with this powertrain
gasolinedieselhybridplugin_hybridelectricflex_fuelcnghydrogen
limitOptionalinteger"limit", valueVehicles per page, 1-50
default 20 · range 1–50
pageOptionalinteger"page", valuePage of results to return, starting at 1
default 1 · range 1–∞

Passing an option

=VERVE("vehiclefueleconomy", "count", "make", "Tesla")

What lands in your sheet

The field — the argument after the inputs — 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

Leave the field out 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("vehiclefueleconomy")
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 argument 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 the fieldTypeExample cell valueDescription
countnumber5Number of vehicles that match
pagenumber1Page returned
pagesnumber3Number of pages at this limit
returnednumber2Number of vehicles in this response
vehiclesarray[2]Matching vehicles, newest model year first
vehicles.0.epaIdnumber47908The vehicle's fueleconomy.gov id
vehicles.0.yearnumber2024Model year
vehicles.0.makestringTeslaMake
vehicles.0.modelstringModel 3 Long Range AWDFull model name as the EPA rates it
vehicles.0.baseModelstringModel 3Base model name
vehicles.0.vehicleClassstringMidsize CarsEPA size class, for example Midsize Cars or Small Pickup Trucks 2WD
vehicles.0.powertrainstringelectricgasoline, diesel, hybrid, plugin_hybrid, electric, flex_fuel, cng, hydrogen or other
vehicles.0.fuelTypestringElectricityFuel as the EPA lists it, for example Regular, Premium or Electricity
vehicles.0.drivestringAll-Wheel DriveDrive type, for example Front-Wheel Drive or All-Wheel Drive
vehicles.0.transmissionstringAutomatic (A1)Transmission, for example Automatic (S8)
vehicles.0.engineobject{…}Engine and motor
vehicles.0.engine.cylindersobjectnullNumber of cylinders
vehicles.0.engine.displacementLobjectnullEngine displacement in litres
vehicles.0.engine.turbochargedbooleanfalseWhether the engine is turbocharged
vehicles.0.engine.superchargedbooleanfalseWhether the engine is supercharged
vehicles.0.engine.descriptionobjectnullThe EPA's engine description code, when given
vehicles.0.engine.electricMotorstring84 and 191 kW ACPM 3-PhaseElectric motor rating, for hybrids and electric vehicles
vehicles.0.startStopbooleanfalseWhether the engine has start-stop
vehicles.0.mpgobject{…}EPA fuel economy on the primary fuel
vehicles.0.mpg.unitstringMPGeMPG, or MPGe for electric vehicles
vehicles.0.mpg.citynumber137City fuel economy
vehicles.0.mpg.highwaynumber124Highway fuel economy
vehicles.0.mpg.combinednumber130Combined fuel economy
vehicles.0.mpgAlternateFuelobjectnullFuel economy on the second fuel: electricity for plug-in hybrids, E85 or natural gas for dual-fuel vehicles
vehicles.0.electricobject{…}Electric range and charging, for electric vehicles and plug-in hybrids
vehicles.0.electric.rangeMilesnumber342EPA electric range in miles
vehicles.0.electric.rangeCityMilesnumber357EPA city electric range in miles
vehicles.0.electric.rangeHighwayMilesnumber323EPA highway electric range in miles
vehicles.0.electric.rangeKmnumber550EPA electric range in kilometres
vehicles.0.electric.kwhPer100Milesobject{…}Electricity used per 100 miles
vehicles.0.electric.kwhPer100Miles.cityPremiumnumber24.7City kWh per 100 miles
vehicles.0.electric.kwhPer100Miles.highwayPremiumnumber27.2Highway kWh per 100 miles
vehicles.0.electric.kwhPer100Miles.combinedPremiumnumber25.8Combined kWh per 100 miles
vehicles.0.electric.chargeTime240vHoursPremiumnumber9.4Hours to charge on a 240V circuit
vehicles.0.electric.chargeTime120vHoursPremiumobjectnullHours to charge on a 120V circuit
vehicles.0.electric.onboardChargerPremiumobjectnullOnboard charger description, when given
vehicles.0.annualFuelCostUsdPremiumnumber600EPA's annual fuel cost estimate in US dollars (15,000 miles, 55% city)
vehicles.0.fiveYearSavingsUsdPremiumnumber8000Fuel cost saved over five years against the average new vehicle; negative means it costs more
vehicles.0.co2GramsPerMilePremiumnumber0Tailpipe CO2 in grams per mile
vehicles.0.scoresobject{…}EPA 1-10 scores, 10 best
vehicles.0.scores.fuelEconomyPremiumnumber10EPA fuel economy score, 2013 models on
vehicles.0.scores.greenhouseGasPremiumnumber10EPA greenhouse gas score, 2013 models on
vehicles.0.scores.smogPremiumnumber10EPA smog rating, 2000 models on
vehicles.0.gasGuzzlerbooleanfalseWhether the vehicle carries the federal gas guzzler tax

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 vehiclefueleconomyAn 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

Car Shopping Sites
Show EPA MPG, EV range and running costs beside each listing and let buyers compare trims.
Fleet Electrification
Compare the annual fuel cost and CO2 of current vehicles against electric replacements.
Insurance and Finance
Add powertrain, fuel type and efficiency to vehicle records for pricing and green-loan eligibility.
Sustainability Reporting
Estimate tailpipe CO2 per mile for company cars and mileage claims.

Other ways to use Vehicle Fuel Economy

Set up Vehicle Fuel Economy 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 Transportation:

Was this page helpful?