Free · no signup · no API key

Free Gold Price Widget for Your Website

Add a live gold spot price to your site with one iframe. Choose from 31 currencies, gram or troy ounce, eight karats, three themes, and seven languages.

Configure your widget

Live preview
Embed code
<iframe src="https://goldprice.dev/embed/xau?currency=USD&unit=oz&karat=24&theme=auto&locale=en" title="Live gold price" width="360" height="190" loading="lazy" style="border:0;width:100%;max-width:360px" referrerpolicy="strict-origin-when-cross-origin"></iframe>

Install

Paste one iframe

The widget is hosted by goldprice.dev. Your page loads the card in an isolated iframe, so its styles cannot clash with your site and no browser-side API key is exposed.

HTML

Paste the generated iframe where you want the price card to appear.

<iframe src="https://goldprice.dev/embed/xau?currency=USD&unit=oz&karat=24&theme=auto&locale=en" title="Live gold price" width="360" height="190" loading="lazy" style="border:0;width:100%;max-width:360px" referrerpolicy="strict-origin-when-cross-origin"></iframe>

WordPress

Add a Custom HTML block, paste the iframe, then preview and publish.

Webflow

Drag an Embed element onto the canvas and paste the iframe code.

React / Next.js

Return the iframe as JSX. Rename referrerpolicy to referrerPolicy and convert the style string to a style object.

Reference

Widget options

ParameterValuesDefaultMeaning
currencyUSD, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TRY, ZARUSDQuote currency for the displayed gold price.
unitoz, gramozShow the price per troy ounce or per gram.
karat24, 22, 21, 20, 18, 16, 14, 1024Gold purity used when unit=gram.
themeauto, light, darkautoLight, dark, or the visitor's system preference.
localeen, ar, es, id, ja, ko, zhenNumber, timestamp, direction, and label language.

Price meaning

Spot reference, not a checkout quote

The displayed number is derived from XAU/USD spot and, for non-USD currencies, the current USD exchange rate. Gram values divide a troy ounce by 31.1034768; karat values apply the selected purity ratio.

Dealer premiums, making charges, taxes, shipping, and local retail spreads are not included.

Read the price methodology →

License

Free with visible attribution

Personal and commercial websites may use the official widget without charge or signup. Keep the iframe unmodified and the visible Powered by goldprice.dev link intact.

White-label or modified presentation rights require a separate Enterprise agreement.

Read the Official Widget License →

Freshness & availability

Cached for 60 seconds

The source price is refreshed upstream, the iframe response is cached for 60 seconds, and an open widget refreshes itself on the same cadence while its tab is visible. The card shows the source timestamp and marks delayed data. If pricing is unavailable, it shows a clear unavailable state instead of a fabricated number.

Security

No secret in the browser

The widget makes no authenticated request from your page. Its iframe isolation prevents widget CSS or scripts from reaching the host page. Use the exact HTTPS URL produced above; do not proxy the iframe or copy its internal markup.

Troubleshooting

If the widget does not appear

  • Use a Custom HTML or Embed element; rich-text editors often remove iframe markup.
  • Allow frames from https://goldprice.dev in your site's Content Security Policy.
  • Keep the iframe at least 320 px wide and 190 px high; the supplied CSS remains responsive below the maximum width.
  • Check the generated URL directly in a browser to separate host-page restrictions from data availability.

FAQ

Gold price widget questions

  • Is the gold price widget free?
    Yes. The official branded widget is free for personal and commercial websites. It requires no account or API key. Keep the iframe unmodified and its Powered by goldprice.dev link visible.
  • Can I remove the goldprice.dev attribution?
    Not from the free official widget. White-label or modified presentation rights are available under a separate Enterprise agreement.
  • How often does the widget update?
    The widget refreshes itself every 60 seconds and reads the current spot-derived gold price through goldprice.dev. Its visible timestamp tells visitors when the source row was computed.
  • Does the widget show retail jewelry or dealer prices?
    No. It shows a spot-derived reference price. Dealer premiums, making charges, taxes, shipping, and local retail spreads are excluded.
  • Does it expose an API key in my page source?
    No. The iframe is hosted by goldprice.dev and fetches data server-side, so your site does not ship or expose an API credential.
  • Can I use it in WordPress or Webflow?
    Yes. Paste the iframe into a WordPress Custom HTML block or a Webflow Embed element. Any site builder that accepts iframe HTML can use it.