API reference
Every endpoint, grouped, with what it takes and returns.
On this pageCoveragePricesStationsMarketsSeriesAccount
Base address https://api.oilapi.net. Every endpoint reads JSON with your key in a header; each page has Try it and code in four languages.
Coverage
Which countries we price and what we hold for each.
| Endpoint | Address | What it gives |
|---|---|---|
| List countries | GET /v1/countries | Every country we price, what we hold for it and how far back it goes |
| Get a country | GET /v1/countries/{country} | One country in full: every series we hold for it and its stations |
Prices
Pump prices and the prices governments set.
| Endpoint | Address | What it gives |
|---|---|---|
| Pump prices | GET /v1/prices/retail | A country's pump prices: today's for each fuel, or one fuel over a range |
| Government set prices | GET /v1/prices/set | Prices a government has fixed, as each level took effect |
Stations
Every station we read, its prices and its history.
| Endpoint | Address | What it gives |
|---|---|---|
| Find stations | GET /v1/stations | Stations near a point, or in a country, town or brand, with their prices |
| Get a station | GET /v1/stations/{id} | One station and every price it shows |
| Station price history | GET /v1/stations/{id}/history | Every price change at one station |
Markets
Crude and product benchmarks, and currency rates.
| Endpoint | Address | What it gives |
|---|---|---|
| List benchmarks | GET /v1/benchmarks | Crude and product benchmarks with their latest price |
| Benchmark history | GET /v1/benchmarks/{benchmark} | One benchmark day by day, or averaged by week, month or year |
| Currency rates | GET /v1/fx | Units of a currency per US dollar, day by day |
Series
Every series we hold, point by point.
| Endpoint | Address | What it gives |
|---|---|---|
| List series | GET /v1/series | Every series we hold: retail, set, wholesale, crude, supply and more, searchable |
| Series values | GET /v1/series/{series} | One series, point by point |
Account
Your plan and your calls.
| Endpoint | Address | What it gives |
|---|---|---|
| Your usage | GET /v1/usage | Your plan, your calls today and your limits; does not count against them |