What moves gold

Free Gold Price Widget for Your Website: Live XAUUSD Embed Code

You want a live gold price on your site without signing up for anything or paying for a data feed. You can have it in about two minutes: copy one line of code, paste it into an HTML box, publish. This page gives you the working codes, explains what every number in the widget really is (including one honest catch about the word "spot"), and fixes the problems people run into.

The code, ready to paste

Here is the most common one: the gold price widget in US dollars, as a script. Paste these three lines where the widget should appear and publish.

<script src="https://www.xauusdglobal.com/assets/js/widget.js" data-widget="gold-price" data-currency="USD" data-size="card" data-theme="dark" async></script>
<noscript><p style="font-size:12px;margin:4px 0 0">The live gold widget needs JavaScript.</p></noscript>
<p style="font-size:12px;margin:4px 0 0">Gold data by <a href="https://www.xauusdglobal.com/gold-price/usa/" rel="nofollow noopener">XAUUSD Global</a></p>

What each line does, in plain words:

  • Line 1 loads one small file from our site. That file draws a card 300 pixels wide right where you pasted it, with the gold price per troy ounce, the change since the previous session, and the price per gram for 24K and 22K gold. async tells the browser to carry on loading your page while it fetches the file.
  • Line 2 only shows up for the rare visitor whose browser has JavaScript switched off. It tells them why the box is empty.
  • Line 3 is the credit line. It is plain HTML on your page, and the link carries rel="nofollow", so it passes no search ranking from your site.

If your site builder blocks scripts, use the iframe version of the same widget instead. It shows the same data inside a small window:

<iframe src="https://www.xauusdglobal.com/embed/gold-price/?currency=USD&size=card&theme=dark" width="300" height="250" style="border:0;max-width:100%" loading="lazy" title="Gold price today widget"></iframe>
<p style="font-size:12px;margin:4px 0 0">Gold data by <a href="https://www.xauusdglobal.com/gold-price/usa/" rel="nofollow noopener">XAUUSD Global</a></p>

You do not have to type any of this. The free gold widgets page has a builder: pick the widget, currency, city, size and theme, watch the preview change, and press Copy. It writes both versions for you, with the right credit link for the currency or city you chose.

Every code on this page was pasted, exactly as printed, into a blank test page on 1 December 2026 and opened in a browser, then pasted and checked a second time on a fresh test page. All of them drew their widget with live numbers.

Which gold widget fits your site

There are five current widgets and three older ones. The older ones still work, because other sites already embed them, and their codes are further down.

Widget What a visitor sees Sizes A good fit for
Gold price today (gold-price) Price per troy ounce, change since the last session, per gram 24K and 22K, an “Updated” time Card 300 × 250, small strip 300 × 120 Finance blogs, trading education, news sites, any page that mentions the gold price
Is the gold market open now? (market-open) Open or closed badge, the session running (Asia, London, New York or the overlap), countdown to the next open or close in the visitor’s own time zone Card 300 × 250 Trading blogs, courses, community sites with members in many countries
Gold–silver ratio (gold-silver-ratio) The ratio, gold and silver prices, and where the ratio sits in its one-year range Card 300 × 250 Precious-metals newsletters, investing blogs
Today’s gold levels (gold-levels) The prior COMEX close, the daily pivot, R1, S1 and the 20-day average, marked “Education, not signals” Card 300 × 250 Market commentary, trading education
Gold rate by city (city-gold-rate) 24K and 22K per gram for one city in its local currency Card 300 × 250 Local news and city guide sites
Gold price converter (older) Per gram, 10 grams, tola, ounce and kilogram for 24K, 22K and 18K; visitors pick the currency 100% wide, up to 420 px, 360 tall Pages about gold units and conversions
Gold market hours (older) Sydney, Tokyo, London and New York business hours in the visitor’s time zone, open or closed 100% wide, up to 420 px, 340 tall Pages about trading hours
Gold seasonality (older) Average gold return for each calendar month over the last ten of that month 100% wide, up to 420 px, 400 tall Pages about gold’s calendar patterns

