AAA API: Get gas prices
Gets AAA average gasoline and diesel prices for the US, a state, or a metro area listed on its state page, with yesterday, week, month and year-ago comparisons and record highs, as of the date AAA shows.
Unofficial. Not affiliated with or endorsed by AAA.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Location optional
location US, a state name or two-letter code, or a metro name followed by its state, for example Houston, TX.
Houston, TX
Default
US.
Input as JSON
{ "location": "Houston, TX"}Output
{ "date": "2026-09-28", "link": "https://gasprices.aaa.com/?state=TX#state-metro" , "place": "Houston, TX", "current": { "diesel": 5.8545, "premium": 4.9246, "regular": 3.9152, "mid_grade": 4.503 }, "currency": "USD", "week_ago": { "diesel": 5.8904, "premium": 4.8859, "regular": 3.8783, "mid_grade": 4.4543 }, "year_ago": { "diesel": 3.1334, "premium": 3.678, "regular": 2.6726, "mid_grade": 3.2715 }, "month_ago": { "diesel": 5.1073, "premium": 4.5727, "regular": 3.5428, "mid_grade": 4.1367 }, "yesterday": { "diesel": 5.866, "premium": 4.9346, "regular": 3.9199, "mid_grade": 4.5048 }, "record_high_diesel": { "date": "2026-09-23", "price": 5.8996 }, "record_high_regular": { "date": "2022-06-11", "price": 4.6821 }}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"gasprices.aaa.com/get_gas_prices","input":{"location":"Houston, TX"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "gasprices.aaa.com/get_gas_prices" , "input": { "location": "Houston, TX" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "gasprices.aaa.com/get_gas_prices" , "input": { "location": "Houston, TX" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run gasprices.aaa.com/get_gas_prices# with {"location":"Houston, TX"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "properties": { "location": { "type": "string", "default": "US", "description": "US, a state name or two-letter code, or a metro name followed by its state, for example Houston, TX." } }}Output schema
{ "type": "object", "required": [ "place", "date", "currency", "current", "yesterday", "week_ago", "month_ago", "year_ago", "record_high_regular", "record_high_diesel", "link" ], "properties": { "date": { "type": "string", "format": "date", "description": "AAA price date (YYYY-MM-DD)." }, "link": { "type": "string", "description": "AAA price page for this location." }, "place": { "type": "string", "description": "The national, state, or metro location." }, "current": { "type": "object", "required": [ "regular", "mid_grade", "premium", "diesel" ], "properties": { "diesel": { "type": [ "number", "null" ], "description": "Diesel price per gallon in USD." }, "premium": { "type": [ "number", "null" ], "description": "Premium price per gallon in USD." }, "regular": { "type": [ "number", "null" ], "description": "Regular price per gallon in USD." }, "mid_grade": { "type": [ "number", "null" ], "description": "Mid-grade price per gallon in USD." } }, "description": "Current average prices per gallon in USD.", "additionalProperties": false }, "currency": { "type": "string", "description": "Currency of all prices, USD." }, "week_ago": { "type": "object", "required": [ "regular", "mid_grade", "premium", "diesel" ], "properties": { "diesel": { "type": [ "number", "null" ], "description": "Diesel price per gallon in USD." }, "premium": { "type": [ "number", "null" ], "description": "Premium price per gallon in USD." }, "regular": { "type": [ "number", "null" ], "description": "Regular price per gallon in USD." }, "mid_grade": { "type": [ "number", "null" ], "description": "Mid-grade price per gallon in USD." } }, "description": "One week ago average prices per gallon in USD.", "additionalProperties": false }, "year_ago": { "type": "object", "required": [ "regular", "mid_grade", "premium", "diesel" ], "properties": { "diesel": { "type": [ "number", "null" ], "description": "Diesel price per gallon in USD." }, "premium": { "type": [ "number", "null" ], "description": "Premium price per gallon in USD." }, "regular": { "type": [ "number", "null" ], "description": "Regular price per gallon in USD." }, "mid_grade": { "type": [ "number", "null" ], "description": "Mid-grade price per gallon in USD." } }, "description": "One year ago average prices per gallon in USD.", "additionalProperties": false }, "month_ago": { "type": "object", "required": [ "regular", "mid_grade", "premium", "diesel" ], "properties": { "diesel": { "type": [ "number", "null" ], "description": "Diesel price per gallon in USD." }, "premium": { "type": [ "number", "null" ], "description": "Premium price per gallon in USD." }, "regular": { "type": [ "number", "null" ], "description": "Regular price per gallon in USD." }, "mid_grade": { "type": [ "number", "null" ], "description": "Mid-grade price per gallon in USD." } }, "description": "One month ago average prices per gallon in USD.", "additionalProperties": false }, "yesterday": { "type": "object", "required": [ "regular", "mid_grade", "premium", "diesel" ], "properties": { "diesel": { "type": [ "number", "null" ], "description": "Diesel price per gallon in USD." }, "premium": { "type": [ "number", "null" ], "description": "Premium price per gallon in USD." }, "regular": { "type": [ "number", "null" ], "description": "Regular price per gallon in USD." }, "mid_grade": { "type": [ "number", "null" ], "description": "Mid-grade price per gallon in USD." } }, "description": "Yesterday average prices per gallon in USD.", "additionalProperties": false }, "record_high_diesel": { "type": [ "object", "null" ], "required": [ "price", "date" ], "properties": { "date": { "type": "string", "format": "date", "description": "Date the record was reached (YYYY-MM-DD)." }, "price": { "type": "number", "description": "Record-high average price per gallon in USD." } }, "description": "Highest recorded average price per gallon in USD and the date it occurred, if AAA shows it.", "additionalProperties": false }, "record_high_regular": { "type": [ "object", "null" ], "required": [ "price", "date" ], "properties": { "date": { "type": "string", "format": "date", "description": "Date the record was reached (YYYY-MM-DD)." }, "price": { "type": "number", "description": "Record-high average price per gallon in USD." } }, "description": "Highest recorded average price per gallon in USD and the date it occurred, if AAA shows it.", "additionalProperties": false } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
gasprices.aaa.com/get_gas_prices- Returns
- place, price date, current, yesterday, week-ago, month-ago and year-ago prices by grade, record highs for regular and diesel, AAA link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method gasprices.aaa.com/get_gas_prices with the inputs above.
Ask your agent
- What's the national average price for regular gas today, and how does it compare to a year ago?
- Check AAA for current diesel prices in Ohio, including the record high
- How much is premium gas in Denver, CO right now versus last week and last month?
- Pull the aaa.com average fuel prices for the Phoenix, AZ metro area by grade
- Has the average price of gas in California gone up since yesterday? Show me the mid-grade and regular numbers.
See more
Gets GasBuddy's latest reported average regular gas price, its changes and the diesel benchmark for a US state or a listed metro area. Midgrade, premium and area low/high prices are not published with these averages; updates may lag the current day.
gasbuddy.com/get_average_gas_pricesGets the latest weekly EIA retail gasoline and on-highway diesel prices for a U.S. area, with changes from the prior week and from 52 weeks earlier.
eia.gov/get_fuel_pricesFinds nearby GasBuddy stations for a US or Canadian city, address or postal code and lists their reported prices for a fuel grade, lowest listed price first.
gasbuddy.com/list_cheapest_gas_stationsGets a state's latest monthly electricity price for a customer type from EIA. It also returns the year-over-year change, the year-to-date average and the matching US average.
eia.gov/get_electricity_pricesFinds the US Costco warehouses nearest a city, address or ZIP code, with today's and weekly hours, gas station hours, services and posted gas prices.
costco.com/search_warehousesFinds the AutoZone stores nearest a US ZIP code, city or street address, with contact details, opening hours, whether each is open now, distance and store page links.
autozone.com/search_storesGets Zumper's current median monthly rents for studio through three-bedroom homes in a city, with monthly and yearly percentage changes. National rank is included only when the same-month U.S. national report ranks the city.
zumper.com/get_average_rentsReturns 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.
fueleconomy.gov/get_fuel_economy