# US EPA Fuel Economy Scraper (`parseforge/fueleconomy-gov-scraper`) Actor

Scrape US EPA fuel economy ratings for any vehicle make/model/year. MPG city/highway/combined, fuel type, CO2 emissions, annual cost. No API key required.

- **URL**: https://apify.com/parseforge/fueleconomy-gov-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Business, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $24.60 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## ⛽ US EPA Fuel Economy Scraper

> 🚀 **Export EPA fuel economy data for every US vehicle in seconds.** Pull city, highway, and combined MPG, CO2 emissions, annual fuel cost, engine config, and drivetrain for **any model year from 1984 onward**. No API key, no signup, no manual look-ups.

> 🕒 **Last updated:** 2026-05-13 · **📊 30 fields** per record · **⛽ 1984-present coverage** · **🚗 Makes, models, vehicles, and by-ID modes**

The **US EPA Fuel Economy Scraper** queries the official fueleconomy.gov REST API and returns up to **30 fields per record**, including the EPA vehicle ID, year, make, model, engine and transmission config, vehicle class, fuel type (primary and alternate for flex-fuel and dual-fuel vehicles), city/highway/combined MPG, alternative-fuel MPG, annual fuel cost, tailpipe CO2 grams per mile, drivetrain, engine displacement, cylinder count, electric range, and start-stop equipment. The underlying dataset is the federally mandated efficiency database every US-market vehicle is tested against.

The catalog covers **every model year from 1984 to today**, every make sold in the US (including electric, hybrid, plug-in, flex-fuel, and diesel variants), and every engine/transmission configuration the EPA tests separately. This Actor exposes four traversal modes (vehicles, models, makes, byId) and an optional model-level aggregation that picks the best-MPG variant per make+model. Export as CSV, Excel, JSON, or XML in under a minute. All filtering and aggregation run server-side.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Auto journalists, dealerships, sustainability teams, EV analysts, fleet managers, researchers, comparison-shopping apps | MPG and CO2 comparisons, fleet planning, tax-credit eligibility checks, dealer inventory enrichment, EV vs ICE studies, year-over-year emissions trends |

---

### 📋 What the EPA Fuel Economy Scraper does

Four traversal modes in a single Actor:

- 🚗 **Vehicles mode.** Year [+ make + model] -> every matching vehicle with full MPG, CO2, and cost detail.
- 📋 **Models mode.** Year + make -> all models that year (lightweight, no per-trim detail).
- 🏭 **Makes mode.** Year -> every make sold that model year.
- 🔍 **By ID mode.** Look up a single vehicle by its EPA vehicle ID for the full spec sheet.

For vehicles mode, an extra **aggregation toggle** controls row granularity. `engineConfig` (default) returns one row per engine/transmission/drivetrain combination (raw EPA structure). `model` collapses to one row per make+model and keeps the best-MPG variant, adding a `configCount` field showing how many configs were considered.

Each record includes the EPA vehicle ID, year, make, model, engine config string (e.g. "Auto (S8), 4 cyl, 2.5 L"), vehicle class, primary and alternate fuel types, city/highway/combined MPG (and alt-fuel variants for flex-fuel cars), annual fuel cost, tailpipe CO2 g/mi, drivetrain, transmission, displacement in liters, cylinder count, EV range (city, highway, combined), and start-stop equipment.

> 💡 **Why it matters:** the EPA endpoint returns positional XML wrappers nested across menus and detail records, with ten-plus alternate fields for hybrids and FFVs that you have to decode manually. This Actor walks the make -> model -> trim -> detail tree, normalizes alt-fuel fields, and emits one clean record per vehicle, plus optional model-level aggregation so dashboards don't drown in 20 Camry rows.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded dataset._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td><code>maxItems</code></td><td>integer</td><td><code>10</code></td><td>Records to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
<tr><td><code>mode</code></td><td>string</td><td><code>"vehicles"</code></td><td>One of <code>vehicles</code>, <code>models</code>, <code>makes</code>, <code>byId</code>.</td></tr>
<tr><td><code>year</code></td><td>integer</td><td><code>2024</code></td><td>Model year (1984-2030). Required in vehicles, models, makes modes.</td></tr>
<tr><td><code>make</code></td><td>string</td><td>empty</td><td>Optional manufacturer name (e.g. Toyota). Required in models mode.</td></tr>
<tr><td><code>model</code></td><td>string</td><td>empty</td><td>Optional model name. Used as a case-insensitive prefix match in vehicles mode.</td></tr>
<tr><td><code>vehicleId</code></td><td>integer</td><td>null</td><td>EPA vehicle ID (required in byId mode).</td></tr>
<tr><td><code>aggregateBy</code></td><td>string</td><td><code>"engineConfig"</code></td><td>Vehicles mode only. <code>engineConfig</code> = one row per config. <code>model</code> = one row per make+model (best-MPG variant).</td></tr>
</tbody>
</table>