On 1 December 2026 the gold price widget and the converter both offered 65 currencies (the US dollar plus 64 others), and the city widget covered 55 cities. The builder on the widgets page always lists the current set, so check there before you promise a currency to anyone.

Three quick ways to choose:

  1. You write about gold and want a live number beside your words. Use the gold price card. If space is tight, the small 300 × 120 strip shows the ounce price, the day’s change and the 24K price per gram on two lines.
  2. Your readers trade, and they live in different countries. Use the market-open widget. Each reader sees the countdown in their own time zone, which saves you writing “4 pm in London, which is 11 am in New York, which is…” in every post.
  3. Your page is about one city or one country. Use the city widget, or the gold price widget set to that country’s currency.

More codes you can copy as they are

Each of these was tested on the same blank page. Change only the parts the next section explains.

Gold price, small strip, UAE dirham, light theme (iframe):

<iframe src="https://www.xauusdglobal.com/embed/gold-price/?currency=AED&size=small&theme=light" width="300" height="120" style="border:0;max-width:100%" loading="lazy" title="Gold price today widget"></iframe>
<p style="font-size:12px;margin:4px 0 0">Gold data by <a href="https://www.xauusdglobal.com/gold-price/uae-dubai/" rel="nofollow noopener">XAUUSD Global</a></p>

Is the gold market open now? (script):

<script src="https://www.xauusdglobal.com/assets/js/widget.js" data-widget="market-open" data-theme="dark" async></script>
<noscript><p style="font-size:12px;margin:4px 0 0">The live gold widget needs JavaScript.</p></noscript>
<p style="font-size:12px;margin:4px 0 0">Gold data by <a href="https://www.xauusdglobal.com/tools/gold-market-hours/" rel="nofollow noopener">XAUUSD Global</a></p>

Gold–silver ratio (iframe):

<iframe src="https://www.xauusdglobal.com/embed/gold-silver-ratio/?theme=dark" width="300" height="250" style="border:0;max-width:100%" loading="lazy" title="Gold–silver ratio widget"></iframe>
<p style="font-size:12px;margin:4px 0 0">Gold data by <a href="https://www.xauusdglobal.com/tools/gold-silver-ratio/" rel="nofollow noopener">XAUUSD Global</a></p>

Today’s gold levels, light theme (script):

<script src="https://www.xauusdglobal.com/assets/js/widget.js" data-widget="gold-levels" data-theme="light" async></script>
<noscript><p style="font-size:12px;margin:4px 0 0">The live gold widget needs JavaScript.</p></noscript>
<p style="font-size:12px;margin:4px 0 0">Gold data by <a href="https://www.xauusdglobal.com/xauusd-analysis/" rel="nofollow noopener">XAUUSD Global</a></p>

Gold rate in Dubai (iframe):

<iframe src="https://www.xauusdglobal.com/embed/city-gold-rate/?city=dubai&theme=dark" width="300" height="250" style="border:0;max-width:100%" loading="lazy" title="Gold rate by city widget"></iframe>
<p style="font-size:12px;margin:4px 0 0">Gold data by <a href="https://www.xauusdglobal.com/gold-price/uae-dubai/dubai/" rel="nofollow noopener">XAUUSD Global</a></p>

The three older widgets

If your site already shows one of these, leave it alone: the codes keep working. This is the converter code exactly as it has always appeared on the widgets page:

<iframe src="https://www.xauusdglobal.com/embed/gold-converter/" width="100%" height="360" style="border:0;max-width:420px;border-radius:12px" loading="lazy" title="Gold price today widget"></iframe>
<p style="font-size:12px;margin:4px 0 0">Gold data by <a href="https://www.xauusdglobal.com/xauusd-price/" rel="nofollow noopener">XAUUSD Global</a></p>

The other two follow the same pattern. Swap the address and the height:

Older widget Address to put in src Height Credit link points to
Gold price converter https://www.xauusdglobal.com/embed/gold-converter/ 360 /xauusd-price/
Gold market hours https://www.xauusdglobal.com/embed/market-hours/ 340 /tools/gold-market-hours/
Gold seasonality https://www.xauusdglobal.com/embed/gold-seasonality/ 400 /tools/gold-seasonality/

