autoones
UsedNewAuction SheetSpare Parts
Tools
Petrol Prices
Post an Ad
  • Used Cars
  • Used Bikes
  • Used Trucks
  • Used Buses
  • Used Vans
  • Used Rickshaws
  • Used Tractors
  • Used Machinery
  • New Cars
  • New Bikes
  • New Trucks
  • New Buses
  • New Vans
  • New Rickshaws
  • New Tractors
  • New Machinery
  • Auction Sheet Verification
  • Petrol Prices
  • Blog
  • Featured Vehicles
  • Used Spare Parts
  • New Spare Parts
  • Post an Ad
  • Saved Cars
  • About Us
  • Our Mission
  • Our History
  • Our Authors
  • Our Data Sources
  • Write for Us
  • Support
  • FAQ
  • Glossary
  • System Status
  • Changelog
  • Transparency
  • Privacy Policy
  • Cookie Policy
  • Cookie Settings
  • Your Data Rights (GDPR)
  • Terms of Service
  • Acceptable Use
  • Refund Policy
  • Money-Back Guarantee
  • Disclaimer
  • DMCA & Copyright
  • Accessibility
  • Trust & Safety
  • Security Disclosure
  • Anti-Fraud Policy
  • Editorial Policy
  • Methodology
  • Corrections
  • Advertising
© 2026 AutoOnes. All rights reserved.
HomeSearchPostSavedAccount
autoones
Home/Petrol Prices/Fuel Prices API

Free Fuel Prices API for Pakistan

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.

No key requiredCORS enabledUpdated nightlyCommercial use OK

Quick start

Paste this in your browser address bar and you will see the response straight away.

GET https://api2.autoones.com/api/fuel-prices

Endpoint 1 — current 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

Response

{
  "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"
    }
  ]
}

Fields

FieldTypeMeaning
fuelstringDisplay name, e.g. Petrol
slugstringUse this in the history endpoint: petrol or diesel
price_pkrnumberPrice in Pakistani rupees per litre
change_pkrnumber or nullRupee change versus the previous notified price
effective_datedateThe date this price took effect (YYYY-MM-DD)
price_updated_atdatetimeWhen our system last wrote this record

Endpoint 2 — price history

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

Parameters

ParameterDefaultAccepted values
fuelpetrolpetrol, diesel
viewdailydaily, monthly, yearly
limit301 to 400

Daily response

{
  "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" }
  ]
}

Monthly and yearly response

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" }
  ]
}

Code examples

JavaScript

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
  });

PHP

$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;
}

Python

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"])

Terms of use

  • Free forever. No key, no signup, no paid tier, personal or commercial.
  • Credit is appreciated, not required. A link back to autoones.com helps us keep it running.
  • Please cache on your side. The price changes once a day, so there is no need to call us on every page view.
  • No warranty. We serve this data as-is and cannot guarantee it is error-free or uninterrupted.
  • Verify before you rely on it. For anything financial or legal, check the official OGRA notification or the pump.

Where the data comes from

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.

Frequently asked questions

Is the fuel prices API really free?

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.

Do I need an API key or account?

No. Both endpoints are open GET requests. Call them from a browser, a server, a mobile app or a spreadsheet.

How often does the data update?

Prices are checked automatically every night after OGRA issues its notification. The current endpoint is cached for 5 minutes and history for 10 minutes.

Can I use it in a commercial product?

Yes. There is no restriction on commercial use. A credit link back to autoones.com is appreciated but not required.

Where do the prices come from?

They originate from OGRA's official notified prices for Pakistan. We read, verify and store them, then serve them as JSON.

What happens if OGRA does not announce a new price?

Nothing changes. Prices are frozen on weekends and public holidays, so the endpoint keeps returning the last effective price with its original effective_date.

Is there a rate limit?

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.