# FuelEconomy.gov API: Compare cars

> Compares the official fuel economy and estimated annual fuel cost of two to four cars by year, make and model, using FuelEconomy.gov. Selects a base version when no trim is given.

Unofficial. Not affiliated with or endorsed by FuelEconomy.gov.

- Page: https://fous.com/methods/fueleconomy.gov/compare-cars
- Method: `fueleconomy.gov/compare_cars`, version 1
- Website: fueleconomy.gov
- Returns: per car: matched version, MPG or MPGe, annual fuel cost, CO2, GHG score, range, link; plus cheapest-to-run summary
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `cars` | array of string | yes | `["2024 Honda Civic","2024 Toyota Camry","2024 Toyota Prius Prime","2024 Madeup Phantom"]` | Two to four cars, each with a year, make, and model; for example, 2024 Toyota Camry Hybrid and 2024 Tesla Model 3. |

## Output

From a run on Oct 23, 2026, shortened. Its input:

```json
{
  "cars": [
    "2024 Honda Civic",
    "2024 Toyota Camry",
    "2024 Toyota Prius Prime",
    "2024 Madeup Phantom"
  ]
}
```

Its output:

```json
{
  "cars": [
    {
      "car": "2024 Honda Civic",
      "city": 30,
      "link": "https://www.fueleconomy.gov/feg/noframes/47072.shtml",
      "note": null,
      "highway": 37,
      "combined": 33,
      "fuel_type": "Regular",
      "vehicle_id": "47072",
      "efficiency_unit": "MPG",
      "vehicle_matched": "2024 Honda Civic 4Dr — Auto (AV-S7), 4 cyl, 2.0 L",
      "co2_grams_per_mile": 266,
      "annual_fuel_cost_usd": 1950,
      "electric_range_miles": null,
      "greenhouse_gas_score": 6
    },
    {
      "car": "2024 Toyota Camry",
      "city": 28,
      "link": "https://www.fueleconomy.gov/feg/noframes/47090.shtml",
      "note": null,
      "highway": 39,
      "combined": 32,
      "fuel_type": "Regular",
      "vehicle_id": "47090",
      "efficiency_unit": "MPG",
      "vehicle_matched": "2024 Toyota Camry LE/SE — Auto (S8), 4 cyl, 2.5 L",
      "co2_grams_per_mile": 280,
      "annual_fuel_cost_usd": 2000,
      "electric_range_miles": null,
      "greenhouse_gas_score": 6
    },
    {
      "car": "2024 Toyota Prius Prime",
      "city": 86,
      "link": "https://www.fueleconomy.gov/feg/noframes/47500.shtml",
      "note": null,
      "highway": 72,
      "combined": 79,
      "fuel_type": "Regular Gas and Electricity",
      "vehicle_id": "47500",
      "efficiency_unit": "MPGe",
      "vehicle_matched": "2024 Toyota Prius Prime — Auto (variable gear ratios), 4 cyl, 2.0 L",
      "co2_grams_per_mile": 60,
      "annual_fuel_cost_usd": 1350,
      "electric_range_miles": 40,
      "greenhouse_gas_score": 10
    }
  ],
  "summary": "2024 Toyota Prius Prime — Auto (variable gear ratios), 4 cyl, 2.0 L is the cheapest to run, saving $650 per year versus 2024 Toyota Camry LE/SE — Auto (S8), 4 cyl, 2.5 L."
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"fueleconomy.gov/compare_cars","input":{"cars":["2024 Honda Civic","2024 Toyota Camry","2024 Toyota Prius Prime","2024 Madeup Phantom"]}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- Compare the fuel economy and annual fuel cost of a 2024 Toyota Camry Hybrid and a 2024 Honda Accord Hybrid
- Which is cheaper to run per year, a 2023 Ford F-150 or a 2023 Chevrolet Silverado 1500?
- Side by side MPG and CO2 emissions for a 2025 Hyundai Ioniq 5, a 2025 Kia EV6, and a 2025 Tesla Model Y
- On fueleconomy.gov, check estimated yearly fuel cost for a 2022 Subaru Outback versus a 2022 Mazda CX-5
- Compare 2024 Nissan Leaf, 2024 Chevrolet Bolt EUV, and 2024 Volkswagen ID.4 by range and annual energy cost

## Input schema

```json
{
  "type": "object",
  "required": [
    "cars"
  ],
  "properties": {
    "cars": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 6
      },
      "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."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "cars",
    "summary"
  ],
  "properties": {
    "cars": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "car",
          "vehicle_matched",
          "fuel_type",
          "combined",
          "city",
          "highway",
          "efficiency_unit",
          "electric_range_miles",
          "annual_fuel_cost_usd",
          "co2_grams_per_mile",
          "greenhouse_gas_score",
          "link",
          "note",
          "vehicle_id"
        ],
        "properties": {
          "car": {
            "type": "string",
            "description": "Car exactly as entered."
          },
          "city": {
            "type": [
              "number",
              "null"
            ],
            "description": "City fuel economy in the stated unit."
          },
          "link": {
            "type": [
              "string",
              "null"
            ],
            "description": "FuelEconomy.gov page for the matched vehicle."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the car could not be matched, when applicable."
          },
          "highway": {
            "type": [
              "number",
              "null"
            ],
            "description": "Highway fuel economy in the stated unit."
          },
          "combined": {
            "type": [
              "number",
              "null"
            ],
            "description": "Combined fuel economy in the stated unit."
          },
          "fuel_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fuel used by the vehicle."
          },
          "vehicle_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "FuelEconomy.gov vehicle ID.",
            "x-fous-developer": true
          },
          "efficiency_unit": {
            "type": [
              "string",
              "null"
            ],
            "description": "MPG or MPGe for the fuel economy figures."
          },
          "vehicle_matched": {
            "type": [
              "string",
              "null"
            ],
            "description": "Official vehicle version selected, including transmission and engine."
          },
          "co2_grams_per_mile": {
            "type": [
              "number",
              "null"
            ],
            "description": "Tailpipe carbon dioxide emissions in grams per mile."
          },
          "annual_fuel_cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "description": "Estimated annual fuel cost in US dollars."
          },
          "electric_range_miles": {
            "type": [
              "number",
              "null"
            ],
            "description": "Electric-only driving range in miles, when available."
          },
          "greenhouse_gas_score": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Greenhouse gas score from 1 to 10."
          }
        },
        "additionalProperties": false
      },
      "description": "Vehicle comparisons in the order entered."
    },
    "summary": {
      "type": "string",
      "description": "Cheapest vehicle to run and annual savings over the most expensive."
    }
  },
  "additionalProperties": false
}
```

## See more

- [FuelEconomy.gov API: Get fuel economy](https://fous.com/methods/fueleconomy.gov/get-fuel-economy.md): Returns official MPG or MPGe, range, annual fuel cost, five-year savings and emissions for every matching version of a vehicle. Costs use current fuel prices and 15,000 miles per year; plug-in hybrid costs include gasoline and electricity.
- [CarGurus API: Get used car market value](https://fous.com/methods/cargurus.com/get-market-value.md): Gets the current average used asking price, the CarGurus price range and the 12-month price history for a model year (all trims), from CarGurus price trends.
- [Carvana API: Search used cars](https://fous.com/methods/carvana.com/search-cars.md): Searches Carvana's used-car inventory by make and model, with optional price, year, mileage and ZIP filters, and returns each car's price, estimated monthly payment, mileage and delivery or pickup estimate for the ZIP.
- [Kelley Blue Book API: Get KBB car review](https://fous.com/methods/kbb.com/get-car-review.md): Gets Kelley Blue Book's expert and consumer ratings, trim prices with the KBB Fair Purchase Price, fuel economy, pros, cons and the expert review's opening verdict for a car model by year, make and model. Some details are unavailable for certain model years.
- [CarGurus API: Search cars for sale](https://fous.com/methods/cargurus.com/search-cars.md): Searches new and used cars for sale near a US ZIP code for a make and model, with prices, dealer details and CarGurus deal ratings. Used cars come first, then new cars, each in CarGurus order; market difference is positive below market and negative above.
- [CarMax API: Search used cars](https://fous.com/methods/carmax.com/search-cars.md): Searches CarMax used cars by make and model with optional ZIP, distance, year, price and mileage filters, keeping CarMax's order. Pages expose only the first 48 cars; distance is CarMax's distance from the selected local store, and larger limits or narrow distance filters may return fewer matches.
- [NHTSA API: Get safety ratings](https://fous.com/methods/nhtsa.gov/get-safety-ratings.md): Gets NHTSA 5-Star Safety Ratings for a car by make, model and model year. Returns each matching version; unrated versions have no stars.
- [Cars.com API: Search listings](https://fous.com/methods/cars.com/search-cars.md): Searches Cars.com car listings for a make and model around a US ZIP code within a radius, optionally by condition (new, used or certified pre-owned) and maximum price, in Cars.com search order.
- [All FuelEconomy.gov methods](https://fous.com/methods/fueleconomy.gov.md)