The full code for each, with its credit line, sits under “Our earlier widgets” on the widgets page, with a Copy code button.

Script or iframe: the difference that decides it

Both versions show the same live data. They differ in how they reach your page, and that decides which one your site will accept.

The script is a single file of plain JavaScript with no libraries. When your page loads, it creates a box next to the script line and draws the widget inside it. The widget lives in what browsers call a shadow DOM, a sealed box: your site’s styles cannot leak in and bend it, and its styles cannot leak out and change your page. The credit line stays on your own page as normal HTML.

Use the script when you can. It sizes itself to your column, up to 300 pixels wide, so it never forces a scrollbar on a phone.

The iframe is a window. Your page shows a small page from our site inside a frame you set the size of. Nothing from that frame can touch your page at all, which is why builders that ban scripts still allow it.

Use the iframe on builders that strip or sandbox scripts. Some site builders do this on every plan, some only on their cheaper plans, and so do some email-style editors. Wix is the clearest case: its own help pages say the HTML element in its editor is an iframe, so your code already runs inside a frame there, and our iframe code gives the most predictable result.

One beginner mistake comes up again and again: pasting the script into a builder that removes scripts, seeing an empty space, and deciding “the widget is broken”. The widget is fine; the builder deleted line 1. Try the iframe code in the same spot before anything else.

Where to paste it on your site

Every platform has a box that accepts raw code. The trick is finding it, because a normal text block will show your code as words on the page. Here is the short version for the platforms people ask about most. Our click-by-click platform guide has every step, page builders included.

WordPress (block editor). Open the post or page, click +, search for Custom HTML, paste the code, click Preview, then Update or Publish. For a sidebar on a classic theme go to Appearance → Widgets and add a Custom HTML widget. Some hosted plans remove scripts from posts; if nothing appears, paste the iframe code into the same block.

Wix. Open Add Elements, choose Embed Code, then Embed HTML (Wix lists it under Popular Embeds). Click the new box, choose Enter Code, paste the iframe code, click Apply, and drag the box to the widget’s size (300 × 250, or 300 × 120 for the small strip) so no scrollbar appears. Publish and check the live page, because the editor preview can stay blank.

Squarespace. Edit the page, add a Code block, paste the code, make sure the display is set to HTML, then save and publish. If the script does not show on the published page, switch to the iframe code.

Blogger. Go to Layout, click Add a Gadget in a sidebar or footer, choose HTML/JavaScript, paste the code and save. To put a widget inside one post, switch that post’s editor to HTML view and paste it there.

A plain HTML site. Paste the code anywhere inside your page’s <body> and upload the page. There is nothing to install. You can put several widgets on one page; they share one data download.

Menu names on site builders change from time to time. If you cannot find the option, search your platform’s help pages for “embed HTML”, “custom code” or “iframe”.

Change the currency, size, theme and city

You can change a widget by editing a few words in the code. Script codes use data- settings; iframe codes put the same settings in the address after the ?, joined by &.

What you want Script code Iframe code
Another currency (gold price widget) data-currency="INR" (or AED, SAR, GBP, EUR, MYR and others) ?currency=INR&size=card&theme=dark
Small strip instead of the card data-size="small" size=small, and set height="120"
Light background data-theme="light" theme=light
A different city (city widget) data-city="mumbai" (or london, lagos, riyadh…) ?city=mumbai&theme=dark
A different widget data-widget="market-open" change /embed/gold-price/ to /embed/market-open/

When you change the currency or city by hand, change the credit link too, so it points to the matching page (the builder does this for you). The link is only a credit, so a mismatch does no harm; it is just less useful to a reader who clicks it.

For the older iframe widgets the settings are a little different:

What you want How
Light background Add ?theme=light to the address, for example .../embed/market-hours/?theme=light
Converter opens on a currency Add ?currency=INR (or another listed code). Visitors can still change it inside the widget
Light theme and a currency Join them with &: .../embed/gold-converter/?theme=light&currency=INR
Wider or narrower Change max-width:420px in the style, or the width value
Taller, to remove a scrollbar Raise height by 20 to 40
Square corners Change border-radius:12px to 0

