To get silver prices in n8n, import the goldprice.dev workflow and set its HTTP Request URL to https://api.goldprice.dev/v1/spot/XAG-USD-SPOT. Create a Header Auth credential with X-API-Key as the header name, then select it in the node. Run the workflow manually before enabling its hourly schedule. Silver spot is quoted in USD per troy ounce. Free prices are 15 minutes late; paid plans are live.
Get your goldprice.dev API key
Create a free account at goldprice.dev/onboarding and copy your API key. Store it in n8n credentials when you reach the Header Auth step.
Free includes silver spot in USD, 5,000 calls a month, and 10 requests a minute. Prices are 15 minutes late. No credit card is required.
Import the workflow and set the silver URL
**Download the hourly n8n workflow JSON**, then choose Import from File in n8n.
Open the HTTP Request node. Set its URL to https://api.goldprice.dev/v1/spot/XAG-USD-SPOT and name it Get silver price. Keep the workflow inactive while you attach your credential and check the output.
Create and attach Header Auth
Create an n8n Header Auth credential. Set Name to X-API-Key and Value to your goldprice.dev key.
Open Get silver price, choose Generic Credential Type → Header Auth, and select your credential. Keep the key in the credential rather than entering it directly in the URL or node headers.
{ "parameters": { "url": "https://api.goldprice.dev/v1/spot/XAG-USD-SPOT", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "options": { "response": { "response": { "neverError": false, "responseFormat": "autodetect" } }, "timeout": 5000 } }, "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "retryOnFail": true, "maxTries": 3, "waitBetweenTries": 2000, "onError": "continueErrorOutput"}Run it once and inspect the output
Click Execute Workflow. Confirm that Get silver price returns price, computed_at, and is_stale. The price is a string in USD per troy ounce. Bid and ask appear only on plans that include them.
Check the timestamp and stale flag before using the price. Fix any credential error, then publish the workflow to enable its hourly schedule.
Switch metal or convert silver
For multiple metals, create the input items below and use https://api.goldprice.dev/v1/spot/{{ $json.symbol }} in the HTTP Request node. Silver and copper spot symbols exist only in USD. Copper is priced per pound; silver and gold are priced per troy ounce.
For silver in euros per gram, use /v1/convert?from=XAG&to=EUR&amount=1&unit=gram. Conversion supports oz, gram, and kg. See the API reference.
// One input item per metal[ // Silver: USD per troy ounce { "symbol": "XAG-USD-SPOT" }, // Gold: USD per troy ounce { "symbol": "XAU-USD-SPOT" }, // Copper: USD per pound { "symbol": "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-08-18T08:00:00Z"}The HTTP Request output panel shows the silver response. Read fields with expressions such as {{ $json.price }} and {{ $json.computed_at }}. Prices arrive as strings and may contain decimal places. Use a decimal type for calculations.
Common errors
| Code | What you see | Fix |
|---|---|---|
| 401 | HTTP Request node returns 401 Unauthorized | The API key is missing or invalid. Check your key in your dashboard, update the Header Auth credential, and select it under Generic Credential Type → Header Auth in the HTTP Request node. |
| 429 | The error output receives 429 Too Many Requests | Check request frequency and monthly usage across workflows sharing your key. Free allows 10 requests a minute and 5,000 calls a month. Slow the schedule if requests are too frequent. Check your quota and plan limits before retrying. |
| N/A | Exported workflow JSON contains the API key | Remove the key from the URL or inline header field. Store it in a Header Auth credential and select that credential in the HTTP Request node. Check the exported JSON before sharing it. |
| N/A | The manual run works but the hourly workflow never runs | Check whether the workflow is published. The imported workflow starts inactive. After a successful manual run, publish it so the Schedule Trigger can run the workflow. |
Going further
- Store silver prices with
computed_atandis_stalein Postgres - Use a decimal comparison to check the silver price against your threshold before sending an alert
- Loop over input items to track silver, gold, and copper, keeping each metal's currency and unit
- Connect the error output to an alert node so request failures are visible