OilPriceAPI Fuel Widgets
OilPriceAPI Fuel Widgets

OilPriceAPI Fuel Widgets

0/5 (0 ratings) — active installs Updated Jul 19, 2026

OilPriceAPI Fuel Widgets adds source-dated U.S. retail-fuel data to WordPress as shortcodes or a Gutenberg block.

Fuel Price Ticker

National U.S. diesel and regular gasoline averages. Each result shows its EIA observation week, weekly cadence, unit, and source.

U.S. Diesel Price

The national U.S. diesel retail average, quoted in USD per gallon and labeled with its observation week.

Fuel Surcharge Calculator

Calculates the percentage by which the weekly national diesel average exceeds a base price configured by the site owner. It does not describe the result as an industry standard or a contractual surcharge.

Features

  • Source date, weekly cadence, currency, unit, and EIA attribution in every successful widget
  • Dark and light themes
  • Shortcodes and Gutenberg block
  • Server-side requests with no remote executable code
  • One-hour validated cache
  • Last successful result for up to 48 hours after an error, visibly labeled as a cached copy
  • Fail-closed handling for unavailable, rate-limited, timed-out, empty, or malformed responses
  • No API key required for the public EIA series

External service

This plugin uses OilPriceAPI to retrieve the EIA retail-fuel series displayed by the widgets.

The WordPress server sends a GET request to https://www.oilpriceapi.com/api/widgets/fuel-prices at most once per hour while a page containing a widget is requested. OilPriceAPI receives the site server’s IP address and standard HTTP request metadata. The plugin does not send the visitor’s IP address, WordPress user data, page content, or an API credential.

The underlying retail-fuel observations come from the U.S. Energy Information Administration and are public domain at the source. OilPriceAPI delivers and validates the response; it does not grant rights in underlying data.