Gas Prices API: US Fuel Prices by State & City (EIA) avatar

Gas Prices API: US Fuel Prices by State & City (EIA)

Pricing

from $0.94 / 1,000 price rows

Go to Apify Store
Gas Prices API: US Fuel Prices by State & City (EIA)

Gas Prices API: US Fuel Prices by State & City (EIA)

US retail gasoline and diesel prices by state, city and region from the public EIA weekly survey, with week and year changes and price history. No key, no login.

Pricing

from $0.94 / 1,000 price rows

Rating

0.0

(0)

Developer

Detroit Web Agent - Open Data

Detroit Web Agent - Open Data

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Categories

Features

Limited permissions

Share

Get US retail gas and diesel prices by state, city and region from the public EIA weekly survey, with week-over-week and year-over-year change and optional price history. It needs no API key, no login and no proxy, and returns one clean row per area, fuel and week.

What is Gas Prices API: US Fuel Prices by State & City (EIA)?

This Actor reads the US Energy Information Administration weekly retail gasoline and diesel price survey, published every Monday, and returns it as structured rows: the US average, five PADD regions and sub-regions, nine states (CA, CO, FL, MA, MN, NY, OH, TX, WA) and ten cities, 29 areas in all (Boston, Chicago, Cleveland, Denver, Houston, Los Angeles, Miami, New York City, San Francisco, Seattle). Fuel is regular, midgrade, premium, all grades and on-highway diesel, in US dollars per gallon with taxes. EIA publishes diesel for the US, the regions and California only.

Use it for gas price API calls in apps and dashboards, fleet and logistics fuel surcharge models, price alerts, journalism and economic research. Ask for 1 week for the latest snapshot or up to 520 weeks for ten years of history.

Why use it

  • Official source. EIA is the US government statistical agency for energy, and its weekly series is the benchmark most fuel surcharge tables use.
  • No key to manage. The Actor handles the source for you, so you call one endpoint and get JSON, CSV or Excel.
  • Changes pre-computed. Every row has the change versus last week and last year, in dollars and percent, and the gap to the US average.
  • History on demand. Set weeks to get a time series instead of a snapshot.

Output

Every field in the dataset, one row per area, fuel and week.

FieldMeaning
area, areaType, areaCodeThe EIA area, its type (national, region, state or city) and the EIA code.
product, productNameregular, midgrade, premium, allGrades or diesel, and the full EIA name.
price, unitRetail price in US dollars per gallon with taxes.
periodThe week the price applies to (a Monday).
priorWeekPrice, changeWeek, changeWeekPctPrice one week earlier and the change in dollars and percent.
priorYearPrice, changeYear, changeYearPctPrice 52 weeks earlier and the change in dollars and percent.
vsNationalAveragePrice minus the US average for the same fuel and week.
sourceUrl, seriesId, scrapedAtEIA source page, EIA series identifier and the collection time.

Sample output

{
"area": "Texas",
"areaType": "state",
"product": "regular",
"price": 3.512,
"unit": "USD per gallon",
"period": "2026-11-09",
"changeWeek": -0.041,
"changeYear": -0.153,
"vsNationalAverage": -0.483
}

The values above illustrate the format and are not a live price.

Input

FieldWhat it does
productsAny of regular, midgrade, premium, allGrades, diesel. Default regular and diesel.
areasOptional names to keep, for example Texas or Chicago. Partial names match.
areaTypesnational, region, state, city. Default all.
weeksWeeks of history per area and fuel, 1 to 520. Default 1.
maxItemsStop after this many rows. Default 100, cap 20,000.

Sample input:

{"products": ["regular", "diesel"], "weeks": 1, "maxItems": 100}

How it works

  1. Open the Actor and press Try for free.
  2. Keep the prefilled input and press Start.
  3. Open the Output tab and download JSON, CSV or Excel.

Run in 30 seconds: the default run finishes in under a minute and costs a few cents.

Use cases and workflows

  • Power a gas price widget or app with a simple JSON endpoint.
  • Build fuel surcharge tables for trucking, delivery and field-service fleets.
  • Track price changes by state or city and alert when they move more than a set amount.
  • Chart ten years of weekly gasoline and diesel prices for research or reporting.
  • Send each Monday's prices to a spreadsheet, Slack or n8n workflow on a schedule.

Limits

  • EIA publishes weekly, on Monday (Tuesday after a holiday). It is not a live station price feed.
  • EIA covers 29 areas: the US, nine regions, nine states and ten cities. Other states and cities are not in the survey.
  • Prices are survey averages, not the price at a specific station.
  • EIA publishes diesel only for the US, the regions and California, so other areas return gasoline rows only.

Found a bug or need a field? Open an issue on the Issues tab with the run URL.

Use with the API, n8n, Make, Zapier or AI agents

API (one call, returns the rows as JSON):

curl -X POST "https://api.apify.com/v2/acts/transparent_meteorite~gas-prices/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"products": ["regular", "diesel"], "areaTypes": ["state"], "weeks": 1, "maxItems": 20}'

The call waits up to 5 minutes. For bigger inputs, start the run with /runs instead and read the dataset when it finishes.

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("transparent_meteorite/gas-prices").call(run_input={"products": ["regular", "diesel"], "areaTypes": ["state"], "weeks": 1, "maxItems": 20})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row)
  • n8n, Make, Zapier: use the Apify app's "Run Actor" step with actor transparent_meteorite/gas-prices, paste the input JSON, then map the dataset items to your sheet or CRM. In n8n, add a Schedule Trigger, the Apify node, then a Google Sheets or Slack node.
  • Clay: add an HTTP API column that calls the run-sync endpoint above.
  • Schedules: in Apify Console, Schedules, run it daily or weekly with the same input for a steady feed.
  • AI agents (MCP): connect the Apify MCP server at https://mcp.apify.com?tools=transparent_meteorite/gas-prices to Claude, Cursor or any MCP client, and your agent can run Gas Prices API: US Fuel Prices by State & City (EIA) on request and read the rows.

Personal data and fair use

This Actor reads only public US Energy Information Administration weekly retail gasoline and diesel price tables on eia.gov. The data is aggregate fuel prices and contains no personal data. Public data is still personal data under GDPR, UK GDPR and CCPA, so you are responsible for how you use it: have a lawful basis, honor opt-out and deletion requests, do not use it for decisions about credit, employment, insurance or housing, and follow the source's terms of use. The Actor does not log in, bypass access controls or collect private data. This is not legal advice.

What a run costs

EventWhen it is chargedFree planPaid plans from
Actor StartCharged when the Actor starts running$0.00005same
Price rowCharged once per row delivered to the dataset$0.00094same
  • 1,000 x "Price row" = $0.94 on the Free plan.
  • 100 x "Price row" = $0.09. Each run also has a start fee of $0.00005.
  • You pay only for the events in this table. Platform compute is included and there is no monthly fee.

FAQ

Where does the data come from? The US Energy Information Administration weekly retail gasoline and diesel price survey, published at eia.gov, a US government public data source.

How often does it update? Weekly, every Monday (Tuesday after a federal holiday). Running the Actor more often returns the same latest week.

Can I get every state? Only the states EIA surveys: CA, CO, FL, MA, MN, NY, OH, TX and WA, plus regions that cover the rest of the country.

Is there a price per station or ZIP? No. This is the EIA survey average by area. It is not a station-level feed.

Long-tail searches this Actor answers: gas prices by state, gas prices API, EIA gasoline prices by city, diesel prices by state, weekly US gas price history, fuel price tracker, gas price change year over year, average gas price Texas California Florida.