# Gas Prices API

> Gas Prices returns average retail gasoline, diesel and LPG prices from official weekly government surveys for the US, the UK, all 27 EU countries and the EU average. Pass a country, or a US state, region or city, to get the latest week with week-over-week and year-over-year changes, in any currency, per liter or per gallon.

**Endpoint:** `GET https://api.apiverve.com/v1/gasprices`  
**Category:** Finance  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/gasprices

## Overview

A gas prices API with a free plan: the Free plan returns the US national average price of regular gasoline, and paid plans open every country, fuel and week. It is built on three official weekly surveys: the U.S. Energy Information Administration retail gasoline and diesel survey (since 1990, including nine states and ten metro areas), the European Commission Weekly Oil Bulletin for every EU member (since 2005) and the UK government weekly road fuel prices (since 2003). Each price is stored as published, in the currency drivers pay, and can be converted to any currency and to liters or gallons on request. Use it for fuel cost calculators, fleet budgeting, delivery surcharges and cross-country cost comparisons.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/gasprices?country=US&area=CA&currency=USD&unit=liter&date=2024-06-15" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `country` | string | No | Country to get prices for: US, GB (UK is accepted too), EU (the EU average) or any EU member code such as DE, FR or PL. English country names such as Germany are accepted too. Defaults to US. Countries other than US require a paid plan.. One of: US, GB, UK, EU, AT, BE, BG, CY, CZ, DE, DK, EE, ES, FI, FR, GR, HR, HU, IE, IT, LT, LU, LV, MT, NL, PL, PT, RO, SE, SI, SK, United States, USA, United Kingdom, Great Britain, European Union, Austria, Belgium, Bulgaria, Cyprus, Czechia, Czech Republic, Germany, Denmark, Estonia, Spain, Finland, France, Greece, Croatia, Hungary, Ireland, Italy, Lithuania, Luxembourg, Latvia, Malta, Netherlands, Poland, Portugal, Romania, Sweden, Slovenia, Slovakia |
| `area` | string | No | US only: any state as a code or full name (GA, Georgia), a region (eastcoast, newengland, centralatlantic, loweratlantic, midwest, gulfcoast, rockymountain, westcoast, westcoastexcalifornia) or a city (boston, chicago, cleveland, denver, houston, losangeles, miami, newyorkcity, sanfrancisco, seattle; spaces are fine). EIA publishes its own series for CA, CO, FL, MA, MN, NY, OH, TX and WA; any other state returns its PADD region average with resolvedFrom and a note. Omit for the national average. Requires a paid plan. |
| `currency` | string | No | Currency to return prices in, as an ISO code (e.g. USD, EUR, GBP). Defaults to the country's own currency.. length 3-3. Premium field |
| `unit` | string | No | Volume unit to price per: liter or gallon. Defaults to the source's unit (gallon for the US, liter elsewhere).. One of: liter, gallon |
| `date` | string | No | Date to look up (YYYY-MM-DD). Returns the survey week in effect on that date. Omit for the latest week.. date. Premium field |

## Response fields

- `country` — string · ISO country code the prices apply to (EU for the European Union average)
- `countryName` — string · Country name
- `area` — string · Area code the prices apply to: the country code for national prices, or a US state code, region or city key
- `areaName` — string · Human-readable area name
- `areaType` — string · Area granularity: national, union, region, state or city
- `week` — string · Survey week (Monday) in YYYY-MM-DD format
- `currency` — string · ISO currency code of all prices and changes in this response
- `unit` — string · Volume unit prices are quoted per: gallon or liter
- `prices` — object · Average retail price per unit by fuel grade
  - `prices.regular` — number · Average retail price of regular unleaded per unit; null where the source does not survey it for this area
  - `prices.midgrade` — number · Average retail price of midgrade per unit; null where the source does not survey it for this area · (premium)
  - `prices.premium` — number · Average retail price of premium per unit; null where the source does not survey it for this area · (premium)
  - `prices.diesel` — number · Average retail price of No. 2 diesel per unit; null where the source does not survey it for this area · (premium)
  - `prices.allGrades` — number · Average retail price of all gasoline grades combined per unit; null where the source does not survey it for this area · (premium)
  - `prices.lpg` — object · Average retail price of LPG (autogas) per unit; null where the source does not survey it for this area · (premium)