Two details do a quiet but useful job. In the older codes, a width of 100% with a max-width lets the widget fill a narrow phone screen without stretching awkwardly across a wide desktop. And in every widget, old or new, a currency code it does not know falls back to US dollars instead of breaking.

What the price in the widget really is

This part matters if your readers trade, and it is worth two minutes even if they do not.

The gold price widget, the city widget and the “now” line of the levels widget all take their number from a free public real-time gold price feed, read directly by each visitor’s browser. The feed describes its price as spot gold. The widgets label it more carefully: the small print under the gold price card reads “Indicative price, follows COMEX gold futures”, and the first line of the levels widget is labelled “Gold (COMEX futures)”.

That label comes from our own tests. When we compared the feed with futures prices, it was following the front COMEX gold futures contract, which is not quite the same thing as spot:

  • Our records put the start at about 6 November 2026.
  • Between 9 and 25 November there were six days on which we could compare the feed’s 5 pm New York reading with the December 2026 futures price at the same moment. On five of them the two were within $0.60 of each other. By our estimate, true spot should have been roughly $17 to $23 lower on those days.
  • On Friday 27 November the feed’s reading, 3,668.50, equalled that day’s close of the February 2027 contract to the cent. On Monday 30 November it matched February futures at 5 pm exactly again (3,653.20).

The full test, day by day, is in our lesson on the gold futures basis and the roll.

So read the widget’s price as a live indicative price that follows COMEX front-month gold futures. Here is why that is a few dollars, sometimes a few tens of dollars, away from what a bank quotes as spot:

  • A futures contract is gold for delivery later. Its price is roughly spot plus the cost of holding gold until then, mostly interest. That gap is the basis.
  • The basis shrinks as delivery comes closer. These are estimates, worked out from the interest rate the futures curve itself was charging, because we have no independent spot price to measure against: the December 2026 contract carried about $132 over spot at the end of May 2026, about $55 at the end of September, and about $16 on 27 November, with a month left.
  • When the feed moves on to the next contract month, the gap jumps back up. February 2027 closed $28.90 above December 2026 on 27 November 2026.

For a website visitor who wants to know roughly what gold costs today, this does not change much: $20 on a $3,600 ounce is about half a percent. For a trader comparing the widget with their trading platform, it explains a gap that otherwise looks like an error. The widget is an indicative price, never a dealing price, and it should not be used to time an order.

What the other widgets use:

Widget Where its numbers come from How often they change
Gold price, city rate, levels “now” line The free public real-time feed (follows COMEX front-month futures, see above) Read when the widget loads, then every 15 minutes while the page is open
Gold–silver ratio, levels (pivot, R1, S1, average), prior close COMEX gold and silver futures daily data, continuous front month Each time our site republishes its data, normally several times a day
Older converter The same real-time feed when it answers, otherwise the latest COMEX futures price Every 30 seconds while the tab is visible
Seasonality COMEX gold futures month-end closes The bars change once a month, when a month completes
Market open, market hours No price data: calculated from the visitor’s clock with the market’s weekly schedule Every second (market open) or every 30 seconds (market hours)
All currency conversions Daily reference exchange rates from a public exchange-rate service Once a day

Two honest notes on freshness. The ratio widget’s gold and silver prices and the levels are only as fresh as our last data refresh, so they can be a few hours old; the stamp at the foot of the ratio widget shows the time of that data refresh. And for the first hours of a new session the levels widget can still show the previous session’s levels; it prints the session date it belongs to (for example “Session of 1 Dec”), so check that date.

The widget does not go blank when something cannot be reached. If only the price feed fails, the gold price card falls back to the latest COMEX futures price in our data file, and its small print changes to “Indicative price (last COMEX futures data)”. If neither the feed nor our data file can be reached, it shows the numbers saved into the script at our last site build and changes the time stamp from “Updated” to “Cached”. When the connection comes back, it returns to live numbers by itself.

When the market is closed

