To get silver prices in Power BI, use Power Query M to call https://api.goldprice.dev/v1/spot/XAG-USD-SPOT with your goldprice.dev API key in the X-API-Key header. The response gives silver in USD per troy ounce. Free includes 5,000 calls a month with prices delayed by 15 minutes; paid plans are live. Publish your report, configure credentials, and schedule refresh to bring new prices into your report.
Get your goldprice.dev API key
Create a free account at goldprice.dev/onboarding and copy your API key. You will paste it into the query below.
Free includes silver spot in USD, 5,000 calls a month, and 10 requests a minute. Prices are delayed by 15 minutes. No credit card is required.
Open Power Query in Power BI Desktop
In Power BI Desktop, select Home → Transform Data to open Power Query Editor. Select Home → New Source → Blank Query, then View → Advanced Editor.
You will use Power Query M to request the silver price and turn the response into a table.
Paste the SilverPrice M query
Replace the editor contents with the query below. Paste your key into ApiKey, select Done, and name the query SilverPrice.
Keep the fixed base URL and RelativePath structure for refresh setup. The query reads the price string as a number and leaves missing bid or ask values empty. Bid and ask appear only on plans that include them.
// power-bi: Power Query M query "SilverPrice"// curl-equivalent: https://api.goldprice.dev/v1/spot/XAG-USD-SPOT// Replace ApiKey with your goldprice.dev key from /onboardinglet ApiKey = "ga_live_replace_with_your_key_here", Symbol = "XAG-USD-SPOT", Source = Json.Document( Web.Contents( "https://api.goldprice.dev", [ RelativePath = "v1/spot/" & Symbol, Headers = [#"X-API-Key" = ApiKey], ManualStatusHandling = {401, 429} ] ) ), Result = #table( {"field", "value"}, { {"symbol", Source[symbol] & "-" & Source[quote_currency]}, {"price", Number.FromText(Source[price], "en-US")}, {"bid", if Record.HasFields(Source, "bid") and Source[bid] <> null then Number.FromText(Source[bid], "en-US") else null}, {"ask", if Record.HasFields(Source, "ask") and Source[ask] <> null then Number.FromText(Source[ask], "en-US") else null}, {"computed_at", Source[computed_at]}, {"is_stale", Source[is_stale]} } )in ResultPublish and configure scheduled refresh
Save the report and select Home → Publish. In the Power BI Service, open your semantic model settings. Under Data source credentials, choose Anonymous for https://api.goldprice.dev. The query sends your API key in its header.
Configure Scheduled refresh using the options available for your account and workspace. Run a refresh and check that it succeeds. Each report refresh retrieves the price available on your goldprice.dev plan.
Switch metal or convert silver to another currency
For another metal, change Symbol in the main query. The example below calls the same endpoint pattern for silver, gold, and copper. Silver and gold prices are per troy ounce. Copper is per pound.
Silver spot symbols exist only in USD. For silver in EUR per gram, use /v1/convert?from=XAG&to=EUR&amount=1&unit=gram in a separate query. Conversion supports oz, gram, and kg; its response needs separate table mapping.
Conversion works without a key, with prices delayed by 15 minutes and a limit of 100 requests an hour per IP. See the API reference for the response fields.
let ApiKey = "ga_live_replace_with_your_key_here", GetSpot = (Symbol as text) => Json.Document( Web.Contents( "https://api.goldprice.dev", [ RelativePath = "v1/spot/" & Symbol, Headers = [#"X-API-Key" = ApiKey], ManualStatusHandling = {401, 429} ] ) )in [ // Silver, USD per troy ounce Silver = GetSpot("XAG-USD-SPOT"), // Gold, USD per troy ounce Gold = GetSpot("XAU-USD-SPOT"), // Copper, USD per pound Copper = GetSpot("HG-USD-SPOT") ]Expected output
{ "symbol": "XAG", "quote_currency": "USD", "unit": "troy_ounce", "contract_type": "spot", "price": "53.89", "is_stale": false, "computed_at": "2026-10-23T07:00:18.221118+00:00"}The JSON shows an example API response. The main query turns it into a field/value table. For a price card, create a reference query, filter field to price, and set value to a decimal numeric type. Keep computed_at and is_stale available so viewers can check the timestamp and stale flag.
Common errors
| Code | What you see | Fix |
|---|---|---|
| 401 | The API rejects the key, or refresh reports The credentials provided for the Web source are invalid | Check that ApiKey contains a valid goldprice.dev key. In the Service, open Data source credentials and choose Anonymous for https://api.goldprice.dev. The key belongs in the query header. If you change the key in Desktop, publish the updated report. |
| 429 | Refresh fails with 429 Too Many Requests | Check both your request rate and monthly usage. Free allows 10 requests a minute and 5,000 calls a month. Other queries, previews, and retries can also make requests. Reduce overlapping refreshes and retry after the limit allows requests again. Compare plan limits at /pricing. |
| N/A | Desktop refresh works but Service refresh fails with Please specify how to connect | Check the published query and Service credentials. Keep https://api.goldprice.dev as the fixed first argument to Web.Contents, with the endpoint in RelativePath, as shown above. Set the source credentials to Anonymous, publish any query changes, and try refresh again. |
Going further
- Build a metal scorecard with separate queries for silver, gold, and copper. Show the currency and unit on each card.
- Move
ApiKeyinto a Power Query parameter so you can update it without editing the request code. - Display
computed_atbeside the silver price and useis_staleto flag stale responses. - Add a separate silver conversion query for another currency or unit. Map its response using the API reference.
- Review refresh frequency and account usage together so report queries stay within your plan limits.