US Gas Price Tracker by State & Metro avatar

US Gas Price Tracker by State & Metro

Pricing

from $0.49 / 1,000 results

Go to Apify Store
US Gas Price Tracker by State & Metro

US Gas Price Tracker by State & Metro

Daily US fuel prices for regular, mid-grade, premium, and diesel at the national, state, and metro level, with yesterday/week/month/year-ago history and derived price changes.

Pricing

from $0.49 / 1,000 results

Rating

0.0

(0)

Developer

Dataspryva

Dataspryva

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

an hour ago

Last modified

Features

Limited permissions

Share

Get daily US gas and diesel prices without visiting a fuel-price site yourself. This actor reads the public AAA Fuel Gauge data and returns it as structured records at whichever level you need: one national figure, all 50 states plus DC, or metro/county breakdowns within specific states.

What this actor does

  • Three scopes: a single national average, state-level averages (50 states + DC), or metro/county averages within chosen states
  • Four fuel grades: regular, mid-grade, premium, and diesel, each only included when the source actually publishes it
  • Historical comparison: yesterday, week-ago, month-ago, and year-ago prices alongside today's, plus derived cent-value changes for a chosen primary fuel
  • Narrowing filters: by state, by fuel grade, by a price band on the primary fuel, and by metro-name substring
  • Empty fields are omitted — a record only includes the fuel grades and history buckets the source actually published for it

Output per record

  • scope — national, state, or metro
  • country — always US, present only on national records
  • state, stateCode — state name and two-letter code, present on state and metro records
  • metro — metro/county area name, present only on metro records
  • regular, midGrade, premium, diesel — current price in USD/gallon for each grade the source publishes
  • history — an object with yesterday, weekAgo, monthAgo, and yearAgo prices per fuel grade, when includeHistory is enabled (state/metro modes) or whenever the source publishes it on the home page (national mode, where includeHistory isn't consulted)
  • changeFromYesterday, changeFromWeekAgo, changeFromMonthAgo, changeFromYearAgo — price change in cents for the chosen primaryFuelType, when includeChangeMetrics is enabled and the matching history value exists
  • recordType — always fuelPrices
  • scrapedAt — when the record was fetched

Input

FieldTypeDefaultDescription
modestringstatenational (1 record), state (50 + DC), or metro (per-state metro/county averages)
statesarray[]Two-letter state codes to include (e.g. NY, CA). Empty includes all 50 states + DC. For mode=metro, this also controls which states' metro pages are read
fuelTypesarray["regular","midGrade","premium","diesel"]Which fuel grades to include in each record
includeHistorybooleantrueInclude yesterday/week-ago/month-ago/year-ago prices (state/metro modes)
minPricenumber–Drop records whose primary fuel is priced below this value
maxPricenumber–Drop records whose primary fuel is priced above this value
primaryFuelTypestringregularWhich fuel grade minPrice, maxPrice, sortBy, and the change metrics use
sortBystringstate_ascprice_asc, price_desc, or state_asc
includeChangeMetricsbooleantrueCompute changeFromYesterday/changeFromWeekAgo/changeFromMonthAgo/changeFromYearAgo in cents, when history is available
metroNameFilterarray[]Only emit metro records whose name contains one of these substrings (mode=metro only)
maxItemsinteger500Hard cap on emitted records (1–5000)

Example: all states, cheapest first

{
"mode": "state",
"sortBy": "price_asc",
"includeHistory": true
}

Example: metro breakdown for two states

{
"mode": "metro",
"states": ["NY", "CA"],
"metroNameFilter": ["new york", "los angeles", "san francisco"]
}

Example: cheapest diesel states only

{
"mode": "state",
"primaryFuelType": "diesel",
"fuelTypes": ["diesel"],
"sortBy": "price_asc",
"maxItems": 10
}

Use cases

  • Fleet and logistics planning — compare diesel prices across states before routing
  • News and editorial research — pull a "cheapest gas by state" snapshot on demand
  • Consumer price widgets — feed a national or regional average into a dashboard
  • Trend monitoring — watch changeFromYearAgo to catch large year-over-year price swings
  • Economic analysis — fuel prices as an input to broader cost-of-living or inflation tracking

FAQ

Where does this data come from? The public AAA Fuel Gauge pages, the same averages AAA publishes for national, state, and metro-level gas prices.

Do I need a login, cookies, or proxy? No. The source pages are fully public and the actor reads them without authentication.

Does this cover countries outside the US? No, this is US-only; the underlying source does not publish averages for other countries.

Why isn't per-station pricing included? This actor reports state and metro averages rather than individual gas-station prices, since AAA's own data is published at that level.

How current is the data? AAA refreshes its averages daily, and each run reads the page live, so results reflect whatever AAA has published at run time.

Why might a record be missing a fuel grade? Not every state or metro area has a published price for every grade (mid-grade and premium especially). The actor omits a grade from a record rather than sending a null or zero value.

Why is a change metric like changeFromMonthAgo sometimes absent? It's only computed when both the current price and the matching history value are available for that record's primary fuel.

What does metroNameFilter match against? A case-insensitive substring match against the metro/county area name as published by AAA (e.g. Albany-Schenectady-Troy, Nassau-Suffolk).