PricesPump pricesStation pricesSet pricesTaxes and margins
MarketsCrude benchmarksJet and heating oilRefined productsCurrencies
DataCountriesSupply and stocksHistoryStatus
DocsQuick startAPI referenceMCP serverChangelog
Pricing
BRENT123.1$/bbl ▼ 3.92%WTI103.4$/bbl ▼ 1.79%ULSD4.687$/gal ▼ 3.02%RBOB3.521$/gal ▼ 1.92%MX REGULAR23.99MX$/l ▲ 0.00%ES PETROL 951.749€/l ▼ 0.34%FR PETROL 952.195€/l ▼ 0.07%PT PETROL 952.094€/l ▼ 0.01%CA REGULAR1.829C$/l ▲ 6.04%GB PETROL 95 E101.719£/l ▼ 0.29%AT PETROL 951.780€/l ▼ 2.48%HR PETROL 951.640€/l ▲ 0.00%SI PETROL 951.627€/l ▲ 0.00%AL PETROL196.0ALL/lDZ PETROL47.00DZD/lAO PETROL304.0AOA/lBRENT123.1$/bbl ▼ 3.92%WTI103.4$/bbl ▼ 1.79%ULSD4.687$/gal ▼ 3.02%RBOB3.521$/gal ▼ 1.92%MX REGULAR23.99MX$/l ▲ 0.00%ES PETROL 951.749€/l ▼ 0.34%FR PETROL 952.195€/l ▼ 0.07%PT PETROL 952.094€/l ▼ 0.01%CA REGULAR1.829C$/l ▲ 6.04%GB PETROL 95 E101.719£/l ▼ 0.29%AT PETROL 951.780€/l ▼ 2.48%HR PETROL 951.640€/l ▲ 0.00%SI PETROL 951.627€/l ▲ 0.00%AL PETROL196.0ALL/lDZ PETROL47.00DZD/lAO PETROL304.0AOA/l

Oil price API: pump prices

Pump prices

A country's pump prices: today's for each fuel, or one fuel over a range.

GEThttps://api.oilapi.net/v1/prices/retail
PlansEvery plan
Cost1 call per request
ReturnsUp to 5,000 points
UpdatedAs each source publishes

What it is for

A country's pump prices. With only country, today's price for every fuel; add fuel for that fuel's history, oldest first.

Where a country publishes more than one series for a fuel (daily station averages and a weekly official average, say), interval picks one. Prices are in the country's own currency per litre unless you convert them with currency.

Good for
  • Today's prices on a country page
  • A fuel's price history for a chart
  • Comparing countries in one currency
  • Prices in today's money with real=latest
Also the MCP tool price_now

Parameters 8 in the query

NameWhere and typeRequiredWhat it doesExample
countryquery countryrequiredTwo letter country code, such as fr, gb or ke.mx
fuelquery stringoptionalOne fuel, such as diesel or gasoline_95; leave out for every fuel now.diesel
fromquery dateoptionalFirst date, YYYY-MM-DD.2024-01-01
toquery dateoptionalLast date, YYYY-MM-DD.2024-12-31
intervalquery one ofoptionalWhich published series to read when a country has more than one. One of day, week, month.
currencyquery ISO 4217optionalConvert every price to this currency on its own day, such as usd.usd
realquery stringoptionalRestate every price in the money of one month with the country's consumer price index: latest, or a month as YYYY-MM such as 2020-01.latest
limitquery integerdefault 100Most recent points when no from is given. Up to 5,000.30

Try it runs against the live API with your key

No key yet? Get a free one; it is saved in this browser for every page.

The answer 200, application/json

FieldTypeWhat it holdsExample
countrystringTwo letter country code"MX"
fuelstringFuel code; see Fuels and units
intervalstringday, week, month or year
unitstringlitre, gallon or barrel
currencystringThree letter currency code
valuesarrayThe points, oldest first

Example answer real, from what we hold now; long lists cut to three

GET /v1/prices/retail?country=mx
{
    "data": {
        "country": "MX",
        "fuels": [
            {
                "fuel": "diesel",
                "kind": "average",
                "interval": "day",
                "date": "2026-10-29",
                "price": 26.9903,
                "unit": "litre",
                "currency": "MXN"
            },
            {
                "fuel": "gasoline_premium",
                "kind": "average",
                "interval": "day",
                "date": "2026-10-29",
                "price": 28.5914,
                "unit": "litre",
                "currency": "MXN"
            },
            {
                "fuel": "gasoline_regular",
                "kind": "average",
                "interval": "day",
                "date": "2026-10-29",
                "price": 23.6972,
                "unit": "litre",
                "currency": "MXN"
            }
        ]
    },
    "meta": {
        "count": 3
    }
}

Errors every error has the same shape

HTTPCodeWhenWhat to do
401unauthorizedNo key, or not a valid oneSend your key in the X-API-Key header; your account page shows it.
400bad_requestA value is wrong or a required one is missingThe message names the parameter and the form it takes.
422unknown_parameterA parameter this endpoint does not takeTake it out; the parameters this endpoint takes are listed above.
429rate_limitedToo many calls this minuteWait the seconds in the Retry-After header, then call again.
429quota_exceededToday's calls are used upWait for the day to reset at midnight UTC, or move to a larger plan.
Dates and times are UTC. A point's date is the day its price took effect, or the first day of its week or month for weekly and monthly series. Conversions use each day's own rate, so a converted series moves with both the price and the exchange rate.

Related