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")=VERVE.CALL("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.
| Input | Type | Where it goes | Description |
|---|---|---|---|
makeOptional | string | "make", value | Vehicle make, for example Toyota, Ford or Tesla. Either make or model is required length 0–40 |
modelOptional | string | "model", value | Model name or the start of it, for example Camry or Model 3. Either make or model is required length 0–60 |
yearOptional | integer | "year", value | Model year, 1984 or later range 1984–2030 |
fuelTypeOptional | string | "fuelType", value | Only vehicles with this powertraingasolinedieselhybridplugin_hybridelectricflex_fuelcnghydrogen |
limitOptional | integer | "limit", value | Vehicles per page, 1-50 default 20 · range 1–50 |
pageOptional | integer | "page", value | Page of results to return, starting at 1 default 1 · range 1–∞ |
Passing an option
=VERVE("vehiclefueleconomy", "count", "make", "Tesla")=VERVE.CALL("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")=VERVE.CALL("vehiclefueleconomy")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 field | Type | Example cell value | Description |
|---|---|---|---|
count | number | 5 | Number of vehicles that match |
page | number | 1 | Page returned |
pages | number | 3 | Number of pages at this limit |
returned | number | 2 | Number of vehicles in this response |
vehicles | array[2] | Matching vehicles, newest model year first | |
vehicles.0.epaId | number | 47908 | The vehicle's fueleconomy.gov id |
vehicles.0.year | number | 2024 | Model year |
vehicles.0.make | string | Tesla | Make |
vehicles.0.model | string | Model 3 Long Range AWD | Full model name as the EPA rates it |
vehicles.0.baseModel | string | Model 3 | Base model name |
vehicles.0.vehicleClass | string | Midsize Cars | EPA size class, for example Midsize Cars or Small Pickup Trucks 2WD |
vehicles.0.powertrain | string | electric | gasoline, diesel, hybrid, plugin_hybrid, electric, flex_fuel, cng, hydrogen or other |
vehicles.0.fuelType | string | Electricity | Fuel as the EPA lists it, for example Regular, Premium or Electricity |
vehicles.0.drive | string | All-Wheel Drive | Drive type, for example Front-Wheel Drive or All-Wheel Drive |
vehicles.0.transmission | string | Automatic (A1) | Transmission, for example Automatic (S8) |
vehicles.0.engine | object | {…} | Engine and motor |
vehicles.0.engine.cylinders | object | null | Number of cylinders |
vehicles.0.engine.displacementL | object | null | Engine displacement in litres |
vehicles.0.engine.turbocharged | boolean | false | Whether the engine is turbocharged |
vehicles.0.engine.supercharged | boolean | false | Whether the engine is supercharged |
vehicles.0.engine.description | object | null | The EPA's engine description code, when given |
vehicles.0.engine.electricMotor | string | 84 and 191 kW ACPM 3-Phase | Electric motor rating, for hybrids and electric vehicles |
vehicles.0.startStop | boolean | false | Whether the engine has start-stop |
vehicles.0.mpg | object | {…} | EPA fuel economy on the primary fuel |
vehicles.0.mpg.unit | string | MPGe | MPG, or MPGe for electric vehicles |
vehicles.0.mpg.city | number | 137 | City fuel economy |
vehicles.0.mpg.highway | number | 124 | Highway fuel economy |
vehicles.0.mpg.combined | number | 130 | Combined fuel economy |
vehicles.0.mpgAlternateFuel | object | null | Fuel economy on the second fuel: electricity for plug-in hybrids, E85 or natural gas for dual-fuel vehicles |
vehicles.0.electric | object | {…} | Electric range and charging, for electric vehicles and plug-in hybrids |
vehicles.0.electric.rangeMiles | number | 342 | EPA electric range in miles |
vehicles.0.electric.rangeCityMiles | number | 357 | EPA city electric range in miles |
vehicles.0.electric.rangeHighwayMiles | number | 323 | EPA highway electric range in miles |
vehicles.0.electric.rangeKm | number | 550 | EPA electric range in kilometres |
vehicles.0.electric.kwhPer100Miles | object | {…} | Electricity used per 100 miles |
vehicles.0.electric.kwhPer100Miles.cityPremium | number | 24.7 | City kWh per 100 miles |
vehicles.0.electric.kwhPer100Miles.highwayPremium | number | 27.2 | Highway kWh per 100 miles |
vehicles.0.electric.kwhPer100Miles.combinedPremium | number | 25.8 | Combined kWh per 100 miles |
vehicles.0.electric.chargeTime240vHoursPremium | number | 9.4 | Hours to charge on a 240V circuit |
vehicles.0.electric.chargeTime120vHoursPremium | object | null | Hours to charge on a 120V circuit |
vehicles.0.electric.onboardChargerPremium | object | null | Onboard charger description, when given |
vehicles.0.annualFuelCostUsdPremium | number | 600 | EPA's annual fuel cost estimate in US dollars (15,000 miles, 55% city) |
vehicles.0.fiveYearSavingsUsdPremium | number | 8000 | Fuel cost saved over five years against the average new vehicle; negative means it costs more |
vehicles.0.co2GramsPerMilePremium | number | 0 | Tailpipe CO2 in grams per mile |
vehicles.0.scores | object | {…} | EPA 1-10 scores, 10 best |
vehicles.0.scores.fuelEconomyPremium | number | 10 | EPA fuel economy score, 2013 models on |
vehicles.0.scores.greenhouseGasPremium | number | 10 | EPA greenhouse gas score, 2013 models on |
vehicles.0.scores.smogPremium | number | 10 | EPA smog rating, 2000 models on |
vehicles.0.gasGuzzler | boolean | false | Whether 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 reads | What happened |
|---|---|
#ERR Not connected | No API key saved. Open the side panel and connect your account. |
#ERR Replace <name> with a cell or value | A preview formula was copied as-is. Swap the placeholder for a cell reference. |
#ERR No "x" in vehiclefueleconomy | An 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 credits | The 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.
- Install the add-in for Google Sheets or Excel.
- Open the side panel and sign in, or paste a key from your dashboard.
- 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.
Related
More in Transportation: