# EIA API: Get weekly fuel prices

> Gets 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.

Unofficial. Not affiliated with or endorsed by EIA.

- Page: https://fous.com/methods/eia.gov/get-fuel-prices
- Method: `eia.gov/get_fuel_prices`, version 1
- Website: eia.gov
- Returns: area, week date, regular/midgrade/premium/all-grades gasoline and diesel prices with changes, EIA link, history
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `area` | string | no | `"Chicago"` | Reported U.S. area, such as US, Midwest, California, Texas, Chicago, or Denver. Example: Midwest Default "US". |
| `weeks` | integer | no | `3` | Number of recent weeks, from 1 to 52. Example: 4 Default 1. |

## Output

From a run on Oct 23, 2026. Its input:

```json
{
  "area": "Chicago",
  "weeks": 3
}
```

Its output:

```json
{
  "area": "Chicago",
  "history": [
    {
      "area": "Chicago",
      "currency": "USD",
      "eia_link": "https://www.eia.gov/dnav/pet/pet_pri_gnd_dcus_yord_w.htm",
      "week_date": "2026-10-19",
      "diesel_price_per_gallon": null,
      "diesel_change_from_year_ago": null,
      "diesel_change_from_last_week": null,
      "premium_gasoline_price_per_gallon": 5.991,
      "regular_gasoline_price_per_gallon": 4.705,
      "midgrade_gasoline_price_per_gallon": 5.313,
      "all_grades_gasoline_price_per_gallon": 4.895,
      "premium_gasoline_change_from_year_ago": 1.698,
      "regular_gasoline_change_from_year_ago": 1.524,
      "midgrade_gasoline_change_from_year_ago": 1.5,
      "premium_gasoline_change_from_last_week": 0.011,
      "regular_gasoline_change_from_last_week": 0.01,
      "midgrade_gasoline_change_from_last_week": 0.019,
      "all_grades_gasoline_change_from_year_ago": 1.535,
      "all_grades_gasoline_change_from_last_week": 0.011
    },
    {
      "area": "Chicago",
      "currency": "USD",
      "eia_link": "https://www.eia.gov/dnav/pet/pet_pri_gnd_dcus_yord_w.htm",
      "week_date": "2026-10-12",
      "diesel_price_per_gallon": null,
      "diesel_change_from_year_ago": null,
      "diesel_change_from_last_week": null,
      "premium_gasoline_price_per_gallon": 5.98,
      "regular_gasoline_price_per_gallon": 4.695,
      "midgrade_gasoline_price_per_gallon": 5.294,
      "all_grades_gasoline_price_per_gallon": 4.884,
      "premium_gasoline_change_from_year_ago": 1.624,
      "regular_gasoline_change_from_year_ago": 1.452,
      "midgrade_gasoline_change_from_year_ago": 1.413,
      "premium_gasoline_change_from_last_week": 0.06,
      "regular_gasoline_change_from_last_week": 0.062,
      "midgrade_gasoline_change_from_last_week": 0.041,
      "all_grades_gasoline_change_from_year_ago": 1.461,
      "all_grades_gasoline_change_from_last_week": 0.06
    },
    {
      "area": "Chicago",
      "currency": "USD",
      "eia_link": "https://www.eia.gov/dnav/pet/pet_pri_gnd_dcus_yord_w.htm",
      "week_date": "2026-10-05",
      "diesel_price_per_gallon": null,
      "diesel_change_from_year_ago": null,
      "diesel_change_from_last_week": null,
      "premium_gasoline_price_per_gallon": 5.92,
      "regular_gasoline_price_per_gallon": 4.633,
      "midgrade_gasoline_price_per_gallon": 5.253,
      "all_grades_gasoline_price_per_gallon": 4.824,
      "premium_gasoline_change_from_year_ago": 1.415,
      "regular_gasoline_change_from_year_ago": 1.224,
      "midgrade_gasoline_change_from_year_ago": 1.206,
      "premium_gasoline_change_from_last_week": -0.106,
      "regular_gasoline_change_from_last_week": -0.126,
      "midgrade_gasoline_change_from_last_week": -0.098,
      "all_grades_gasoline_change_from_year_ago": 1.237,
      "all_grades_gasoline_change_from_last_week": -0.122
    }
  ],
  "currency": "USD",
  "eia_link": "https://www.eia.gov/dnav/pet/pet_pri_gnd_dcus_yord_w.htm",
  "week_date": "2026-10-19",
  "diesel_price_per_gallon": null,
  "diesel_change_from_year_ago": null,
  "diesel_change_from_last_week": null,
  "premium_gasoline_price_per_gallon": 5.991,
  "regular_gasoline_price_per_gallon": 4.705,
  "midgrade_gasoline_price_per_gallon": 5.313,
  "all_grades_gasoline_price_per_gallon": 4.895,
  "premium_gasoline_change_from_year_ago": 1.698,
  "regular_gasoline_change_from_year_ago": 1.524,
  "midgrade_gasoline_change_from_year_ago": 1.5,
  "premium_gasoline_change_from_last_week": 0.011,
  "regular_gasoline_change_from_last_week": 0.01,
  "midgrade_gasoline_change_from_last_week": 0.019,
  "all_grades_gasoline_change_from_year_ago": 1.535,
  "all_grades_gasoline_change_from_last_week": 0.011
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"eia.gov/get_fuel_prices","input":{"area":"Chicago","weeks":3}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- What is the latest weekly retail gasoline price for the US, including regular, midgrade, and premium, and how much did it change from last week?
- Show me the on-highway diesel price for the Midwest this week compared with the same week last year.
- Give me the past 4 weeks of regular gasoline prices for California from eia.gov.
- I need the current all-grades gasoline average for Chicago along with the weekly change and a link to the EIA source.
- How have diesel prices in Denver moved over the last 12 weeks, with week-over-week and year-over-year changes?

## Input schema

```json
{
  "type": "object",
  "properties": {
    "area": {
      "type": "string",
      "default": "US",
      "description": "Reported U.S. area, such as US, Midwest, California, Texas, Chicago, or Denver. Example: Midwest"
    },
    "weeks": {
      "type": "integer",
      "default": 1,
      "maximum": 52,
      "minimum": 1,
      "description": "Number of recent weeks, from 1 to 52. Example: 4"
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "area",
    "week_date",
    "currency",
    "eia_link",
    "history"
  ],
  "properties": {
    "area": {
      "type": "string"
    },
    "history": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "currency": {
      "enum": [
        "USD"
      ],
      "type": "string"
    },
    "eia_link": {
      "type": "string"
    },
    "week_date": {
      "type": "string"
    },
    "diesel_price_per_gallon": {
      "type": [
        "number",
        "null"
      ]
    },
    "diesel_change_from_year_ago": {
      "type": [
        "number",
        "null"
      ]
    },
    "diesel_change_from_last_week": {
      "type": [
        "number",
        "null"
      ]
    },
    "premium_gasoline_price_per_gallon": {
      "type": [
        "number",
        "null"
      ]
    },
    "regular_gasoline_price_per_gallon": {
      "type": [
        "number",
        "null"
      ]
    },
    "midgrade_gasoline_price_per_gallon": {
      "type": [
        "number",
        "null"
      ]
    },
    "all_grades_gasoline_price_per_gallon": {
      "type": [
        "number",
        "null"
      ]
    },
    "premium_gasoline_change_from_year_ago": {
      "type": [
        "number",
        "null"
      ]
    },
    "regular_gasoline_change_from_year_ago": {
      "type": [
        "number",
        "null"
      ]
    },
    "midgrade_gasoline_change_from_year_ago": {
      "type": [
        "number",
        "null"
      ]
    },
    "premium_gasoline_change_from_last_week": {
      "type": [
        "number",
        "null"
      ]
    },
    "regular_gasoline_change_from_last_week": {
      "type": [
        "number",
        "null"
      ]
    },
    "midgrade_gasoline_change_from_last_week": {
      "type": [
        "number",
        "null"
      ]
    },
    "all_grades_gasoline_change_from_year_ago": {
      "type": [
        "number",
        "null"
      ]
    },
    "all_grades_gasoline_change_from_last_week": {
      "type": [
        "number",
        "null"
      ]
    }
  }
}
```

## See more

- [EIA API: Get electricity prices](https://fous.com/methods/eia.gov/get-electricity-prices.md): Gets 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.
- [AAA API: Get gas prices](https://fous.com/methods/gasprices.aaa.com/get-gas-prices.md): 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.
- [GasBuddy API: Get average gas prices](https://fous.com/methods/gasbuddy.com/get-average-gas-prices.md): 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.
- [FuelEconomy.gov API: Get fuel economy](https://fous.com/methods/fueleconomy.gov/get-fuel-economy.md): Returns 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.
- [GasBuddy API: List cheapest gas stations](https://fous.com/methods/gasbuddy.com/list-cheapest-gas-stations.md): Finds 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.
- [Trading Economics API: Get commodity prices](https://fous.com/methods/tradingeconomics.com/get-commodity-prices.md): Gets current commodity prices and price movements from the Trading Economics commodities page, in the page's group order; filter by a commodity name, slug, symbol or group (e.g. copper, energy), or leave blank for all groups including Electricity.
- [BLS API: Get inflation rate](https://fous.com/methods/bls.gov/get-inflation-rate.md): Gets the latest U.S. Consumer Price Index inflation for a spending category, with up to 24 recent months of history. Monthly changes are seasonally adjusted; 12-month changes are not.
- [Macrotrends API: Get long-term price history](https://fous.com/methods/macrotrends.net/get-long-term-price-history.md): Gets decades of yearly commodity or stock-index price history from Macrotrends: yearly average, open, high, low, close, annual change and inflation-adjusted value for gold, silver, crude oil, natural gas, copper, Dow Jones, S&P 500 and Nasdaq. The current year may be incomplete.
- [All EIA methods](https://fous.com/methods/eia.gov.md)
