HomeBlog

API Guide

US Diesel Price API: EIA National Average from JSON

September 16, 2026 · 8 min read · By FreightPulse Engineering

US diesel price API — EIA national average as JSON

A US diesel price API is a REST endpoint that returns the Energy Information Administration weekly diesel print as JSON. On FreightPulse that endpoint is GET /api/v1/fuel-prices. Auth is the X-API-Key header. There are no required query parameters. The payload includes national diesel, PADD regions, gasoline, and a bunker object marked unavailable.

The official docs sample uses diesel.national_average 3.847 USD/gallon, updated_at 2026-07-27, source EIA (U.S. Energy Information Administration). The homepage “Live US diesel” widget on 16 Sep 2026 printed $6.29. That widget is not the docs fixture — call the endpoint with your key for the current EIA week. Docs: /docs (panel /v1/fuel-prices). Free is 100 calls/mo, no credit card, 5 rpm. Basic is $49/mo (1,000 calls, 30 rpm, 7-day trial on paid plans).

Request: latest EIA fuel prices

curl -H "X-API-Key: YOUR_KEY" \
  -H "Accept: application/json" \
  "https://freightpulsehq.com/api/v1/fuel-prices"

Send Accept: application/json. History for the national diesel series is a different path: GET /api/v1/historical?metric=fuel_price_diesel_national&period=30d (or from / to).

Response: diesel, gasoline, bunker

Official JSON from the product docs (timestamp 2026-07-30T12:00:00Z; diesel week ending 2026-07-27):

{
  "success": true,
  "data": {
    "timestamp": "2026-07-30T12:00:00Z",
    "source": "EIA (U.S. Energy Information Administration)",
    "currency": "USD",
    "unit": "gallon",
    "data": {
      "diesel": {
        "national_average": 3.847,
        "change_week": -0.023,
        "change_percent": -0.6,
        "updated_at": "2026-07-27",
        "regions": {
          "east_coast": 3.912,
          "midwest": 3.756,
          "gulf_coast": 3.623,
          "rocky_mountain": 3.891,
          "west_coast": 4.456,
          "california": 4.892
        },
        "historical": { "30d_avg": 3.82, "90d_avg": 3.75, "yoy_change_percent": -8.2 }
      },
      "gasoline": {
        "national_average": 3.156,
        "regular": 3.156,
        "historical": { "30d_avg": 3.1, "90d_avg": 3.05, "yoy_change_percent": 1.1 }
      },
      "bunker_fuel": {
        "available": false,
        "note": "No known free source — requires a paid provider"
      }
    }
  }
}

Read data.data.diesel.national_average (USD per gallon). PADD regions are nested under diesel.regions. bunker_fuel.available is false — do not invent a bunker number. change_week is dollars, change_percent is the week-on-week percent.

Go live with /fuel-prices

1. Register — Free is 100 calls/mo with no card. Paid plans include a 7-day trial; Basic is $49/mo.

2. Open /docs and copy the X-API-Key header.

3. Call https://freightpulsehq.com/api/v1/fuel-prices

4. Render diesel.national_average with updated_at. Cache weekly — EIA does not tick intraday.

FAQ: diesel price API

Is the homepage $6.29 the same as 3.847 in the docs?

No. 3.847 is the documented sample for the week of 2026-07-27. $6.29 was the homepage widget on 16 Sep 2026. Always read national_average from a live /fuel-prices call.

What about bunker / marine fuel?

bunker_fuel.available is false. There is no free bunker source on this endpoint.

Free vs Basic?

Free: 100 calls/month, 5 rpm, no credit card. Basic: $49/mo, 1,000 calls, 30 rpm. Guest traffic is also capped at 100 requests/day per IP on public surfaces.

Pull EIA diesel via API

National + PADD diesel and gasoline. Free tier: 100 calls/month, no card.

Start Free →