- `changeDirection` — string · Direction of the weekly change in regular gasoline: up, down or unchanged
- `previousWeek` — string · Date of the prior survey week used for the weekly change · (premium)
- `weeklyChange` — object · Change in price per unit from the previous survey week, by grade
  - `weeklyChange.regular` — number · Week-over-week change in the regular unleaded price, in currency per unit · (premium)
  - `weeklyChange.midgrade` — number · Week-over-week change in the midgrade price, in currency per unit · (premium)
  - `weeklyChange.premium` — number · Week-over-week change in the premium price, in currency per unit · (premium)
  - `weeklyChange.diesel` — number · Week-over-week change in the No. 2 diesel price, in currency per unit · (premium)
  - `weeklyChange.allGrades` — number · Week-over-week change in the all gasoline grades combined price, in currency per unit · (premium)
  - `weeklyChange.lpg` — object · Week-over-week change in the LPG (autogas) price, in currency per unit · (premium)
- `yearAgoWeek` — string · Date of the survey week one year earlier used for the yearly change · (premium)
- `yearlyChange` — object · Change in price per unit from the same week a year earlier, by grade
  - `yearlyChange.regular` — number · Year-over-year change in the regular unleaded price, in currency per unit · (premium)
  - `yearlyChange.midgrade` — number · Year-over-year change in the midgrade price, in currency per unit · (premium)
  - `yearlyChange.premium` — number · Year-over-year change in the premium price, in currency per unit · (premium)
  - `yearlyChange.diesel` — number · Year-over-year change in the No. 2 diesel price, in currency per unit · (premium)
  - `yearlyChange.allGrades` — number · Year-over-year change in the all gasoline grades combined price, in currency per unit · (premium)
  - `yearlyChange.lpg` — object · Year-over-year change in the LPG (autogas) price, in currency per unit · (premium)
- `nativeCurrency` — string · Currency the source publishes in (USD for the US, GBP for the UK, EUR or the local currency in the EU)
- `nativeUnit` — string · Unit the source publishes in (gallon for the US, liter elsewhere)
- `exchangeRate` — number · Rate applied to convert from nativeCurrency to currency; 1 when no conversion was requested

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "country": "US",
    "countryName": "United States",
    "area": "US",
    "areaName": "United States",
    "areaType": "national",
    "week": "2026-09-28",
    "currency": "USD",
    "unit": "gallon",
    "prices": {
      "regular": 4.465,
      "midgrade": 5.073,
      "premium": 5.482,
      "diesel": 6.382,
      "allGrades": 4.603,
      "lpg": null
    },
    "changeDirection": "down",
    "previousWeek": "2026-09-21",
    "weeklyChange": {
      "regular": -0.013,
      "midgrade": 0.012,
      "premium": 0.022,
      "diesel": -0.147,
      "allGrades": -0.007,
      "lpg": null
    },
    "yearAgoWeek": "2025-09-29",
    "yearlyChange": {
      "regular": 1.347,
      "midgrade": 1.366,
      "premium": 1.415,
      "diesel": 2.628,
      "allGrades": 1.355,
      "lpg": null
    },
    "nativeCurrency": "USD",
    "nativeUnit": "gallon",
    "exchangeRate": 1
  }
}
```

## Use cases

- **Trip Fuel Cost Calculators** — Estimate the fuel cost of a road trip by multiplying route distance and vehicle efficiency by the current price for the country, state or city being driven through.
- **Fleet Fuel Budgeting** — Logistics teams forecast monthly fuel spend by tracking weekly diesel prices and the year-over-year change in every country their trucks operate in.
- **Delivery Fuel Surcharges** — Couriers and freight brokers tie fuel surcharges to the weekly national diesel average so pricing adjusts automatically as pump prices move.
- **Cross-Country Cost Comparisons** — Travel and relocation sites compare what drivers pay across Europe and the US by requesting every country in one currency and per liter.

## More

- Full reference: https://docs.apiverve.com/ref/gasprices
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
