Saudi Arabia · Saudi riyal
Gold rate widget and open JSON
There are two ways to show today's Saudi gold rate on your own website: paste our widget into a page, or read the same figures from an open JSON file at /api/prices.json. Both carry the rates published on aisear-aldhahab.com and change every 5 minutes.
What the widget shows
The widget is a small table with the rate per gram in Saudi riyals for 24K, 22K, 21K and 18K gold, and the date and time of the last update. It takes its figures from our server each time your page is opened, so you have nothing to maintain after pasting the code.
Embed code
Copy the code and paste it into your page's HTML at the place where the widget should appear.
<iframe src="https://aisear-aldhahab.com/en/widget/embed/" width="380" height="330" title="Gold rate in Saudi Arabia today" loading="lazy" style="border:0"></iframe>Open JSON
If you would sooner build your own display, request /api/prices.json. The file needs no key or registration and returns the current figures in JSON, including the time of the last update.
| Field | What it holds | Example value |
|---|---|---|
ts | Update time, Unix timestamp | 1794384000 |
updated | Update time, Riyadh time | 14:35 |
usd_sar | USD to SAR rate used in the calculation | 3.75 |
spot.usd_oz | Ounce price in US dollars | 4058.30 |
spot.prev_close | Yesterday's ounce close in US dollars | 4039.90 |
spot.open / spot.high / spot.low | Today's ounce open, high and low in US dollars | 4041.00 |
gram.24k.buy | 24K gram, buy, in SAR | 489.29 |
gram.24k.sell | 24K gram, sell estimate, in SAR | 479.50 |
gram.24k.prev | 24K gram at yesterday's close | 487.07 |
gram.22k / gram.21k / gram.18k | The same fields for 22K, 21K and 18K | … |
spread_pct | Gap between buy and sell, percent | 2.0 |
used_discount_pct | Old gold discount, percent | 3.0 |
vat_pct | VAT rate | 15 |
market_open | Whether the world market is open | true |
What the numbers are
The widget and the JSON carry the figures you see on the site, produced by the same calculation: the international rate per ounce, converted to riyals at 3.75 and divided down to a gram of each carat. They are the value of the metal. They contain no making charge and no VAT, and they are not quotes from any shop. If your page shows them, it helps your readers to keep the update time next to the rate. The methodology page describes the source and each step.
How often to request the data
The figures are recalculated every 5 minutes, so asking for the file more often than that returns the same data. At the weekend, when the international market is shut, the file keeps the last rate until trading resumes.
Questions from site owners
Are the rates in the widget shop prices?
No. They are calculated from the international rate and show what the gold alone is worth per gram. A shop's price adds a making charge and VAT.
How fresh is the rate my visitors see?
No older than 5 minutes while the market is trading, plus the supplier's delay of up to 30 seconds. The update time shown in the widget tells them exactly.