Developer data

Pakistan Gold, Silver & Exchange Rate Data (JSON)

Small public JSON files with the daily estimated gold and silver price per tola and PKR exchange rates. Free to use with a link back, no key needed.

Please read: these are estimates, updated once a day, with no uptime guarantee. They are not official quotes. Show the "estimate" wording wherever you display them.

Files

FileContentsFields in each history entry
/data/gold.jsonGold, 24 karatd date, oz USD per troy ounce, usd USD to PKR used, t24 PKR per tola (24K)
/data/silver.jsonSilverd date, oz USD per troy ounce, usd USD to PKR used, tola PKR per tola
/data/rates.jsonPKR exchange ratesUnder history, one list per currency (USD, GBP, EUR, AED, SAR, CAD, AUD, QAR). Each entry has d date and r PKR per 1 unit

Each file also has updated (date of the last refresh) and source (the public feeds used). 22 karat gold is 22 divided by 24 of the 24 karat figure.

Examples

JavaScript

fetch('https://gmtoolshub.com/data/gold.json')
  .then(r => r.json())
  .then(d => {
    const last = d.history[d.history.length - 1];
    console.log(last.d, 'Gold 24K per tola: Rs', last.t24);
  });

Python

import requests
d = requests.get('https://gmtoolshub.com/data/rates.json', timeout=15).json()
usd = d['history']['USD'][-1]
print(usd['d'], 'USD to PKR:', usd['r'])

Terms of use

  • Free for websites, apps and personal projects.
  • Show a visible link to gmtoolshub.com where you display the figures.
  • Keep the wording that the figures are estimates. Do not present them as official or live quotes.
  • Cache the data. Do not call the files more than a few times a day from the same app.
  • No warranty. The data, its format and its availability may change.

Prefer a ready-made box?

Use the free live rates widget with one line of code. For a branded version or a custom feed, contact us and agree terms in writing first.

Frequently asked questions

Is the data free to use?

Yes, for websites, apps and personal projects, as long as you show a visible link to gmtoolshub.com where you display the figures and keep the "estimate" wording. There is no API key and no sign-up.

How often is it updated?

Once a day by an automated job. The files hold a short daily history. It is not a real-time or tick-by-tick feed.

Are the numbers official?

No. Gold and silver are estimates from international prices converted to rupees per tola, and exchange rates come from a public feed. They are not a jeweller, bullion association or bank quote.

Is there an uptime guarantee?

No. The files are served by a static host and may change or stop. Please cache the data and handle errors in your code. If you need agreed limits, a stable address or a custom feed, contact us and we can discuss it in writing.

Can I request more currencies or fields?

Yes, send a request through the contact page. We add things only when we can maintain them reliably.