FuelEconomy.gov User MPG API
Community-contributed real-world MPG data
Community-contributed real-world MPG data
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/fueleconomy-user-mpg-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Fuel Economy Web Services Emissions User MPG API
description: RESTful web services providing official EPA fuel economy ratings, vehicle specifications, CO2 emissions records, current fuel prices, and community-contributed real-world MPG data for passenger cars and light trucks from 1984 through the current model year. Administered by Oak Ridge National Laboratory for the US Department of Energy and the EPA. All endpoints are free and require no authentication. Responses are returned in XML format.
version: '1.0'
contact:
name: FuelEconomy.gov Feedback
email: fueleconomy@ornl.gov
x-api-id: fueleconomy:fuel-economy-web-services
license:
name: Public Domain (US Government Work)
url: https://www.usa.gov/government-works
servers:
- url: https://www.fueleconomy.gov/ws/rest
description: FuelEconomy.gov REST API
tags:
- name: User MPG
description: Community-contributed real-world MPG data
paths:
/ympg/shared/ympgVehicle/{id}:
get:
operationId: getUserMpgSummary
summary: Get user MPG summary for a vehicle
description: Returns an aggregate summary of community-contributed real-world MPG records for the specified vehicle. Includes average, minimum, and maximum MPG values, the total number of records, and the percentage breakdown between city and highway driving across all submissions.
tags:
- User MPG
parameters:
- $ref: '#/components/parameters/vehicleId'
responses:
'200':
description: Aggregated user MPG summary for vehicle
content:
application/xml:
schema:
$ref: '#/components/schemas/YmpgVehicleSummary'
example: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<ympgVehicle>\n <vehicleId>26425</vehicleId>\n <avgMpg>48.627030971</avgMpg>\n <maxMpg>74</maxMpg>\n <minMpg>30</minMpg>\n <recordCount>202</recordCount>\n <cityPercent>45</cityPercent>\n <highwayPercent>55</highwayPercent>\n</ympgVehicle>\n"
/ympg/shared/ympgDriverVehicle/{id}:
get:
operationId: getUserMpgRecords
summary: Get individual user MPG records for a vehicle
description: Returns the list of individual community-contributed real-world MPG records for the specified vehicle. Each record includes the reported MPG, the city/highway driving mix, the US state, and the date of the last update.
tags:
- User MPG
parameters:
- $ref: '#/components/parameters/vehicleId'
responses:
'200':
description: List of individual user MPG records
content:
application/xml:
schema:
$ref: '#/components/schemas/YmpgDriverVehicleList'
example: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<ympgDriverVehicleList>\n <ympgDriverVehicle>\n <vehicleId>26425</vehicleId>\n <mpg>48.6</mpg>\n <cityPercent>45</cityPercent>\n <highwayPercent>55</highwayPercent>\n <state>CA</state>\n <lastDate>2024-03-15T00:00:00-04:00</lastDate>\n </ympgDriverVehicle>\n</ympgDriverVehicleList>\n"
components:
schemas:
YmpgDriverVehicle:
type: object
description: Individual community-contributed real-world MPG record
properties:
vehicleId:
type: integer
description: Vehicle identifier
mpg:
type: number
format: double
description: Reported real-world MPG for this record
cityPercent:
type: number
format: double
description: Percentage of city driving for this record
highwayPercent:
type: number
format: double
description: Percentage of highway driving for this record
state:
type: string
description: Two-letter US state abbreviation where driving occurred
lastDate:
type: string
format: date-time
description: Timestamp of the last update to this record
YmpgVehicleSummary:
type: object
description: Aggregated summary of community-contributed real-world MPG data for a vehicle
properties:
vehicleId:
type: integer
description: Vehicle identifier
avgMpg:
type: number
format: double
description: Average MPG across all community submissions
maxMpg:
type: number
format: double
description: Highest MPG recorded in community submissions
minMpg:
type: number
format: double
description: Lowest MPG recorded in community submissions
recordCount:
type: integer
description: Total number of community MPG submissions
cityPercent:
type: number
format: double
description: Aggregate percentage of city driving across submissions
highwayPercent:
type: number
format: double
description: Aggregate percentage of highway driving across submissions
YmpgDriverVehicleList:
type: object
description: List of individual community MPG records for a vehicle
properties:
ympgDriverVehicle:
oneOf:
- $ref: '#/components/schemas/YmpgDriverVehicle'
- type: array
items:
$ref: '#/components/schemas/YmpgDriverVehicle'
parameters:
vehicleId:
name: id
in: path
required: true
description: Unique numeric vehicle identifier assigned by the EPA/FuelEconomy.gov. Obtain IDs via the /vehicle/menu/options endpoint.
schema:
type: integer
example: 31873
externalDocs:
description: Official API Documentation
url: https://www.fueleconomy.gov/feg/ws/index.shtml