Monthly average of EIA U.S. on-highway diesel, with month-to-date and surcharge effective month
Changed onCalendar-month average of the EIA U.S. on-highway diesel price (series EMD_EPD2D_PTE_NUS_DPG, "Diesel (On-Highway) - All Types", USD per gallon), the index monthly rail fuel-surcharge programs are keyed to.
Each month carries two separate figures. eia_monthly_average is the value EIA publishes for the month, served as published (kind: published). weekly_mean is OilPriceAPI's arithmetic mean of EIA's weekly prints dated in the month, rounded half up to 3 decimals (kind: calculated), with the weeks used and the week count. For the open month eia_monthly_average is null, weekly_mean is the month-to-date mean and provisional is true. When a weekly print EIA has already published is not held, weekly_mean.value is null and warning says why; nothing is interpolated.
effective_month is the basis month plus two calendar months. That convention is listed in surcharge_lag.verified_programs only for the programs whose public page states it; surcharge_lag.exceptions lists a program that uses a different basis period. The applicable tariff or contract governs.
With no parameters the response holds the current month and the two before it, newest first. Available on every plan. EIA revises its values; a revised value is served with revised_at and previous_value. EIA's API carries no release timestamp, so first_seen_at is when OilPriceAPI first read the value.
Request
- Base URLhttps://api.oilpriceapi.com
- AuthAPI key in header Authorization
Query parameters
One calendar month as YYYY-MM. Cannot be combined with start_month or end_month.
First month of a range as YYYY-MM. At most 120 months per request.
Last month of a range as YYYY-MM. Defaults to the current month.
Response
Requested months, newest first
Example response
{
"status": "success",
"data": {
"months": [
{
"basis_month": "2026-10",
"effective_month": "2026-12",
"eia_monthly_average": {
"value": 6.252,
"value_text": "6.252",
"units": "USD/gal",
"source": "eia",
"series_id": "EMD_EPD2D_PTE_NUS_DPG",
"frequency": "monthly",
"period": "2026-10"
},
"weekly_mean": {
"value": 6.252,
"value_text": "6.252",
"unrounded": "6.251500",
"units": "USD/gal",
"weeks_observed": 4,
"weeks_in_month": 4
}
}
],
"coverage": {
"earliest_month": "2019-01",
"latest_published_month": "2026-10",
"latest_weekly_period": "2026-11-09"
}
}
}Changes
- info
endpoint added
- info