The main gold market trades from 6:00 pm New York time on Sunday to 5:00 pm on Friday, with a one-hour pause from 5:00 to 6:00 pm on Monday to Thursday. Outside those hours the price in the widget stops moving, because nobody is trading the contract it follows. A visitor on Saturday sees Friday’s last price, which is correct. The market-open widget says “Weekend break” or “Daily pause” in those hours and counts down to the reopening. Neither clock knows about exchange holidays, and the market-open widget says so on its face. The gold market hours tool shows the full weekly schedule in your own time zone, and our guide to whether gold trades at weekends explains the Sunday gap.

Reading the per-gram numbers: a worked example

The per-gram figures are simple arithmetic on the ounce price. Knowing it lets you check any widget, ours included.

A troy ounce is 31.1034768 grams. A tola is 11.6638038 grams. To get a per-gram price you divide the ounce price by 31.1034768 and multiply by the gold’s purity.

Take a real, finished price: the close of the COMEX December 2026 gold futures contract on Friday 27 November 2026, $3,639.60 an ounce in our daily data.

  1. Pure gold per gram: 3,639.60 ÷ 31.1034768 = $117.02.
  2. The gold price widget counts 24K as pure, so its 24K line would read $117.02, and 22K (91.67% gold) $107.27.
  3. The older converter counts 24K as 99.9% and 22K as 91.6%, so it would read $116.90 and $107.19. That is the whole reason the two can differ by about 0.1%: different purity assumptions, not different prices.
  4. One tola of 24K in the converter is 11.6638038 grams at that 99.9% price: $1,363.49. Ten grams of 22K: $1,071.87. One kilogram of 24K: $116,899. The converter prints amounts of 1,000 or more without decimals, so on screen those read $1,363, $1,072 and $116,899.
  5. In another currency the widget multiplies by that day’s exchange rate. At 3.6725 UAE dirhams to the dollar, the rate in our exchange-rate data, the widget’s 24K per gram would read AED 429.74 and its 22K AED 393.94. At 3.75 Saudi riyals to the dollar: SAR 438.81 for 24K.

None of these is what a shop charges. A shop adds VAT or sales tax, import duty, its making charge and its margin, which is why every widget says “Excludes taxes and making charges”. If your visitors need a fuller explanation of grams, tolas and kilos, send them to our guide on gold per ounce versus per gram. For per-gram rates already worked out by city, there is the gold rate by city list.

Reading the levels widget: a worked example

The levels widget shows the daily pivot and the first resistance and support around it, R1 and S1. These come from the classic floor-pivot formula, using the high, low and close of the previous finished session of COMEX gold futures:

  • Pivot P = (high + low + close) ÷ 3
  • R1 = 2 × P − low
  • S1 = 2 × P − high

Here are the levels it showed for the session of Tuesday 1 December 2026, built from Monday 30 November’s bar (high 3,731.3, low 3,634.6, close 3,665.8):

  • P = (3,731.3 + 3,634.6 + 3,665.8) ÷ 3 = 3,677.23
  • R1 = 2 × 3,677.23 − 3,634.6 = 3,719.87
  • S1 = 2 × 3,677.23 − 3,731.3 = 3,623.17

Those are exactly the numbers the widget drew in our browser tests that day. The widget labels them “Education, not signals”, and that label is honest: a pivot is a reference point many chart readers watch, not a reason to buy or sell. Our lesson on pivot points in gold explains how traders use them and where they fail.

Now the catch, on a real day. For the session of Monday 30 November, the widget built its levels from Friday 27 November’s bar, which belonged to the December contract (pivot 3,624.33). But by 30 November the price feed and our daily file had moved to the February contract, which closed $28.90 above December on the 27th. So that Monday the levels sat about $29 too low compared with the price shown above them, through no fault in the arithmetic. It happens about five times a year, on the day the futures series switches contract month. The next day the levels were built from a February bar and lined up again.

If you show the levels widget, this is worth one sentence near it: on contract-switch days, the levels can be off by the gap between the two contract months.

Reading the seasonality widget, and its hidden jump

The older seasonality widget shows, for each calendar month, the average gold return over the last ten times that month came round, with the current month in bold. It is built from COMEX gold futures month-end closes.

Two things help a reader use it properly.

