Live petrol and diesel prices for Pakistan as clean JSON. No API key. No signup. Free forever.Two endpoints give you today's rate and the full price history — daily, monthly or yearly.
Paste this in your browser address bar and you will see the response straight away.
GET https://api2.autoones.com/api/fuel-prices
Returns today's effective petrol and diesel price, the change from the previous day, and when the price took effect. Cached for 5 minutes.
GET https://api2.autoones.com/api/fuel-prices
{
"source": "OGRA notified prices, Government of Pakistan",
"unit": "PKR per litre",
"provider": "autoones.com",
"docs": "https://autoones.com/fuel-prices-api",
"prices": [
{
"fuel": "Petrol",
"slug": "petrol",
"price_pkr": 343.1,
"change_pkr": 1.12,
"effective_date": "2026-08-26",
"price_updated_at": "2026-08-25 23:20:06"
},
{
"fuel": "Diesel",
"slug": "diesel",
"price_pkr": 371.8,
"change_pkr": 1.11,
"effective_date": "2026-08-26",
"price_updated_at": "2026-08-25 23:20:06"
}
]
}| Field | Type | Meaning |
|---|---|---|
| fuel | string | Display name, e.g. Petrol |
| slug | string | Use this in the history endpoint: petrol or diesel |
| price_pkr | number | Price in Pakistani rupees per litre |
| change_pkr | number or null | Rupee change versus the previous notified price |
| effective_date | date | The date this price took effect (YYYY-MM-DD) |
| price_updated_at | datetime | When our system last wrote this record |
Every price we have recorded, as a daily list or grouped by month or year. Cached for 10 minutes.
GET https://api2.autoones.com/api/fuel-prices/history?fuel=petrol&view=daily&limit=30
| Parameter | Default | Accepted values |
|---|---|---|
| fuel | petrol | petrol, diesel |
| view | daily | daily, monthly, yearly |
| limit | 30 | 1 to 400 |
{
"fuel": "Petrol",
"slug": "petrol",
"view": "daily",
"unit": "PKR per litre",
"provider": "autoones.com",
"rows": [
{ "effective_date": "2026-08-26", "price_pkr": "343.10", "change_pkr": "1.12", "source": "ogra" },
{ "effective_date": "2026-08-25", "price_pkr": "341.98", "change_pkr": "0.39", "source": "ogra" }
]
}When view is monthly or yearly, each row is a summary instead of a single day.
{
"fuel": "Petrol",
"view": "monthly",
"rows": [
{ "period": "2026-08", "min_pkr": "335.18", "max_pkr": "343.10", "avg_pkr": "339.42", "close_pkr": "343.10" }
]
}fetch("https://api2.autoones.com/api/fuel-prices")
.then(r => r.json())
.then(d => {
const petrol = d.prices.find(p => p.slug === "petrol");
console.log(petrol.price_pkr); // 343.1
});$json = file_get_contents("https://api2.autoones.com/api/fuel-prices");
$data = json_decode($json, true);
foreach ($data["prices"] as $p) {
echo $p["fuel"] . ": Rs " . $p["price_pkr"] . PHP_EOL;
}import requests
data = requests.get("https://api2.autoones.com/api/fuel-prices").json()
for p in data["prices"]:
print(p["fuel"], p["price_pkr"], p["effective_date"])Fuel prices in Pakistan are set by the Oil and Gas Regulatory Authority (OGRA) under the daily pricing mechanism introduced in 2026. OGRA calculates the rate from a seven-day rolling average of international oil prices, freight and the rupee-dollar exchange rate, then notifies it around midnight. Our system reads the new rate every night, checks it against sanity bounds and a second source, and stores it. Prices stay frozen on Saturdays, Sundays and public holidays.
You can see the same data rendered on our petrol price in Pakistan page, with charts and a full history table.
Yes. It is free to use, with no API key, no signup and no paid tier. We built it for our own petrol price page and left it open because other developers in Pakistan kept asking for one.
No. Both endpoints are open GET requests. Call them from a browser, a server, a mobile app or a spreadsheet.
Prices are checked automatically every night after OGRA issues its notification. The current endpoint is cached for 5 minutes and history for 10 minutes.
Yes. There is no restriction on commercial use. A credit link back to autoones.com is appreciated but not required.
They originate from OGRA's official notified prices for Pakistan. We read, verify and store them, then serve them as JSON.
Nothing changes. Prices are frozen on weekends and public holidays, so the endpoint keeps returning the last effective price with its original effective_date.
There is no published hard limit. Please cache responses on your side rather than calling on every page view — the data only changes once a day.