- Document ID
eia- Version
- 1.0.0 · Revision: 1
- Provider
- U.S. Energy Information Administration, an agency of the U.S. Department of Energy
- Service
- EIA Open Data API v2 —
api.eia.gov - LastWagon component
- the diesel fuel-price benchmark in the Driver Ledger's weekly review
- Status
- Draft record — prepared 2026-08-23, awaiting counsel review.
What LastWagon uses
The weekly retail on-highway diesel price series from the petroleum prices dataset (/v2/petroleum/pri/gnd/data/, product EPD2D, process PTE), for the U.S. average (NUS) and the PADD regions. EIA publishes it once a week, on Tuesday mornings Eastern.
The request is made by the LastWagon proxy, never by a driver's device. The proxy fetches the series, keeps the latest week, converts dollars per gallon to integer cents, caches the result, and serves the same normalised snapshot to every install. Nothing about a driver — no identifier, no location, no ledger figure — is sent to EIA, because the app never talks to EIA at all. See proxy/lib/market-eia.js and docs/ledger-insights.md.
Licence and provenance
EIA is a U.S. federal agency and its data are works of the U.S. federal government, in the public domain. They can be redistributed with no licence attached — the same footing as the Census geocoding output in [census.md](census.md), and the reason the fuel benchmark could be built at all.
The API is a separate thing from the data: access to api.eia.gov requires a free API key and is governed by EIA's own API terms of service.
Obligations
Attribution. LastWagon credits EIA wherever a fuel benchmark is shown, in one fixed form held in a single constant (BenchmarkAttribution.EIA in core/model/Benchmarks.kt) so the wording cannot drift between screens:
Fuel benchmark data: U.S. Energy Information Administration (EIA)
No implied endorsement. LastWagon does not use EIA's name or seal as a mark, does not describe itself as affiliated with, endorsed by, or certified by EIA, and does not present its own figures as EIA's.
Not misrepresented. The number shown is the published series value, converted to cents and carried with the effective date EIA gave it. LastWagon never interpolates it, never re-dates it, and never estimates one — a week with no usable answer from EIA shows *unavailable*, not a plausible-looking price. A benchmark more than 14 days older than the week it is compared against is presented as stale, in writing, beside the comparison.
The API key is a credential. It lives in the proxy's environment (EIA_API_KEY), never in an APK. It rides in the query string, so the request URL is itself a secret and is never logged.
Verification still owed: EIA-API-TERMS-VERIFIED — to be supplied — the current text of EIA's API terms of service has not been read and recorded against this docket. The obligations above are stated from the general form of U.S. federal open-data terms and must be confirmed, in writing, against the published terms before release.
Sources
- EIA Open Data — https://www.eia.gov/opendata/
- Petroleum prices (gasoline and diesel) — https://www.eia.gov/petroleum/gasdiesel/
- Retrieved: EIA-SOURCES-RETRIEVAL-DATE — to be supplied