An average hides the spread of outcomes. In the data behind the widget on 1 December 2026, September showed an average of −1.39%, but September rose in only 2 of its last 10 years, with results from +10.16% (2025) to −6.58% (2026). One big year can pull an average a long way. Our study of the best month for gold goes through the medians and the up-counts, which tell you more than the average alone.

The futures series jumps when it changes contract month, and the jump lands in that month’s return. November 2026 is a real case:

Price used 30 Oct 2026 30 Nov 2026 November change
December 2026 contract only 3,898.9 3,637.7 −6.70%
February 2027 contract only 3,930.9 3,665.8 −6.74%
Continuous series (what the widget uses) 3,898.9 (December) 3,665.8 (February) −5.98%

Both contracts fell about 6.7% in November. The continuous series shows −5.98% because on 30 November it switched from December to February, and February traded $28.10 higher that day. About 0.7 percentage points of “November” is that switch, a move nobody traded. The same thing happens whenever the series rolls. Going by its recent pattern that is in the last days of January, March, May, July and November, and if a switch lands a day or two later it falls into the next month instead. In 2026 the July switch (31 July, from the August to the December contract) was about $60, twice the size of November’s. Because the later contract was the dearer one at these switches, they nudge those months up a little. It is one more reason to read the seasonality bars as a rough historical tendency, which is how the widget labels them, and never as a forecast.

Speed, privacy and safety

Website owners usually ask three questions before pasting someone else’s code. Here are straight answers.

Will it slow my page down? The script is about 19 KB, under 8 KB once compressed for the trip, and loads with async, so your own content never waits for it. Once it runs, it downloads our data file, roughly 70 KB compressed (both measured on 1 December 2026), which the browser keeps for five minutes and which all widgets on the page share. The iframe version adds loading="lazy", a standard browser feature that waits until the visitor scrolls near the widget before loading anything. If our site is slow or down, your page still loads normally.

What does it do with my visitors’ data? The script sets no cookies, keeps nothing in the browser’s storage and runs no analytics. It does make two kinds of request from the visitor’s browser: to our site for the data file, a small file of recent closing prices and the style sheet, and to the free public price feed for the latest gold price. The iframe version makes the same requests from inside its frame. Like any web request, those reach the other server with the visitor’s IP address. If your privacy notice lists the outside services your pages call, add these two; the feed’s address is in plain sight in the script file, so you can see exactly which host is called.

Can it break my design? No. The script draws inside its own sealed box (shadow DOM), so your styles and ours never mix, and the iframe is fully separate by design. The title in the iframe code tells screen-reader users what the frame contains; keep it.

When something goes wrong

What you see Likely cause Fix
Nothing at all The platform removed the script Use the iframe code instead
The code shows up as text on the page Pasted into a normal text or paragraph block Use a Custom HTML, Code, Embed or HTML/JavaScript block
A blank box in the editor, fine when published The editor does not run embeds Check the published page
A scrollbar inside the widget The frame or embed box is smaller than the widget Set it to 300 × 250 (300 × 120 for the small strip); for the older widgets raise height by 20 to 40
Widget too wide in a sidebar A fixed width in the code Use width="100%" with a max-width, or the 300-pixel script version
Wrong currency data-currency missing or misspelled Use a three-letter code such as INR or AED
“Cached” beside the time The visitor’s browser could reach neither our data file nor the price feed Nothing to fix; it switches back to live numbers by itself
The price differs from a trading platform The widget follows COMEX futures; the platform quotes its own spot price Expected; see “What the price in the widget really is” above
The platform strips all embeds The plan blocks custom HTML or iframes Check your platform’s plan; some free plans limit embeds

Need a custom size, another currency or a city that is not on the list yet? Email info@xauusdglobal.com.

For developers: is there a gold price API?

People searching for a “free real-time gold price API with CORS for JavaScript” sometimes land here, so a straight answer.

We do not offer a public API. Our data files can be read by other websites (the server sends the CORS header that allows it) only so that the widget script can run on any domain. The widgets’ terms ask you not to poll those files from servers, bots or apps, not to resell them and not to present them as your own feed, and abusive traffic may be blocked. The supported way to show our live gold price with JavaScript is the one-line widget script above.

