# FuelEconomy.gov API

> FuelEconomy.gov returns vehicle fuel economy ratings, driving range, costs, and emissions as a workflow and API.

FuelEconomy.gov’s Get fuel economy returns MPG or MPGe, range, costs, savings, and emissions for a make, year, and model. Compare cars returns fuel economy and annual fuel costs for two to four cars entered by year, make, and model.

- Page: https://fous.com/tools/fueleconomy-gov
- Handle: `@fueleconomy-gov`
- Category: [Energy](https://fous.com/tools/category/energy)
- Source website: https://fueleconomy.gov
- Last verified: Sep 29, 2026

## Methods

### Compare cars

Operation `compare_cars`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Compare the official fuel economy and annual fuel costs of two to four cars by year, make and model. Selects a base version when no trim is specified; annual costs use FuelEconomy.gov estimates and plug-in hybrid figures may vary with charging.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `cars` | array | yes |  | Two to four cars, each with a year, make, and model; for example, 2024 Toyota Camry Hybrid and 2024 Tesla Model 3. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "cars"
  ],
  "properties": {
    "cars": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 6,
        "examples": [
          "2024 Toyota Camry Hybrid",
          "2024 Tesla Model 3",
          "2024 Honda Civic"
        ],
        "description": "Use the same format as these example values: \"2024 Toyota Camry Hybrid\", \"2024 Tesla Model 3\", \"2024 Honda Civic\"."
      },
      "maxItems": 4,
      "minItems": 2,
      "description": "Two to four cars, each with a year, make, and model; for example, 2024 Toyota Camry Hybrid and 2024 Tesla Model 3.",
      "examples": [
        [
          "2024 Toyota Camry Hybrid",
          "2024 Tesla Model 3"
        ],
        [
          "2024 Honda Civic",
          "2024 Toyota Camry",
          "2024 Toyota Prius Prime",
          "2024 Madeup Phantom"
        ]
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "cars": [
        "2024 Toyota Camry Hybrid",
        "2024 Tesla Model 3"
      ]
    },
    {
      "cars": [
        "2024 Honda Civic",
        "2024 Toyota Camry",
        "2024 Toyota Prius Prime",
        "2024 Madeup Phantom"
      ]
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `cars` | array |  | Vehicle comparisons in the order entered. |
| `cars[].car` | string | `"2024 Toyota Camry Hybrid"` | Car exactly as entered. |
| `cars[].city` | number or null | `51` | City fuel economy in the stated unit. |
| `cars[].link` | string or null | `"https://www.fueleconomy.gov/feg/noframes/47092.shtml"` | FuelEconomy.gov page for the matched vehicle. |
| `cars[].note` | string or null |  | Why the car could not be matched, when applicable. |
| `cars[].highway` | number or null | `53` | Highway fuel economy in the stated unit. |
| `cars[].combined` | number or null | `52` | Combined fuel economy in the stated unit. |
| `cars[].fuel_type` | string or null | `"Regular"` | Fuel used by the vehicle. |
| `cars[].vehicle_id` | string or null | `"47092"` | FuelEconomy.gov vehicle ID. |
| `cars[].efficiency_unit` | string or null | `"MPG"` | MPG or MPGe for the fuel economy figures. |
| `cars[].vehicle_matched` | string or null | `"2024 Toyota Camry Hybrid LE — Auto (AV-S6), 4 cyl, 2.5 L"` | Official vehicle version selected, including transmission and engine. |
| `cars[].co2_grams_per_mile` | number or null | `170` | Tailpipe carbon dioxide emissions in grams per mile. |
| `cars[].annual_fuel_cost_usd` | number or null | `1250` | Estimated annual fuel cost in US dollars. |
| `cars[].electric_range_miles` | number or null | `272` | Electric-only driving range in miles, when available. |
| `cars[].greenhouse_gas_score` | integer or null | `8` | Greenhouse gas score from 1 to 10. |
| `summary` | string | `"2024 Tesla Model 3 RWD — Auto (A1) is the cheapest to run, saving $700 per year versus 2024 Toyota Camry Hybrid LE — Au` | Cheapest vehicle to run and annual savings over the most expensive. |

**Example input**

```json
{
  "cars": [
    "2024 Toyota Camry Hybrid",
    "2024 Tesla Model 3"
  ]
}
```

**Example output**

```json
{
  "cars": [
    {
      "car": "2024 Toyota Camry Hybrid",
      "city": 51,
      "link": "https://www.fueleconomy.gov/feg/noframes/47092.shtml",
      "note": null,
      "highway": 53,
      "combined": 52,
      "fuel_type": "Regular",
      "vehicle_id": "47092",
      "efficiency_unit": "MPG",
      "vehicle_matched": "2024 Toyota Camry Hybrid LE — Auto (AV-S6), 4 cyl, 2.5 L",
      "co2_grams_per_mile": 170,
      "annual_fuel_cost_usd": 1250,
      "electric_range_miles": null,
      "greenhouse_gas_score": 8
    },
    {
      "car": "2024 Tesla Model 3",
      "city": 140,
      "link": "https://www.fueleconomy.gov/feg/noframes/47909.shtml",
      "note": null,
      "highway": 125,
      "combined": 132,
      "fuel_type": "Electricity",
      "vehicle_id": "47909",
      "efficiency_unit": "MPGe",
      "vehicle_matched": "2024 Tesla Model 3 RWD — Auto (A1)",
      "co2_grams_per_mile": 0,
      "annual_fuel_cost_usd": 550,
      "electric_range_miles": 272,
      "greenhouse_gas_score": 10
    }
  ],
  "summary": "2024 Tesla Model 3 RWD — Auto (A1) is the cheapest to run, saving $700 per year versus 2024 Toyota Camry Hybrid LE — Auto (AV-S6), 4 cyl, 2.5 L."
}
```

### Get fuel economy

Operation `get_fuel_economy`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get official MPG or MPGe, driving range, annual fuel cost, five-year savings, and emissions for all matching vehicle versions. Fuel costs use current fuel prices and EPA’s 15,000-mile-per-year assumption; plug-in hybrid costs include gasoline and electricity.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `make` | string | yes | `"Toyota"` | Vehicle make, for example Toyota. |
| `year` | integer | yes | `2022` | Model year, for example 2022. |
| `model` | string | yes | `"RAV4"` | Model name, for example RAV4 or Model 3. |
| `version` | string | no | `"Hybrid AWD"` | Optional words identifying trim, engine, transmission or drive, for example Hybrid AWD. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "year",
    "make",
    "model"
  ],
  "properties": {
    "make": {
      "type": "string",
      "description": "Vehicle make, for example Toyota.",
      "examples": [
        "Toyota",
        "Tesla"
      ]
    },
    "year": {
      "type": "integer",
      "description": "Model year, for example 2022.",
      "examples": [
        2022
      ]
    },
    "model": {
      "type": "string",
      "description": "Model name, for example RAV4 or Model 3.",
      "examples": [
        "RAV4",
        "Model 3",
        "Prius Prime"
      ]
    },
    "version": {
      "type": "string",
      "default": "",
      "description": "Optional words identifying trim, engine, transmission or drive, for example Hybrid AWD.",
      "examples": [
        "Hybrid AWD"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "make": "Toyota",
      "year": 2022,
      "model": "RAV4",
      "version": "Hybrid AWD"
    },
    {
      "make": "Tesla",
      "year": 2022,
      "model": "Model 3"
    },
    {
      "make": "Toyota",
      "year": 2022,
      "model": "Prius Prime"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `versions` | array |  | Matching official vehicle versions. |
| `versions[].make` | string | `"Toyota"` | Make. |
| `versions[].year` | integer | `2022` | Model year. |
| `versions[].drive` | string or null | `"All-Wheel Drive"` | Drive type. |
| `versions[].model` | string | `"RAV4 Hybrid AWD"` | Full model and trim name. |
| `versions[].engine` | string or null | `"2.5 L, 4 cylinders, SIDI & PFI; Hybrid"` | Engine or electric motor. |
| `versions[].city_mpg` | number or null | `41` | City miles per gallon on liquid fuel. |
| `versions[].page_url` | string | `"https://www.fueleconomy.gov/feg/Find.do?action=sbs&id=45009"` | FuelEconomy.gov vehicle page. |
| `versions[].city_mpge` | number or null | `134` | City miles per gallon gasoline equivalent for electric driving. |
| `versions[].fuel_type` | string | `"Regular"` | Vehicle fuel type. |
| `versions[].vehicle_id` | string | `"45009"` | FuelEconomy.gov vehicle ID. |
| `versions[].highway_mpg` | number or null | `38` | Highway miles per gallon on liquid fuel. |
| `versions[].range_miles` | number or null | `358` | Electric vehicle range in miles. |
| `versions[].combined_mpg` | number or null | `40` | Combined miles per gallon on liquid fuel. |
| `versions[].highway_mpge` | number or null | `126` | Highway miles per gallon gasoline equivalent for electric driving. |
| `versions[].transmission` | string or null | `"Automatic (AV-S6)"` | Transmission. |
| `versions[].combined_mpge` | number or null | `131` | Combined miles per gallon gasoline equivalent for electric driving. |
| `versions[].fuel_price_unit` | string or null | `"gallon"` | Fuel price unit, such as gallon or kWh. |
| `versions[].co2_grams_per_mile` | number or null | `223` | Tailpipe CO2 emissions in grams per mile. |
| `versions[].vehicle_description` | string | `"2022 Toyota RAV4 Hybrid AWD, 2.5 L, 4 cylinders, SIDI & PFI; Hybrid, Automatic (AV-S6), All-Wheel Drive"` | Vehicle year, make, model, engine, transmission and drive. |
| `versions[].annual_fuel_cost_usd` | number or null | `1600` | Official annual fuel cost in US dollars. |
| `versions[].annual_miles_assumed` | integer | `15000` | Annual mileage used to calculate fuel cost. |
| `versions[].electric_range_miles` | number or null | `25` | Plug-in hybrid electric range in miles. |
| `versions[].greenhouse_gas_score` | integer or null | `8` | EPA greenhouse gas score from 1 to 10. |
| `versions[].five_year_savings_usd` | number or null | `3500` | Five-year fuel cost savings versus the average new vehicle in US dollars; negative means extra cost. |
| `versions[].fuel_price_usd_per_unit` | number or null | `4.32` | Current fuel price in US dollars per stated unit. |
| `versions[].secondary_fuel_price_unit` | string or null | `"kWh"` | Unit for secondary fuel price. |
| `versions[].secondary_fuel_price_usd_per_unit` | number or null | `0.15` | Electricity or other alternative fuel price for dual-fuel vehicles. |

**Example input**

```json
{
  "make": "Toyota",
  "year": 2022,
  "model": "RAV4",
  "version": "Hybrid AWD"
}
```

**Example output**

```json
{
  "versions": [
    {
      "make": "Toyota",
      "year": 2022,
      "drive": "All-Wheel Drive",
      "model": "RAV4 Hybrid AWD",
      "engine": "2.5 L, 4 cylinders, SIDI & PFI; Hybrid",
      "city_mpg": 41,
      "page_url": "https://www.fueleconomy.gov/feg/Find.do?action=sbs&id=45009",
      "city_mpge": null,
      "fuel_type": "Regular",
      "vehicle_id": "45009",
      "highway_mpg": 38,
      "range_miles": null,
      "combined_mpg": 40,
      "highway_mpge": null,
      "transmission": "Automatic (AV-S6)",
      "combined_mpge": null,
      "fuel_price_unit": "gallon",
      "co2_grams_per_mile": 223,
      "vehicle_description": "2022 Toyota RAV4 Hybrid AWD, 2.5 L, 4 cylinders, SIDI & PFI; Hybrid, Automatic (AV-S6), All-Wheel Drive",
      "annual_fuel_cost_usd": 1600,
      "annual_miles_assumed": 15000,
      "electric_range_miles": null,
      "greenhouse_gas_score": 8,
      "five_year_savings_usd": 3500,
      "fuel_price_usd_per_unit": 4.32,
      "secondary_fuel_price_unit": null,
      "secondary_fuel_price_usd_per_unit": null
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@fueleconomy-gov",
  "visibility": "public",
  "operation": "compare_cars",
  "version": 1,
  "input": {
    "cars": [
      "2024 Toyota Camry Hybrid",
      "2024 Tesla Model 3"
    ]
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@fueleconomy-gov\",\n  \"visibility\": \"public\",\n  \"operation\": \"compare_cars\",\n  \"version\": 1,\n  \"input\": {\n    \"cars\": [\n      \"2024 Toyota Camry Hybrid\",\n      \"2024 Tesla Model 3\"\n    ]\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@fueleconomy-gov",
  "visibility": "public",
  "operation": "compare_cars",
  "version": 1,
  "input": {
    "cars": [
      "2024 Toyota Camry Hybrid",
      "2024 Tesla Model 3"
    ]
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/fueleconomy-gov`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `compare_cars`: Compare cars. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `get_fuel_economy`: Get fuel economy. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-fueleconomy-gov https://api.fous.com/mcp/tools/fueleconomy-gov --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Compare fuel costs across vehicle options
- Identify vehicles with longer electric driving range
- Review emissions and greenhouse gas scores
- Estimate annual fuel costs for a vehicle
- Find fuel economy ratings for a specific trim

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this FuelEconomy.gov tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a FuelEconomy.gov account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from fueleconomy.gov when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### What is a vehicle’s city, highway, and combined fuel economy?

Get fuel economy returns city, highway, and combined MPG or MPGe for matching versions. Compare cars provides these figures for two to four cars.

### What is a vehicle’s electric driving range?

Get fuel economy returns electric range for matching versions; Compare cars provides electric-only range when available.

### How do annual fuel costs compare between cars?

Compare cars returns estimated annual fuel costs and summarizes the cheapest vehicle and its annual savings over the most expensive.

## Related

- [US Energy Information Administration API](https://fous.com/tools/us-energy-information-administration.md): US Energy Information Administration provides official energy statistics and analysis, including latest weekly fuel prices and preliminary monthly state electricity prices with historical comparisons.
- [Kelley Blue Book API](https://fous.com/tools/kelley-blue-book.md): Kelley Blue Book provides valuations and automotive research, including used-car value estimates and ranges, plus model reviews with ratings, pricing, fuel economy, pros and cons.
- [GasBuddy API](https://fous.com/tools/gasbuddy.md): GasBuddy finds stations and community-reported fuel prices in the US and Canada, with nearby prices that may be missing or out of date and regional averages that may lag the day.
- [Alternative Fuels Data Center API](https://fous.com/tools/alternative-fuels-data-center.md): U.S. Department of Energy data on alternative fuel stations and vehicles.
- [NHTSA API](https://fous.com/tools/nhtsa.md): NHTSA provides vehicle details, model-level recalls, 5-Star Safety Ratings, owner complaints, and listed car, SUV, and truck models; data may be missing, and recalls do not confirm repairs.
- [CarGurus API](https://fous.com/tools/cargurus.md): CarGurus helps shoppers browse dealer-listed new and used cars with deal ratings, and view average used prices, price ranges and 12-month price history by model year.
- [AAA API](https://fous.com/tools/aaa.md): AAA daily gas price averages for the United States, states and metro areas.
- [Etherscan API](https://fous.com/tools/etherscan.md): Etherscan shows current gas prices, estimated costs, wallet balances, displayed token holdings and newest confirmed transactions, plus transaction status and details; pending fees are unconfirmed.
- [All Energy tools](https://fous.com/tools/category/energy)