**Example: every 2024 Toyota Camry config with full MPG detail.**

```json
{
    "maxItems": 25,
    "mode": "vehicles",
    "year": 2024,
    "make": "Toyota",
    "model": "Camry",
    "aggregateBy": "engineConfig"
}
````

**Example: best-MPG variant per Toyota model in 2024.**

```json
{
    "maxItems": 100,
    "mode": "vehicles",
    "year": 2024,
    "make": "Toyota",
    "aggregateBy": "model"
}
```

**Example: all makes available in 2024.**

```json
{
    "maxItems": 100,
    "mode": "makes",
    "year": 2024
}
```

**Example: look up vehicle ID 42011.**

```json
{
    "mode": "byId",
    "vehicleId": 42011
}
```

> ⚠️ **Good to Know:** the EPA encodes trim variants in the model name itself ("Camry", "Camry LE/SE", "Camry XSE", "Camry Hybrid LE" are separate rows). When you specify a model, the Actor treats it as a case-insensitive prefix so "Camry" matches every Camry variant. Vehicles mode traverses makes -> models -> trims -> detail and stops as soon as `maxItems` is reached, so wide queries on all makes are practical.

***

### 📊 Output

Each vehicle record can contain up to **30 fields**. Optional fields appear only when the EPA has data for them. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🆔 `id` | number | null | `47085` |
| 🔗 `url` | string | `"https://www.fueleconomy.gov/feg/noframes/47085.shtml"` |
| 📅 `year` | number | null | `2024` |
| 🏭 `make` | string | null | `"Toyota"` |
| 🚗 `model` | string | null | `"Camry"` |
| 🛠️ `engineConfig` | string | null | `"Auto (S8), 6 cyl, 3.5 L"` |
| 🔢 `configCount` | number (optional) | `3` |
| 🏷️ `vehicleClass` | string | null | `"Midsize Cars"` |
| ⛽ `fuelType` | string | null | `"Regular"` |
| ⛽ `fuelType1` | string | null | `"Regular Gasoline"` |
| ⛽ `fuelType2` | string (optional) | `"E85"` |
| 🏙️ `cityMpg` | number | null | `22` |
| 🛣️ `highwayMpg` | number | null | `33` |
| 📊 `combinedMpg` | number | null | `26` |
| 🏙️ `cityMpgAlt` | number (optional) | `18` |
| 🛣️ `highwayMpgAlt` | number (optional) | `26` |
| 📊 `combinedMpgAlt` | number (optional) | `21` |
| 💵 `annualFuelCostUsd` | number | null | `2300` |
| 💵 `annualFuelCostUsdAlt` | number (optional) | `3100` |
| 🌫️ `co2TailpipeGpm` | number | null | `338` |
| 🌫️ `co2TailpipeGpmAlt` | number (optional) | `420` |
| 🛞 `drive` | string | null | `"Front-Wheel Drive"` |
| ⚙️ `transmission` | string | null | `"Automatic (S8)"` |
| 🔧 `displacementL` | number (optional) | `3.5` |
| 🔧 `cylinders` | number (optional) | `6` |
| 🔋 `rangeMiles` | number (optional) | `350` |
| 🔋 `rangeCityMiles` | number (optional) | `400` |
| 🔋 `rangeHwyMiles` | number (optional) | `300` |
| 🔋 `rangeAltMiles` | number (optional) | `380` |
| 🔁 `startStop` | string | null | `"Y"` |
| 🕒 `scrapedAt` | ISO 8601 | `"2026-05-12T23:06:24.431Z"` |

#### 📦 Sample records

<details>
<summary><strong>🚗 2024 Toyota Camry V6 (gasoline, midsize)</strong></summary>

```json
{
    "id": 47085,
    "url": "https://www.fueleconomy.gov/feg/noframes/47085.shtml",
    "year": 2024,
    "make": "Toyota",
    "model": "Camry",
    "engineConfig": "Auto (S8), 6 cyl, 3.5 L",
    "vehicleClass": "Midsize Cars",
    "fuelType": "Regular",
    "fuelType1": "Regular Gasoline",
    "cityMpg": 22,
    "highwayMpg": 33,
    "combinedMpg": 26,
    "annualFuelCostUsd": 2300,
    "co2TailpipeGpm": 338,
    "drive": "Front-Wheel Drive",
    "transmission": "Automatic (S8)",
    "displacementL": 3.5,
    "cylinders": 6,
    "startStop": "N",
    "scrapedAt": "2026-05-12T23:06:24.431Z",
    "configCount": 1
}
```

</details>

<details>
<summary><strong>🌱 2024 Toyota Camry Hybrid LE (52 combined MPG)</strong></summary>

```json
{
    "id": 47092,
    "url": "https://www.fueleconomy.gov/feg/noframes/47092.shtml",
    "year": 2024,
    "make": "Toyota",
    "model": "Camry Hybrid LE",
    "engineConfig": "Auto (AV-S6), 4 cyl, 2.5 L",
    "vehicleClass": "Midsize Cars",
    "fuelType": "Regular",
    "fuelType1": "Regular Gasoline",
    "cityMpg": 51,
    "highwayMpg": 53,
    "combinedMpg": 52,
    "annualFuelCostUsd": 1150,
    "co2TailpipeGpm": 170,
    "drive": "Front-Wheel Drive",
    "transmission": "Automatic (AV-S6)",
    "displacementL": 2.5,
    "cylinders": 4,
    "startStop": "Y",
    "scrapedAt": "2026-05-12T23:06:25.188Z",
    "configCount": 1
}
```

</details>

<details>
<summary><strong>🛞 2024 Toyota Camry AWD XLE/XSE</strong></summary>

```json
{
    "id": 47089,
    "url": "https://www.fueleconomy.gov/feg/noframes/47089.shtml",
    "year": 2024,
    "make": "Toyota",
    "model": "Camry AWD XLE/XSE",
    "engineConfig": "Auto (S8), 4 cyl, 2.5 L",
    "vehicleClass": "Midsize Cars",
    "fuelType": "Regular",
    "fuelType1": "Regular Gasoline",
    "cityMpg": 25,
    "highwayMpg": 34,
    "combinedMpg": 28,
    "annualFuelCostUsd": 2150,
    "co2TailpipeGpm": 315,
    "drive": "All-Wheel Drive",
    "transmission": "Automatic (S8)",
    "displacementL": 2.5,
    "cylinders": 4,
    "startStop": "N",
    "scrapedAt": "2026-05-12T23:06:24.939Z",
    "configCount": 1
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🇺🇸 | **Authoritative source.** Direct from fueleconomy.gov, the federal vehicle-efficiency database. |
| 📅 | **40+ years of coverage.** Every model year from 1984 to present. |
| 🧩 | **Four traversal modes.** Makes, models, vehicles, and by-ID, so you can query at the level you need. |
| 🔁 | **Smart aggregation.** Collapse trim explosions to best-MPG variant per make+model with one input toggle. |
| ⛽ | **Hybrids and flex-fuel handled.** Alt-fuel MPG, cost, and CO2 fields included when present. |
| ⚡ | **Fast.** A typical make-year query (under 100 vehicles) finishes in 30-90 seconds. |
| 🚫 | **No authentication.** Federal open data, no API key needed. |

> 📊 The EPA fuel-economy database is the single most-cited source for US vehicle efficiency. Clean, normalized records are the starting point for every comparison shopping app, fleet model, and sustainability dashboard.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Aggregation | Setup |
|---|---|---|---|---|
| **⭐ US EPA Fuel Economy Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **1984-present, every US model** | engineConfig or model | ⚡ 2 min |
| Raw fueleconomy.gov API | Free | All | Manual XML decode | 🐢 Days |
| EPA bulk CSV downloads | Free | All historical | Manual joins | 🕒 Hours |
| Commercial vehicle-spec APIs | $500+/month | All US + global | Vendor-specific | ⏳ Account setup |

Pick this Actor when you want the EPA database ready to query with traversal modes and aggregation already wired up.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the US EPA Fuel Economy Scraper page on the Apify Store.
3. 🎯 **Set input.** Pick a mode (vehicles, models, makes, byId), set a year (and optionally make+model), choose aggregation.
4. 🚀 **Run it.** Click **Start** and let the Actor walk the EPA tree.
5. 📥 **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### 🚗 Auto comparison-shopping apps

- MPG and annual-cost comparisons across trims
- Best-in-class hybrid or EV picks per segment
- Inventory enrichment with EPA-verified numbers
- Year-over-year efficiency callouts

</td>
<td width="50%" valign="top">

#### 🌱 Sustainability and ESG

- Fleet CO2 reporting with tailpipe g/mi per vehicle
- Carbon-tax modeling using annual fuel cost
- EV-vs-ICE transition planning
- Scope-1 emissions for company-car programs

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 🚙 Dealerships and fleet managers

- Detail-page MPG widgets with engine-config breakouts
- Total-cost-of-ownership estimators
- Tax-credit eligibility checks (EV, plug-in)
- Spec-sheet enrichment for VDPs

</td>
<td width="50%" valign="top">

#### 📰 Journalism and research

- Decadal efficiency trend stories
- Hybrid market-share studies
- Flex-fuel and E85 availability analysis
- Datasets for transportation economics research

</td>
</tr>
</table>

***

### 🔌 Automating EPA Fuel Economy Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. A yearly run when the new model year is released keeps your catalog current. Daily runs on a specific make refresh inventory enrichment in dealer portals.

***

### 🌟 Beyond business use cases

EPA fuel-economy data powers more than commercial workflows. The same structured records support research, education, and personal projects.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Transportation economics and emissions research
- Multi-decade efficiency trend studies
- Teaching datasets for environmental policy classes
- Reproducible vehicle-cost comparisons

</td>
<td width="50%">

#### 🎨 Personal and creative

- Personal car-shopping spreadsheets
- Hobbyist car-spec databases
- Sustainability-themed blog posts
- DIY comparison widgets

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Open-data exercises for civic-tech groups
- Investigative journalism on emissions standards
- Educational content for sustainability programs
- Open EV-adoption transparency dashboards

</td>
<td width="50%">

#### 🧪 Experimentation

- Train ML models on vehicle features vs MPG
- Prototype carbon-budget calculators
- Test alerting agents for new model-year releases
- Validate UI mockups with real spec data

</td>
</tr>
</table>

***

### 🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20US%20EPA%20Fuel%20Economy%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20US%20EPA%20Fuel%20Economy%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20US%20EPA%20Fuel%20Economy%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20US%20EPA%20Fuel%20Economy%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

Pick a mode and set the relevant inputs. In vehicles mode the Actor walks the EPA menu tree (make -> model -> trim -> detail), pulling the full record per trim. Models, makes, and byId modes hit a single menu or detail endpoint each and return correspondingly lightweight rows.

#### 📏 How accurate is the data?

The data is the same EPA-certified record used on fueleconomy.gov. Every US-market vehicle since 1984 is in the source database.

#### 🔁 How often is the dataset refreshed?

The EPA adds new vehicles continuously through each model year. Every Actor run fetches live data.

#### 📅 Which years are supported?

1984 to present. The input schema allows 1984 through 2030 to accommodate future-year additions.

#### 🛠️ What's the difference between engineConfig and model aggregation?

`engineConfig` (default) returns one row per engine/transmission/drivetrain combination. One Camry can have ten rows for V6 vs 4-cyl, FWD vs AWD, hybrid vs gas, base vs trim packages. `model` collapses those down to one row per make+model and keeps the variant with the highest combined MPG, adding a `configCount` field showing how many configs were merged.

#### ⛽ Are hybrids, EVs, and flex-fuel vehicles included?

Yes. EVs surface electric range in the `rangeMiles` family of fields. Flex-fuel vehicles populate `fuelType2`, `cityMpgAlt`, `highwayMpgAlt`, and the corresponding cost and CO2 alt fields.

#### 🔍 What is byId mode for?

When you already know an EPA vehicle ID, byId fetches the full record directly without a menu walk. Useful for refreshing a known vehicle in a downstream database.

#### ⏰ Can I schedule regular runs?

Yes. Apify Schedules supports any cron interval. A common pattern is a weekly refresh on the current model year and an annual full pull when a new model year drops.

#### ⚖️ Is this data legal to use?

Yes. The EPA publishes the fuel economy database as US Government open data. It is freely usable for any purpose including commercial use.

#### 💼 Can I use this data commercially?

Yes. EPA fuel-economy data is public-domain federal data and is widely embedded in commercial auto products, comparison apps, and dealer portals.

#### 💳 Do I need a paid Apify plan to use this Actor?

No. The free Apify plan is enough for testing and small runs (10 records per run). A paid plan lifts the limit and unlocks scheduling.

#### 🆘 What if I need help?

Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.

***

### 🔌 Integrate with any app

EPA Fuel Economy Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get run notifications in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe vehicle specs into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push fresh vehicle data into your inventory backend, or alert your team in Slack when a new model year is fully loaded.

***

### 🔗 Recommended Actors

- [**🚗 AutoNation Scraper**](https://apify.com/parseforge/autonation-scraper) - Dealer inventory pulls
- [**🏁 Bring A Trailer Auctions Scraper**](https://apify.com/parseforge/bringatrailer-auctions-scraper) - Enthusiast auction listings
- [**🛻 Copart Public Search Scraper**](https://apify.com/parseforge/copart-public-search-scraper) - Salvage and used vehicle auctions
- [**🏎️ duPont Registry Scraper**](https://apify.com/parseforge/dupont-registry-scraper) - Luxury and exotic car listings
- [**🚙 JamesEdition Cars Listings**](https://apify.com/parseforge/james-edition-cars-scraper) - Global luxury car listings

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more automotive and reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the US Environmental Protection Agency, the US Department of Energy, or fueleconomy.gov. All trademarks mentioned are the property of their respective owners. Only publicly available federal open data is collected.

# Actor input Schema

## `mode` (type: `string`):

What level of data to return

## `year` (type: `integer`):

Model year (e.g. 2020). EPA covers 1984-present.

## `make` (type: `string`):

Specific manufacturer (e.g. Toyota, Tesla, Ford). Leave empty in vehicles mode to expand across all makes for the year.

## `model` (type: `string`):

Specific model name. Requires make to be set.

## `vehicleId` (type: `integer`):

EPA vehicle ID (e.g. 42011). Only used in byId mode.

## `aggregateBy` (type: `string`):

Each EPA vehicle ID is an engine/transmission/drivetrain configuration — one model can have many. 'engineConfig' returns every config (raw EPA data). 'model' returns one row per make+model, picking the most fuel-efficient configuration (highest combined MPG) and adding a configCount field.

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## Actor input object example

```json
{
  "mode": "vehicles",
  "year": 2024,
  "aggregateBy": "engineConfig",
  "maxItems": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

Overview of scraped data

## `fullData` (type: `string`):

Complete dataset

# 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 = {
    "mode": "vehicles",
    "year": 2024,
    "aggregateBy": "engineConfig",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/fueleconomy-gov-scraper").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 = {
    "mode": "vehicles",
    "year": 2024,
    "aggregateBy": "engineConfig",
    "maxItems": 10,
}

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

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

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

```

## CLI example

```bash
echo '{
  "mode": "vehicles",
  "year": 2024,
  "aggregateBy": "engineConfig",
  "maxItems": 10
}' |
apify call parseforge/fueleconomy-gov-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/fueleconomy-gov-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "US EPA Fuel Economy Scraper",
        "description": "Scrape US EPA fuel economy ratings for any vehicle make/model/year. MPG city/highway/combined, fuel type, CO2 emissions, annual cost. No API key required.",
        "version": "0.0",
        "x-build-id": "IDVVNiA6uhL1Fw4Ox"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~fueleconomy-gov-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-fueleconomy-gov-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~fueleconomy-gov-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-fueleconomy-gov-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~fueleconomy-gov-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-fueleconomy-gov-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "vehicles",
                            "models",
                            "makes",
                            "byId"
                        ],
                        "type": "string",
                        "description": "What level of data to return",
                        "default": "vehicles"
                    },
                    "year": {
                        "title": "Year",
                        "minimum": 1984,
                        "maximum": 2030,
                        "type": "integer",
                        "description": "Model year (e.g. 2020). EPA covers 1984-present.",
                        "default": 2024
                    },
                    "make": {
                        "title": "Make (optional)",
                        "type": "string",
                        "description": "Specific manufacturer (e.g. Toyota, Tesla, Ford). Leave empty in vehicles mode to expand across all makes for the year."
                    },
                    "model": {
                        "title": "Model (optional)",
                        "type": "string",
                        "description": "Specific model name. Requires make to be set."
                    },
                    "vehicleId": {
                        "title": "Vehicle ID (for byId mode)",
                        "type": "integer",
                        "description": "EPA vehicle ID (e.g. 42011). Only used in byId mode."
                    },
                    "aggregateBy": {
                        "title": "Aggregate level (vehicles mode only)",
                        "enum": [
                            "engineConfig",
                            "model"
                        ],
                        "type": "string",
                        "description": "Each EPA vehicle ID is an engine/transmission/drivetrain configuration — one model can have many. 'engineConfig' returns every config (raw EPA data). 'model' returns one row per make+model, picking the most fuel-efficient configuration (highest combined MPG) and adding a configCount field.",
                        "default": "engineConfig"
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