If you need raw prices inside your own program, use a provider that publishes an API with written terms of use. Before you build on it, check one thing this page has shown is easy to miss: whether its “spot” price is really spot, or a futures price with a spot label. Compare it at the same minute with a front-month futures quote; if the two sit within a few cents of each other day after day, it is following the futures.

On a phone: is there an XAUUSD widget for Android?

Not as an app. These widgets are made to sit inside web pages, and we do not publish a phone app or a home-screen widget. The nearest thing on an Android phone: open our live XAUUSD price page in your browser, open the browser’s menu and choose Add to Home screen. You get an icon that opens the live price in one tap. Every widget on this page also works on phone screens when it is embedded in a website.

If your readers want more than a number, point them to plain-English explainers such as what XAUUSD is and what moves gold prices.

Sources

Educational content only, not financial advice. Trading gold with leverage carries a high risk of loss.

Frequently asked questions

Is there a free gold price widget for websites?

Yes. XAUUSD Global offers free live gold widgets for any website: the gold price per ounce and per gram in dozens of currencies, an ‘is the gold market open now’ badge with a countdown, the gold–silver ratio, the day’s gold reference levels, and a city gold rate. You copy one line of code from the free gold widgets page and paste it into your site. There is no sign-up, no API key and no fee.

How do I add a gold price widget to WordPress?

In the WordPress block editor, click + where the widget should go, add a Custom HTML block, paste the script code from the free gold widgets page, then preview and publish. For a sidebar on a classic theme, go to Appearance, Widgets and add a Custom HTML widget with the same code. If your plan strips scripts, paste the iframe code instead.

Can I show the gold price in Indian rupees, dirhams or another currency?

Yes. In the script code change data-currency to a three-letter code such as INR, AED, SAR, GBP, EUR or MYR. In the iframe code change currency= in the address. The builder on the widgets page lists every currency it supports. On the older converter widget, add ?currency=INR (or another code) to the end of its address; visitors can still switch currency inside it.

Is the widget price the spot gold price?

Treat it as a live indicative price that follows COMEX gold futures. The number comes from a free public feed that calls itself spot, but our checks found that since early November 2026 it has followed the front COMEX futures contract, which trades above true spot by the cost of carrying gold to delivery. By our estimate that gap was about $16 to $23 an ounce in the second half of November 2026, and it is larger when delivery is months away.

Will a gold widget slow down my website?

Not noticeably. The script loads with async, so it never holds up your own page, and the iframe version uses loading=”lazy”, so it loads only when a visitor scrolls near it. All widgets on one page share a single data download of roughly 70 KB compressed. If our site is ever slow or down, your page still loads; when the widget can reach neither our data file nor the price feed, it shows its last saved numbers marked Cached.

Do I need to update the widget myself?

No. The gold price is read from the live feed when the widget loads and again every 15 minutes while the page stays open. The futures data behind the ratio, levels and seasonality are refreshed each time our site republishes its data, normally several times a day. Exchange rates change once a day, and the market-open countdown ticks every second from the visitor’s own clock.

Can I use the gold widgets on a commercial website?

Yes. They are free for personal and commercial sites, blogs, shops, newsletters and education sites. The only condition is that the small ‘Gold data by XAUUSD Global’ credit line stays visible. Please do not call our data files from servers, bots or apps; the widgets are for web pages.

Is there a free gold price API with CORS for JavaScript?

We do not offer a public API. The supported way to show our live gold price with JavaScript is the one-line widget script, which works on any domain. Our data files answer requests from other websites only so the widgets can run there; please do not poll them from your own code. If you need raw prices in your own program, use a provider that publishes an API with written terms, and check whether its ‘spot’ price is really spot.

Is there an XAUUSD widget for Android phones?

Not as an app. These are website widgets, and we do not publish a phone app or a home-screen widget. On an Android phone you can get close: open the live XAUUSD price page in your browser, open the browser menu and choose Add to Home screen. That gives you a one-tap shortcut to the live price.

Can I remove the 'Gold data by XAUUSD Global' line?

Please keep it visible. It is the only thing asked in return for the free widget. The link is marked nofollow, so it passes no search ranking from your site, and you may set it however your own link policy requires. You can still change the size and choose the light or dark theme.