Quick answer
A gold price widget shows the live gold price on any website with no API key and no sign-up: currently $3,599.65 per troy ounce. Paste in one iframe or one script tag and the figure then refreshes by itself, follows light and dark mode, and carries a link back to the source so a reader can check the number.
Live preview
These are not screenshots. Each preview below is the actual widget document served by this site and updating on its own — exactly what a visitor to your page would see.
Get the code
Copy a snippet and paste it anywhere you can edit HTML. Nothing to sign up for, no API key, and no cookie or tracking script is loaded on your page.
Option 1 — an iframe card
Option 2 — a script tag
Options
Everything the widgets accept. Anything you leave out falls back to the default.
Please keep the attribution
The widgets may be used on any site, free of charge, provided the attribution link stays intact — it is how readers can check the figure against its source. Stripping or hiding the link is not permitted, and neither is presenting the figures as your own data. Bulk redistribution of the underlying price series is a separate matter; see the terms of use.
Source: gold-api.com (feed details). Daily history is reconstructed from Yahoo Finance (COMEX front-month futures) (source) and aligned to the live spot price. Reference price for one troy ounce of fine metal, as of . Not a dealer quotation. How this is produced.
Good to know
An iframe and a script tag do different jobs
An iframe renders a document of its own, so your stylesheet cannot clash with it and the credit line sits inside the frame. The script tag draws the card into your own markup, which makes that credit line a real link on your page.
One line, no API key
The widgets need no account, no key and no configuration. The price comes from the same published feed this site uses, and nothing loaded on your page reaches a third party.
Light and dark mode are handled for you
Each widget follows the reader's system colour scheme by default, so a card on a dark page stays legible. Pin it with ?theme=dark or ?theme=light if the background never changes.
Keep the credit link
The link on each card is how a reader checks the figure against its source. Anyone may embed the widgets free of charge, but the attribution may not be removed or hidden.
A gold price widget and a silver price widget are the two things most visitors here actually want: a small, live figure to drop into a blog post, a sidebar or a forum profile. This page gives both away in two forms. The gold price today widget is a self-contained iframe, so no rule in your stylesheet touches it and none of its rules reach yours, while the script widget draws the same card into your own markup — which is usually what matters if the link matters as much as the number.
The figures come from the same feed as the rest of the site, so a widget can never disagree with the page it points at: the price per troy ounce, the price per gram and the day's change are the numbers published on silver price today and on the gold and silver price page. The paired widget adds the gold-to-silver ratio next to both metals, and a slim bar variant fits a page header or a narrow sidebar.
If you would rather work with the numbers than show them, the tools index has the value calculators and the trend indicator, and the history behind every widget is on gold price history. These are market reference prices rather than dealer quotations, which is precisely why the credit link should stay where it is.
Embeddable price widgets: questions
Can I put a live gold price on my website for free?
Yes. Copy the iframe or the script snippet from this page and paste it into any HTML you control. There is no account, no API key and no sign-up, and the widget refreshes on its own once a minute. The one condition is that the credit link stays intact, so readers can check the figure against its source.
What is the difference between the iframe widget and the script widget?
The iframe widget loads a small document of its own, so no rule in your stylesheet can affect it and none of its rules reach yours; it works with JavaScript disabled. The script widget draws the card directly into your page, which makes the credit line a real link in your own HTML, but the card only appears if JavaScript runs.
How often do the embedded prices update?
The widget refreshes once a minute while the page is open, and every time the page is loaded. It shows the same reference price as this site, with the per-ounce figure, the per-gram equivalent and the day’s change taken from the same feed.
Can I embed silver, or both metals at once?
Yes. The script widget takes data-metal="gold" or data-metal="silver" and shows one metal. The iframe widget has a gold-silver variant that shows both metals side by side with the gold-to-silver ratio.
Will the widget match a dark-themed site?
Yes. Each widget follows the reader’s system colour scheme by default, so a card on a dark page stays legible without any work from you. Pin it with ?theme=dark or ?theme=light on an iframe URL, or data-theme="dark" on a script tag, if the background never changes.
Do I need an API key or permission to use the price data?
No key is required for the widgets themselves — they read the published price feed directly. Permission is only needed for bulk redistribution of the underlying series, which is a separate arrangement; see the terms of use. Presenting the figures as your own data is not permitted either way.