# Vehicle MPG Lookup: EPA Fuel Economy, Range and CO2 by Model (`accountable_eel/fueleconomy-gov-vehicle-specs-lookup`) Actor

Get official EPA fuel economy ratings, MPG, electric range, CO2 emissions and annual fuel costs from fueleconomy.gov by year, make, model or vehicle ID. Export to Google Sheets or n8n.

- **URL**: https://apify.com/accountable_eel/fueleconomy-gov-vehicle-specs-lookup.md
- **Developed by:** [Adriana Voss](https://apify.com/accountable_eel) (community)
- **Categories:** Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 vehicle returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Vehicle MPG Lookup: EPA Fuel Economy, Range and CO2 by Model

Lookup official EPA fuel economy ratings, city, highway and combined MPG, electric vehicle driving range, tailpipe CO2 emissions, and 5-year fuel savings across passenger cars, trucks, and SUVs from the fueleconomy.gov public database.

### Who uses it

Built for automotive marketplaces, dealership inventory managers, fleet operators, sustainability and ESG analysts, car comparison tools, and workflow builders in Make, n8n, or Clay looking up verified vehicle MPG and emissions without API keys or browser overhead.

### What you get

One row per vehicle trim returned. Each row carries:

| Field | Type | Description |
| --- | --- | --- |
| `query` | text | The vehicle query or ID submitted. |
| `found` | boolean | `true` if vehicle specs were found; `false` rows are never charged. |
| `status` | text | `OK`, `NOT_FOUND` (no matching vehicle), or `BLOCKED`. |
| `vehicleId` | text | Official EPA vehicle ID on fueleconomy.gov. |
| `year` | number | Model year (e.g. `2022`). |
| `make` | text | Vehicle manufacturer (e.g. `Toyota`, `Ford`). |
| `model` | text | Specific vehicle model name (e.g. `Camry`, `E150 Van FFV`). |
| `baseModel` | text | Base vehicle model line. |
| `vehicleClass` | text | EPA vehicle size and body class (e.g. `Midsize Cars`, `Vans, Cargo Type`). |
| `drive` | text | Drive axle type (e.g. `Front-Wheel Drive`, `Rear-Wheel Drive`, `All-Wheel Drive`). |
| `transmission` | text | Transmission type and speeds (e.g. `Automatic (S8)`). |
| `engineDisplacement` | number | Engine displacement in liters (null for electric vehicles). |
| `cylinders` | number | Number of engine cylinders (null for electric vehicles). |
| `fuelType` | text | Primary fuel type (e.g. `Regular Gasoline`, `Electricity`, `Diesel`). |
| `cityMpg` | number | EPA city fuel economy rating in MPG (or MPGe for electric vehicles). |
| `highwayMpg` | number | EPA highway fuel economy rating in MPG (or MPGe for electric vehicles). |
| `combinedMpg` | number | EPA combined fuel economy rating in MPG (or MPGe for electric vehicles). |
| `annualFuelCostUsd` | number | Estimated annual fuel cost in USD based on 15,000 miles. |
| `youSaveSpend5YearsUsd` | number | Estimated fuel spend or savings compared to the average vehicle over 5 years. |
| `co2TailpipeGpm` | number | Tailpipe CO2 emissions in grams per mile. |
| `ghgScore` | number | EPA greenhouse gas rating from 1 to 10 (null if unrated). |
| `feScore` | number | EPA fuel economy score from 1 to 10 (null if unrated). |
| `electricRangeMiles` | number | All-electric driving range in miles for EVs and plug-in hybrids (null for gas vehicles). |
| `annualPetroleumBarrels` | number | Estimated annual petroleum consumption in barrels of oil. |
| `alternateFuelType` | text | Secondary fuel type for flex-fuel / bi-fuel vehicles (e.g. `E85`), or null. |
| `alternateCombinedMpg` | number | Combined MPG rating on secondary fuel (e.g. `11` on E85), or null. |
| `sourceUrl` | link | Official EPA fueleconomy.gov vehicle details page. |
| `scrapedAt` | date (ISO) | Timestamp when the vehicle data was fetched. |

### Example rows

| query | found | status | vehicleId | year | make | model | vehicleClass | drive | combinedMpg | annualFuelCostUsd | co2TailpipeGpm | ghgScore |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 44343 | true | OK | 44343 | 2022 | Toyota | Camry | Midsize Cars | Front-Wheel Drive | 26 | 2450 | 338 | 5 |
| 31873 | true | OK | 31873 | 2012 | Ford | E150 Van FFV | Vans, Cargo Type | Rear-Wheel Drive | 15 | 4300 | 592.47 | null |

### Limits

- Covers EPA-rated passenger vehicles, light trucks, and commercial vans from 1984 to current model years.
- Missing values (e.g. electric range on gasoline vehicles, secondary fuel specs on single-fuel vehicles, or unrated greenhouse gas scores on older models) are returned as `null`, never `0` or `""`.
- Queries that return zero results produce a single row with `"found": false` and are never charged.

### How to use

1. **In the Apify Console.** Open the actor page and click **Start** — the `vehicles` field is already pre-filled with a working example. Results land in the run's dataset as soon as each item is found.
2. **Via the API.** Call it directly with a POST request — no Console needed once you have an API token:
   ```bash
   curl "https://api.apify.com/v2/acts/accountable_eel~fueleconomy-gov-vehicle-specs-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
     -X POST \
     -H "Content-Type: application/json" \
     -d '{"vehicles":["2022 Toyota Camry","31873"]}'
   ```
3. **On a schedule.** Save this actor as an Apify **Task** with the input you want, then add a **Schedule** (hourly, daily, weekly) so it runs on its own — no server of your own required.

### Input

```json
{
  "vehicles": [
    "2022 Toyota Camry",
    "31873"
  ]
}
```

One vehicle per line or JSON object. For example {"year": 2022, "make": "Toyota", "model": "Camry"}, "2022 Toyota Camry", or EPA vehicle ID "44343". Accepted formats: {"year": 2022, "make": "Toyota", "model": "Camry"}, 2022 Toyota Camry, 44343, https://www.fueleconomy.gov/feg/Find.do?action=sbs\&id=44343.

```json
{
  "vehicles": [
    {
      "year": 2022,
      "make": "Toyota",
      "model": "Camry"
    },
    "44343"
  ],
  "maxItems": 10
}
```

`vehicles` accepts structured vehicle objects with `year`, `make`, and `model`, text query strings (e.g. `"2022 Toyota Camry"`), numeric EPA vehicle IDs (e.g. `"44343"`), or fueleconomy.gov URLs.

### Output

| query | found | status | vehicleId | year | make | model | baseModel | vehicleClass | drive | transmission | engineDisplacement | cylinders | fuelType | cityMpg | highwayMpg | combinedMpg | annualFuelCostUsd | youSaveSpend5YearsUsd | co2TailpipeGpm | ghgScore | feScore | electricRangeMiles | annualPetroleumBarrels | alternateFuelType | alternateCombinedMpg | sourceUrl | scrapedAt |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 2022 Toyota Camry | true | OK | <vehicle id> | <model year> | <make> | <model> | <base model> | <vehicle class> | <drivetrain> | <transmission> | \<engine displacement (l)> | <cylinders> | <fuel type> | <city mpg> | <highway mpg> | <combined mpg> | \<annual fuel cost (usd)> | <5-year fuel savings/spend (usd)> | \<co2 tailpipe (g/mi)> | <greenhouse gas score> | <fuel economy score> | \<electric range (miles)> | \<annual petroleum (barrels)> | <alternate fuel type> | <alternate combined mpg> | <source url> | 1970-01-01T00:00:00.000Z |

### Pricing

- **Vehicle returned**: $3 per 1,000 vehicles

Plus a $0.00005 start fee per run. Each event above is billed independently, only when it actually returns data — misses (`found:false`) are never charged.

### Use it from Clay, n8n, Make, or an AI agent

This actor runs synchronously over plain HTTP — call it directly from a script, a workflow tool, or an AI agent, no Apify Console needed once you have an API token.

```bash
curl "https://api.apify.com/v2/acts/accountable_eel~fueleconomy-gov-vehicle-specs-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"vehicles":["2022 Toyota Camry","31873"]}'
```

**n8n.** Add an HTTP Request node: Method `POST`, URL `https://api.apify.com/v2/acts/accountable_eel~fueleconomy-gov-vehicle-specs-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>`, Body Content Type `JSON`, JSON Body `{"vehicles":["2022 Toyota Camry","31873"]}` (swap in an expression from an earlier node for a real value).

**Clay.** Add an "HTTP API" column: Method `POST`, URL `https://api.apify.com/v2/acts/accountable_eel~fueleconomy-gov-vehicle-specs-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>`, Body `{"vehicles":["{{vehicle}}"]}`, mapping the row's vehicle into the `vehicles` array.

**MCP.** In Claude, Cursor, or any MCP client with the Apify MCP server, ask for "epa fuel economy lookup mpg by model" — the agent will find and run this actor.

### Example runs

#### 1. Lookup a vehicle by year, make, and model

Look up fuel economy and emissions for a specific model year:

```json
{
  "vehicles": [
    {
      "year": 2022,
      "make": "Toyota",
      "model": "Camry"
    }
  ]
}
```

#### 2. Direct lookup by EPA vehicle ID

Look up an exact vehicle trim directly using its unique EPA vehicle ID:

```json
{
  "vehicles": [
    "44343"
  ]
}
```

#### 3. Batch lookup across multiple car models

Enrich a list of candidate vehicles with MPG, annual fuel cost, and CO2 emissions:

```json
{
  "vehicles": [
    "2022 Toyota Camry",
    "2021 Honda Civic",
    "2023 Tesla Model 3"
  ],
  "maxItems": 5
}
```

# Actor input Schema

## `vehicles` (type: `array`):

One vehicle per line or JSON object. For example {"year": 2022, "make": "Toyota", "model": "Camry"}, "2022 Toyota Camry", or EPA vehicle ID "44343". Accepted formats: {"year": 2022, "make": "Toyota", "model": "Camry"}, 2022 Toyota Camry, 44343, https://www.fueleconomy.gov/feg/Find.do?action=sbs\&id=44343. You're only charged for the ones we actually find — a miss costs nothing.

## `maxItems` (type: `integer`):

Optional. Maximum number of trim variants or options to return per vehicle model query.

## `testRun` (type: `boolean`):

Turn this on to test your input on a small sample before running the full list. Turn it off to process everything.

## `onlyFound` (type: `boolean`):

Only keep rows where something was actually found. Misses are always free, whether or not you show them here.

## `includeKeywords` (type: `array`):

Optional. Only keep results that mention at least one of these words (e.g. a job title, a city, a product name). Leave empty to keep everything.

## `excludeKeywords` (type: `array`):

Optional. Drop any result that mentions one of these words. Leave empty to skip nothing.

## `maxResults` (type: `integer`):

Optional. Stop the run once this many results have been found — useful for a quick, cheap sample. Leave blank for no limit.

## `columns` (type: `array`):

Choose which pieces of information to include in each result row. All are included by default.

## `expandRows` (type: `boolean`):

When on, each vehicle found gets its own row instead of being grouped under its vehicle. You're still only charged once per vehicle, no matter how many rows it produces.

## `maxConcurrency` (type: `integer`):

Parallel requests. Keep conservative — this target has no browser fallback, so getting blocked costs more than slow-and-steady.

## Actor input object example

```json
{
  "vehicles": [
    "2022 Toyota Camry",
    "31873"
  ],
  "maxItems": 10,
  "testRun": false,
  "onlyFound": false,
  "includeKeywords": [],
  "excludeKeywords": [],
  "columns": [
    "vehicleId",
    "year",
    "make",
    "model",
    "baseModel",
    "vehicleClass",
    "drive",
    "transmission",
    "engineDisplacement",
    "cylinders",
    "fuelType",
    "cityMpg",
    "highwayMpg",
    "combinedMpg",
    "annualFuelCostUsd",
    "youSaveSpend5YearsUsd",
    "co2TailpipeGpm",
    "ghgScore",
    "feScore",
    "electricRangeMiles",
    "annualPetroleumBarrels",
    "alternateFuelType",
    "alternateCombinedMpg",
    "sourceUrl"
  ],
  "expandRows": true,
  "maxConcurrency": 2
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "vehicles": [
        "2022 Toyota Camry",
        "31873"
    ],
    "includeKeywords": [],
    "excludeKeywords": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("accountable_eel/fueleconomy-gov-vehicle-specs-lookup").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "vehicles": [
        "2022 Toyota Camry",
        "31873",
    ],
    "includeKeywords": [],
    "excludeKeywords": [],
}

# Run the Actor and wait for it to finish
run = client.actor("accountable_eel/fueleconomy-gov-vehicle-specs-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "vehicles": [
    "2022 Toyota Camry",
    "31873"
  ],
  "includeKeywords": [],
  "excludeKeywords": []
}' |
apify call accountable_eel/fueleconomy-gov-vehicle-specs-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,accountable_eel/fueleconomy-gov-vehicle-specs-lookup"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0uYT7rkoPFpE0CRpn/builds/oSbP9fIrnV8sAF71y/openapi.json
