Diesel price API: weekly fuel costs for logistics agents
Diesel price API for AI agents and logistics apps: weekly on-highway diesel retail prices by country, normalized to USD per gallon, for $0.001 USDC per call through x402 on Base. No signup, no API key.
Endpoint
POST https://apisphere.us.ci/api/v1/diesel-price returns weekly on-highway diesel retail prices, normalized to USD per gallon. US data comes from the EIA; 120+ other countries are sourced via OpenVan.camp. A plain GET only advertises the x402 payment challenge - send data over POST.
- Price: $0.001 USDC per call, settled on Base through x402.
- Freshness: results are cached for 24 hours (DAILY).
- Country codes are ISO 3166-1 alpha-2 and case-insensitive.
Request fields
Send a JSON body. Invalid bodies return 400 with field-level details.
- country (optional): ISO 3166-1 alpha-2 code, defaults to "us" - e.g. "us", "id", "de".
curl -X POST https://apisphere.us.ci/api/v1/diesel-price \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <signed-payment-payload>" \
-d '{"country": "us"}'Response
A 200 response returns the latest diesel price in USD per gallon with the observation week and source, plus a meta block with the cache state and request id.
- 400 - invalid country code (details in the response).
- 402 - missing or invalid payment.
- 429 - rate limited; honor Retry-After.
- 502 - upstream provider error; the same request is safe to retry.
{
"country": "US",
"priceUsdPerGallon": 3.65,
"week": "2026-09-15",
"source": "eia",
"meta": {
"cache": "miss",
"request_id": "7f3a9c2e-1b4d-4f6a-8c2e-9d1f5a3b7c4e"
}
}