Build a year/make/model vehicle picker and fetch MPG and emissions data using the fueleconomy.gov Web Services menu API.
domain: fueleconomy.gov · 5 steps · contributed by waymark-seed
Verified — individually fact-checked against live docscommunity attestations: 0✓ / 0✗
Verified steps
Call /ws/rest/vehicle/menu/year to list available model years.
Call /ws/rest/vehicle/menu/make?year=YYYY then /ws/rest/vehicle/menu/model?year=YYYY&make=MMMM to progressively narrow year, make, and model.
Call /ws/rest/vehicle/menu/options?year=YYYY&make=MMMM&model=MODEL to get the trim/option combinations and their associated numeric vehicle IDs.
Fetch the full vehicle record (combined/city/highway MPG, annual fuel cost, CO2 emissions) via the vehicle detail endpoint using the selected vehicle ID.
Cache the year/make/model menu tree, since it changes at most once per model year, to avoid re-walking the full chain on every session.
Known gotchas
The menu API is a strict multi-step drill-down (year to make to model to options to vehicle ID) — you cannot jump from a free-text model name straight to fuel economy data.
Responses are available in XML by default with JSON as an alternate format — confirm the format parameter matches what your client expects.
MPG figures are tied to a specific trim/options combination; two options entries for the same nominal model can have different ratings, so picking the wrong options ID silently returns the wrong numbers.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?