AAA APIgasprices.aaa.com ↗
Retrieve national, state, and metro gas prices from AAA. Covers all fuel grades, historical trends, EV charging rates, and news. 12 endpoints.
What is the AAA API?
The AAA Gas Prices API exposes 12 endpoints covering national, state, and metro-level average fuel prices across Regular, Mid-Grade, Premium, and Diesel grades. get_national_average returns today's price alongside comparisons to yesterday, last week, last month, and last year. Other endpoints surface per-state breakdowns, metro-level rankings, price-change deltas, EV charging costs by state, and full-text AAA news articles.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/8c9bd3db-a958-41a6-8e97-b4e58c80a4d6/get_national_average' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace gasprices-aaa-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
from parse_apis.aaa_gas_prices_api import AAAGasPrices, StateSummary, State, Article, EVChargingData
client = AAAGasPrices()
# Get the national average prices
national = client.nationalaverages.get()
print(national.date, national.location)
for fuel_type, history in national.prices.items():
print(fuel_type, history.current, history.year_ago)
# Find the 5 cheapest states by regular gas price
for state_summary in client.statesummaries.list_by_lowest(limit=5):
print(state_summary.state, state_summary.regular, state_summary.diesel)
# Get detailed state data and explore metro-level prices
texas = client.states.get(state_code="TX")
print(texas.state_name, texas.state_code)
# Check price changes for this state
changes = texas.price_changes()
print(changes.state_name, changes.price_changes["Regular"].week_change)
# Get highest recorded prices for this state
records = texas.highest_recorded_prices()
print(records.location)
for fuel, record in records.highest_recorded.items():
print(fuel, record.price, record.date)
# Explore metro areas within Texas sorted by cheapest
for metro in texas.metros.list_by_lowest(limit=3):
print(metro.metro, metro.regular, metro.premium)
# Get metro price change trends
for metro_change in texas.metros.price_changes(limit=3):
print(metro_change.metro, metro_change.changes["Regular"].year_ago_change)
# Check EV charging data across states
for ev in client.evchargingdatas.list(limit=5):
print(ev.location_name, ev.location_state, ev.ev_costperkwh, ev.ev_totalchargers)
# Browse recent news articles and get full details
for article in client.articles.list(limit=2):
print(article.title, article.date)
detail = article.details()
print(detail.link, detail.id)
Returns today's AAA national average gas price for all fuel grades (Regular, Mid-Grade, Premium, Diesel) with historical comparisons to yesterday, one week ago, one month ago, and one year ago. Includes the date the prices were recorded.
No input parameters required.
{
"type": "object",
"fields": {
"date": "string, date the prices were recorded (e.g. '6/10/26')",
"prices": "object with keys Regular, Mid-Grade, Premium, Diesel each containing current, yesterday, week_ago, month_ago, year_ago prices as numbers",
"location": "string, always 'National'"
},
"sample": {
"data": {
"date": "6/10/26",
"prices": {
"Diesel": {
"current": 5.303,
"week_ago": 5.411,
"year_ago": 3.506,
"month_ago": 5.647,
"yesterday": 5.317
},
"Premium": {
"current": 5.036,
"week_ago": 5.145,
"year_ago": 3.962,
"month_ago": 5.384,
"yesterday": 5.041
},
"Regular": {
"current": 4.151,
"week_ago": 4.261,
"year_ago": 3.122,
"month_ago": 4.522,
"yesterday": 4.161
},
"Mid-Grade": {
"current": 4.662,
"week_ago": 4.77,
"year_ago": 3.605,
"month_ago": 5.011,
"yesterday": 4.663
}
},
"location": "National"
},
"status": "success"
}
}About the AAA API
Fuel Price Coverage
get_national_average returns a single-object response with a prices field containing all four fuel grades, each carrying five time-period values: current, yesterday, week_ago, month_ago, and year_ago. get_state_gas_prices returns an array of all 50 states plus DC with current prices for every grade. For a deeper look at one state, get_state_price_details takes a state_code parameter (e.g. TX) and adds highest_recorded prices with their recorded dates — useful for contextualizing current spikes against historical peaks.
Metro and Delta Endpoints
get_metro_prices_by_state and get_price_change_by_metro both accept a state_code and return arrays of named metro areas. The delta endpoints (get_price_change_by_state, get_price_change_by_metro) return computed change values — day_change, week_change, month_change, year_change — keyed by fuel type, so you can build trend indicators without doing the arithmetic yourself. get_lowest_state_prices and get_lowest_metro_prices return pre-sorted arrays by ascending regular price, ready for cheapest-fuel lookups.
EV Charging Data
get_ev_charging_prices returns a flat array of location objects with LOCATION_NAME, LOCATION_STATE, LOCATION_TYPE, ev_totalchargers, and ev_costperkwh. All fields are strings, including the numeric ones, so cast before arithmetic. Coverage is national but the granularity is state-level, not individual station.
News Articles
get_news_articles supports page and limit parameters and returns article metadata including title, date, excerpt, slug, and link, plus total_pages and total_posts for pagination control. To get full article text, pass the slug to get_news_article_detail, which returns the complete content field as HTML.
The AAA API is a managed, monitored endpoint for gasprices.aaa.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when gasprices.aaa.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official gasprices.aaa.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Display a live national gas price dashboard comparing current Regular prices to last week and last year using
get_national_average. - Rank all 50 states by cheapest regular gas for a fuel-cost comparison tool using
get_lowest_state_prices. - Show week-over-week and month-over-month price deltas for each fuel grade in a specific state using
get_price_change_by_state. - Build a metro-level fuel cost finder for a given state, sorted by lowest price, using
get_lowest_metro_prices. - Surface EV versus gasoline cost comparisons by combining
ev_costperkwhfromget_ev_charging_priceswith state-level gas prices. - Alert users when a state's current price approaches its all-time high using
highest_recordeddata fromget_state_price_details. - Aggregate and display recent AAA fuel market commentary using
get_news_articleswith pagination and full content viaget_news_article_detail.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does AAA publish an official developer API for gas price data?+
What does `get_state_price_details` return beyond current prices?+
get_state_price_details returns, for each fuel grade, the current price plus historical averages for yesterday, one week ago, one month ago, and one year ago. It also includes a highest_recorded object with the all-time peak price and the date it was recorded for each grade. The get_highest_recorded_prices endpoint covers the same historical peak data and additionally supports omitting state_code to return national records.Does the EV charging endpoint return individual station locations or prices?+
get_ev_charging_prices returns aggregated state-level data: location name, state, location type, total charger count (ev_totalchargers), and average cost per kWh (ev_costperkwh). Station-level data is not currently exposed. You can fork this API on Parse and revise it to add a station-level endpoint if your use case requires it.Are metro-level price change deltas available for all states?+
get_price_change_by_metro accepts any two-letter state_code and returns delta values for all metro areas AAA tracks within that state. However, not every state has the same number of tracked metros, and some smaller states may return fewer entries. Metro coverage mirrors what AAA publishes for that state — there is no configurable metro filter within the endpoint.