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: find stations

Find stations

Stations near a point, or in a country, town or brand, with their prices.

GEThttps://api.oilapi.net/v1/stations
PlansEvery plan
Cost1 call per request
ReturnsPaged, 50 a page
UpdatedLive, as stations change

What it is for

Stations near a point, or in a country, town or brand, each with every fuel's latest price, when it changed and whether it is stale.

near with radius_km finds stations around a point, nearest first; fuel with sort=price finds the cheapest. Prices unchanged for over 30 days are left out unless include_stale=true.

Good for
  • The cheapest fuel nearby
  • Station maps
  • Comparing brands in a town
  • Store locators
Also the MCP tool stations_near

Parameters 9 in the query

NameWhere and typeRequiredWhat it doesExample
nearquery pointoptionallatitude,longitude.48.8566,2.3522
radius_kmquery numberdefault 5Radius around near, up to 25 km. Up to 25.2
countryquery countryoptionalTwo letter country code, such as fr, gb or ke.fr
cityquery stringoptionalTown or city name.Lyon
brandquery stringoptionalBrand name.TotalEnergies
fuelquery stringoptionalOnly stations selling this fuel, such as diesel.diesel
sortquery one ofoptionaldistance (with near) or price (with fuel). One of distance, price.price
include_stalequery one ofdefault falsetrue also returns prices unchanged for over 30 days, marked stale. One of true, false.
currencyquery ISO 4217optionalConvert every price to this currency on its own day, such as usd.usd
page, per_page, cursorquery pagingdefault 1, 50See Pagination.per_page=100

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
idstringOur id for the station; it never changes
brandstringThe brand, or the name when there is none
namestringOur name for it
addressstringStreet address
citystringTown or city
postcodestringPostcode
countrystringTwo letter country code
latnumberLatitude
lonnumberLongitude
distance_kmnumberDistance from near, when given
pricesarrayEach fuel: price, currency, unit, changed_at and stale

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

GET /v1/stations?near=48.8566,2.3522&radius_km=2&fuel=diesel&sort=price&per_page=2
{
    "data": [],
    "meta": {
        "count": 0,
        "next_cursor": null,
        "page": 1,
        "per_page": 2,
        "total": 0,
        "total_pages": 1,
        "next_page": null,
        "prev_page": null,
        "unit": "litre"
    }
}

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