---
title: "Historical gas prices API | Gasoline and diesel | Narwhal API"
description: "Historical gas prices since 1990 and diesel prices since 1994, weekly in USD per US gallon. Source: U.S. Energy Information Administration"
url: "https://narwhalapi.com/api/commodities/fuel"
---

All APIs

# US fuel prices API

Historical gas prices since 1990 and diesel prices since 1994, weekly in USD per US gallon. Source: U.S. Energy Information Administration

[Get a free API key](https://narwhalapi.com/signup)
[Read the docs →](https://narwhalapi.com/docs/api/commodities.md)

## First request

### Find US gasoline series

```
curl --request GET \
  --url "https://api.narwhalapi.com/v1/commodities/physical/series?commodity=gasoline" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
```

Example response

```
{
  "series": [
    {
      "series_id": "fuel-eia-usa-regular-gasoline",
      "commodity": "gasoline",
      "category": "energy",
      "product": "regular-gasoline",
      "country": "USA",
      "price_type": "retail_average",
      "basis": "cash self-serve pump price incl. all taxes, 8:00 a.m. Monday",
      "currency": "USD",
      "unit": "us_gallon",
      "unit_key": "gallon",
      "unit_quantity": "1",
      "frequency": "weekly",
      "description": "United States: regular gasoline (all formulations), weekly average retail price in dollars per gallon from EIA's Monday survey (series EMM_EPMR_PTE_NUS_DPG.W).",
      "attribution": "Source: U.S. Energy Information Administration",
      "coverage_start": "1990-08-20",
      "coverage_end": "2026-10-19"
    }
  ],
  "next_cursor": null
}
```

## Endpoints

GET Discover physical price series`/v1/commodities/physical/series`

Discover physical commodity price series. Physical prices for about 120 commodities across metals, battery materials, energy, fertilizer and chemical inputs, and agricultural goods, plus US retail fuel (EIA) and World Bank monthly benchmarks..

#### Parameters

- `commodity` optional Filter by commodity, such as gasoline, diesel, copper, urea, rice, crude-oil or coffee. Use the commodity value returned by discovery.
- `category` optional Covered categories are softs, oils-oilseeds, metals, grains, energy, fertilizers, forestry and livestock-dairy. Fuel series use energy.
- `country` optional Use WLD for world benchmarks or EUU for the European Union. Other values are the three-letter country codes this route returns in the country field, such as USA, CHN, BRA or IDN. US fuel uses USA.
- `price_type` optional Fuel uses retail_average. Daily EIA spot and World Bank series use international_benchmark, except tobacco, which uses import_unit_value. Web-read series use international_benchmark, market_average or wholesale_average.
- `currency` optional Filter by quote currency, such as USD or INR.
- `limit` optional Maximum items per page. Defaults to 100.
- `cursor` optional Use next_cursor from the previous page with the same filters and limit. Null means there are no more pages.

#### Response fields

- `series` array Series with commodity, product, country, area, price basis, currency, unit, frequency, attribution and coverage dates. An empty array means no series matches.
- `series[].series_id` string Stable ID returned by series discovery.
- `series[].currency` string Quote currency. US fuel, World Bank and most web-read series use USD. National Egg Coordination Committee (NECC) egg prices use INR.
- `series[].unit / series[].unit_quantity` strings Published unit and the quantity priced. Fuel uses us_gallon. Monthly benchmarks use metric_ton, kilogram, barrel, cubic_meter, troy_ounce, mmbtu, dry_metric_ton_unit or sheet. Web-read series use tonne, dry_tonne, kilogram, mtu, pound, troy_ounce or egg. The quantity is 1 except for plywood, which uses USD per 100 sheets, CEPEA sugar, which uses a 50 kg bag, and NECC eggs, which use 100 eggs. Values are not converted.
- `series[].unit_key` string unit_key is the unit in one standard spelling; unit keeps the source's wording. Mass keys are gram, kilogram, tonne, dry_tonne, wet_tonne, short_ton, pound, troy_ounce, carat, mtu and dry_metric_ton_unit. Volume keys are barrel, gallon, bushel, cubic_meter, standard_cubic_meter and board_foot. Energy keys are mmbtu and terajoule. Count keys are sheet and count. When a price is quoted in cents, price_scale is 0.01: multiply the price by it to get the amount in currency.
- `series[].attribution` string Keep the response attribution with the data. Source: U.S. Energy Information Administration. Source: The World Bank: World Bank Commodity Price Data (The Pink Sheet), CC BY 4.0. Web-read series carry the publisher's name.
- `series[].commodity / series[].category / series[].product` strings Commodity, category and product definition. Examples include gasoline / energy / regular-gasoline and copper / metals / copper. Discovery returns the values for each series.
- `series[].commodity_key` string commodity_key names the commodity the same way on spot, futures, prediction and physical prices, such as gold or crude-oil. Crude oil also carries benchmark (wti, brent, urals or dubai), and futures carry exchange_mic, the exchange's standard code.
- `series[].area` string area gives the regional scope and is omitted for national series.
- `series[].country` string WLD means a world benchmark. EUU means the European Union. Countries use ISO alpha-3 codes. US fuel uses USA for the national average. Web-read series use the code of the priced market, such as CHN, BRA, IND, THA or IDN, or WLD.
- `series[].price_type` string Fuel uses retail_average. Daily EIA spot and monthly series use international_benchmark, except tobacco, which uses import_unit_value. Web-read series use international_benchmark, market_average or wholesale_average.
- `series[].basis` string The basis describes the price definition and is omitted when the source gives none. Grade, delivery term such as CIF or FOB, and origin are written here: the series has no separate low, high, grade or origin fields.

---

[Full reference →](https://narwhalapi.com/docs/api/commodities/physical-series.md)

GET Get physical price series details`/v1/commodities/physical/series/{series_id}`

Read the definition, unit and coverage of one physical price series..

#### Parameters

- `series_id` required Use a stable ID returned by discovery, such as fuel-eia-usa-regular-gasoline or worldbank-cmo-copper.

#### Response fields

- `series_id` string Stable ID returned by series discovery.
- `currency` string Quote currency. US fuel, World Bank and most web-read series use USD. National Egg Coordination Committee (NECC) egg prices use INR.
- `unit / unit_quantity` strings Published unit and the quantity priced. Fuel uses us_gallon. Monthly benchmarks use metric_ton, kilogram, barrel, cubic_meter, troy_ounce, mmbtu, dry_metric_ton_unit or sheet. Web-read series use tonne, dry_tonne, kilogram, mtu, pound, troy_ounce or egg. The quantity is 1 except for plywood, which uses USD per 100 sheets, CEPEA sugar, which uses a 50 kg bag, and NECC eggs, which use 100 eggs. Values are not converted.
- `unit_key` string unit_key is the unit in one standard spelling; unit keeps the source's wording. Mass keys are gram, kilogram, tonne, dry_tonne, wet_tonne, short_ton, pound, troy_ounce, carat, mtu and dry_metric_ton_unit. Volume keys are barrel, gallon, bushel, cubic_meter, standard_cubic_meter and board_foot. Energy keys are mmbtu and terajoule. Count keys are sheet and count. When a price is quoted in cents, price_scale is 0.01: multiply the price by it to get the amount in currency.
- `attribution` string Keep the response attribution with the data. Source: U.S. Energy Information Administration. Source: The World Bank: World Bank Commodity Price Data (The Pink Sheet), CC BY 4.0. Web-read series carry the publisher's name.
- `commodity / category / product` strings Commodity, category and product definition. Examples include gasoline / energy / regular-gasoline and copper / metals / copper. Discovery returns the values for each series.
- `commodity_key` string commodity_key names the commodity the same way on spot, futures, prediction and physical prices, such as gold or crude-oil. Crude oil also carries benchmark (wti, brent, urals or dubai), and futures carry exchange_mic, the exchange's standard code.
- `area` string area gives the regional scope and is omitted for national series.
- `country` string WLD means a world benchmark. EUU means the European Union. Countries use ISO alpha-3 codes. US fuel uses USA for the national average. Web-read series use the code of the priced market, such as CHN, BRA, IND, THA or IDN, or WLD.
- `price_type` string Fuel uses retail_average. Daily EIA spot and monthly series use international_benchmark, except tobacco, which uses import_unit_value. Web-read series use international_benchmark, market_average or wholesale_average.
- `basis` string The basis describes the price definition and is omitted when the source gives none. Grade, delivery term such as CIF or FOB, and origin are written here: the series has no separate low, high, grade or origin fields.
- `tax_included` boolean tax_included is true when the published price includes value-added tax or sales tax, such as 13% VAT on SMM China domestic prices or 7% ICMS on CEPEA sugar, and false when it excludes it. It is omitted when the source does not say.

---

[Full reference →](https://narwhalapi.com/docs/api/commodities/physical-series-detail.md)

GET Get the latest physical price`/v1/commodities/physical/series/{series_id}/latest`

Read the latest available price of one physical series with its observation period..

#### Parameters

- `series_id` required Use a stable ID returned by discovery, such as fuel-eia-usa-regular-gasoline or worldbank-cmo-copper.

#### Response fields

- `series_id` string Stable ID returned by series discovery.
- `currency` string Quote currency. US fuel, World Bank and most web-read series use USD. National Egg Coordination Committee (NECC) egg prices use INR.
- `unit / unit_quantity` strings Published unit and the quantity priced. Fuel uses us_gallon. Monthly benchmarks use metric_ton, kilogram, barrel, cubic_meter, troy_ounce, mmbtu, dry_metric_ton_unit or sheet. Web-read series use tonne, dry_tonne, kilogram, mtu, pound, troy_ounce or egg. The quantity is 1 except for plywood, which uses USD per 100 sheets, CEPEA sugar, which uses a 50 kg bag, and NECC eggs, which use 100 eggs. Values are not converted.
- `unit_key` string unit_key is the unit in one standard spelling; unit keeps the source's wording. Mass keys are gram, kilogram, tonne, dry_tonne, wet_tonne, short_ton, pound, troy_ounce, carat, mtu and dry_metric_ton_unit. Volume keys are barrel, gallon, bushel, cubic_meter, standard_cubic_meter and board_foot. Energy keys are mmbtu and terajoule. Count keys are sheet and count. When a price is quoted in cents, price_scale is 0.01: multiply the price by it to get the amount in currency.
- `attribution` string Keep the response attribution with the data. Source: U.S. Energy Information Administration. Source: The World Bank: World Bank Commodity Price Data (The Pink Sheet), CC BY 4.0. Web-read series carry the publisher's name.
- `period_start / period_end` dates Inclusive observation dates. Fuel uses the Monday survey date for both. A monthly observation spans the whole month, such as 2026-09-01 to 2026-09-30.
- `price` decimal string Published price in the series currency per unit_quantity units. Read it with the series price type and basis.
- `published_on` date Publication date. Omitted when the source gives none.
- `revision` integer Starts at 1 and increases when a later publication changes the value for that period.

---

[Full reference →](https://narwhalapi.com/docs/api/commodities/physical-latest.md)

GET Get physical price history`/v1/commodities/physical/series/{series_id}/observations`

Read the price history of one physical series with periods, published units and revisions..

#### Parameters

- `series_id` required Use a stable ID returned by discovery, such as fuel-eia-usa-regular-gasoline or worldbank-cmo-copper.
- `start` optional Inclusive start date. Supply start and end together, or omit both.
- `end` optional Exclusive end date, later than start. Observations overlapping the date window are returned.
- `limit` optional Maximum items per page. Defaults to 100.
- `cursor` optional Use next_cursor from the previous page with the same filters and limit. Null means there are no more pages.

#### Response fields

- `series_id` string Stable ID returned by series discovery.
- `currency` string Quote currency. US fuel, World Bank and most web-read series use USD. National Egg Coordination Committee (NECC) egg prices use INR.
- `unit / unit_quantity` strings Published unit and the quantity priced. Fuel uses us_gallon. Monthly benchmarks use metric_ton, kilogram, barrel, cubic_meter, troy_ounce, mmbtu, dry_metric_ton_unit or sheet. Web-read series use tonne, dry_tonne, kilogram, mtu, pound, troy_ounce or egg. The quantity is 1 except for plywood, which uses USD per 100 sheets, CEPEA sugar, which uses a 50 kg bag, and NECC eggs, which use 100 eggs. Values are not converted.
- `unit_key` string unit_key is the unit in one standard spelling; unit keeps the source's wording. Mass keys are gram, kilogram, tonne, dry_tonne, wet_tonne, short_ton, pound, troy_ounce, carat, mtu and dry_metric_ton_unit. Volume keys are barrel, gallon, bushel, cubic_meter, standard_cubic_meter and board_foot. Energy keys are mmbtu and terajoule. Count keys are sheet and count. When a price is quoted in cents, price_scale is 0.01: multiply the price by it to get the amount in currency.
- `attribution` string Keep the response attribution with the data. Source: U.S. Energy Information Administration. Source: The World Bank: World Bank Commodity Price Data (The Pink Sheet), CC BY 4.0. Web-read series carry the publisher's name.
- `observations` array Observations ordered oldest first. Each contains period_start, period_end, a decimal-string price and revision. published_on is optional.
- `observations[].period_start / observations[].period_end` dates Inclusive observation dates. Fuel uses the Monday survey date for both. A monthly observation spans the whole month, such as 2026-09-01 to 2026-09-30.
- `observations[].price` decimal string Published price in the series currency per unit_quantity units. Read it with the series price type and basis.
- `observations[].published_on` date Publication date. Omitted when the source gives none.
- `observations[].revision` integer Starts at 1 and increases when a later publication changes the value for that period.
- `next_cursor` string or null Opaque continuation token. Null marks the final page.

---

[Full reference →](https://narwhalapi.com/docs/api/commodities/physical-observations.md)

## Use cases

### Prices in your currency

Convert a commodity price into your own currency with an exchange rate.

[Read the guide →](https://narwhalapi.com/how-to/get-a-commodity-price-in-your-currency.md)

### Backfill a full history

Page through all the history, save it to a file and resume if it stops.

[Read the guide →](https://narwhalapi.com/how-to/backfill-historical-data.md)

### A daily data pull

Run a small script once a day and append the result to a CSV.

[Read the guide →](https://narwhalapi.com/how-to/schedule-a-daily-data-pull.md)

### Fuel surcharge

Set a carrier surcharge from the weekly diesel price.

[Read the use case →](https://narwhalapi.com/use-cases/fuel-surcharge.md)

### Agricultural pricing

Price wheat, rice, sugar and palm oil from daily, weekly and monthly series.

[Read the use case →](https://narwhalapi.com/use-cases/agri-commodity-pricing.md)

### Freight cost indicators

Follow the freight and fuel series the API has.

[Read the use case →](https://narwhalapi.com/use-cases/freight-cost-indicators.md)

## Coverage

- US gasoline (retail)[US average + 9 regions](https://narwhalapi.com/commodities/gasoline.md)
- US diesel (retail)[US average + 9 regions](https://narwhalapi.com/commodities/diesel.md)

## Sources

- U.S. Energy Information Administration[Weekly US retail fuel prices and daily oil and gas prices](https://www.eia.gov/opendata/)

## Related APIs

### Palm oil prices API

Crude Palm Oil and Fresh Fruit Bunch prices from Indonesia and Malaysia.

[Explore the API →](https://narwhalapi.com/api/commodities/palmoil.md)

### Historical commodity prices API

70 monthly series from the World Bank Pink Sheet.

[Explore the API →](https://narwhalapi.com/api/commodities/historical.md)

### Physical commodity prices API

Physical prices for about 120 commodities across metals, battery materials, energy, fertilizer and chemical inputs, and agricultural goods, plus US retail fuel (EIA) and World Bank monthly benchmarks. Includes palm oil. Units as published.

[Explore the API →](https://narwhalapi.com/api/commodities/physical.md)

### Spot metals price API

Gold, silver, platinum and palladium spot prices, plus WTI, Brent and copper reference prices.

[Explore the API →](https://narwhalapi.com/api/commodities/spot.md)

### Pricing

Prepaid credit, $2 per 1,000 calls, no plans or tiers.

[See pricing →](https://narwhalapi.com/pricing.md)

## FAQ

What does the gas prices API cover?

Regular gasoline and No. 2 on-highway diesel retail averages across the US and nine regions.

How much history is available?

US regular gasoline starts on 20 August 1990 and US diesel on 21 March 1994. Regional series start later, from 1992 for gasoline and 1997 for diesel; each series reports its own coverage_start. Use the observations endpoint for a date window.

How do I select a region?

Discover series with commodity=gasoline or commodity=diesel. Read the area and description, then use that series_id for details, the latest price or history.

What should I check before using the data?

Use the fuel price API for the US average, East Coast (PADD 1), New England (PADD 1A), Central Atlantic (PADD 1B), Lower Atlantic (PADD 1C), Midwest (PADD 2), Gulf Coast (PADD 3), Rocky Mountain (PADD 4), West Coast (PADD 5), and West Coast except California. Source: U.S. Energy Information Administration

## Start with a free key

Free $10 credits every month, no card.Free $10 credits a month, no card.

[Get a free API key](https://narwhalapi.com/signup)
