Where can I get a diesel price API?
OilPriceAPI is a diesel price API: daily US per-state retail diesel, EU country retail diesel, and ULSD / ICE gasoil (10ppm) benchmarks over one REST endpoint, with a free tier and Python/JavaScript SDKs.
Pull a state's retail diesel average or a wholesale gasoil benchmark as JSON — useful for logistics, fuel-cost, and freight models.
US per-state retail diesel
Daily retail diesel averages by US state (DIESEL_RETAIL_STATE_<XX>_USD) for logistics and fuel-cost tooling.
EU country diesel
Retail diesel for EU countries (DIESEL_RETAIL_<CC>_EUR), updated regularly.
ULSD & gasoil benchmarks
Wholesale ULSD (ULSD_DIESEL_USD) and ICE/Singapore gasoil (10ppm) for procurement and hedging.
One REST endpoint
GET /v1/prices/latest?by_code=DIESEL_RETAIL_STATE_TX_USD — JSON, one API key.
Free tier to start
A 7-day trial with 10,000 requests, no credit card; paid plans from $19/month.
Official SDKs
Production-ready SDKs for Python, JavaScript/Node.js, Java, C#, and Ruby.
Endpoints you'll use
GET /v1/prices/latest?by_code=DIESEL_RETAIL_STATE_TX_USDTexas retail diesel (daily state average).
GET /v1/prices/latest?by_code=GASOIL_USDICE gasoil (10ppm ULSD benchmark).
Frequently asked questions
Does the diesel API cover US states?
Yes — OilPriceAPI serves daily retail diesel averages for every US state (e.g. DIESEL_RETAIL_STATE_TX_USD), plus EU country diesel and wholesale ULSD/gasoil benchmarks.
What's the difference between retail and benchmark diesel?
Retail (per-state/country) is the pump-level daily average; ULSD/gasoil (e.g. GASOIL_USD, SINGAPORE_GASOIL_USD) are wholesale 10ppm benchmarks used for procurement and hedging. Both are available.
How fresh is the data?
Retail state/country diesel updates daily; wholesale gasoil benchmarks update through the trading day.
Is there a free tier?
Yes — a 7-day free trial with 10,000 requests and no credit card. Paid plans start at $19/month.
Start with a free OilPriceAPI key
diesel-price-api