How to get live gold prices in n8n

Import a credential-free n8n workflow for hourly gold prices, then attach your API key securely.

Updated

To automate live gold prices in n8n, import the credential-free goldprice.dev workflow JSON, create a Header Auth credential named X-API-Key, and attach it to the HTTP Request v4.2 node. The inactive workflow calls api.goldprice.dev/v1/spot/XAU-USD-SPOT once per hour through Schedule Trigger v1.2. Hourly execution is about 720 calls in a 30-day month, within the Free tier's 1,000 calls/month. Publish it only after one successful manual run.

  1. 1.Get your goldprice.dev API key

    Sign up for a free account at goldprice.dev/onboarding. Your dashboard shows a key starting with ga_live_. You will store it in n8n credentials in the next step — never paste it inline into a node.

    The free tier includes 1,000 calls/month and 31 supported currencies. No credit card required.

    Get your free API key1,000 calls/mo, no credit card
    Sign up free →
  2. 2.Import the credential-free workflow

    Download the hourly n8n workflow JSON, then choose Import from File in n8n. It contains Schedule Trigger v1.2 and HTTP Request v4.2 nodes, is inactive by default, and contains no API key or credential binding.

  3. 3.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 gold price, choose Generic Credential Type → Header Auth, and select that credential. Keeping the secret in n8n credentials prevents it from appearing in exported workflow JSON.

    JSON · n8n · HTTP Request node excerpt
    {
      "parameters": {
        "url": "https://api.goldprice.dev/v1/spot/XAU-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"
    }
  4. 4.Run it once and inspect the output

    Click Execute Workflow. Confirm that Get gold price returns price, bid, ask, computed_at, and is_stale. Fix any credential error before publishing. When the manual run succeeds, publish the workflow to enable the hourly schedule.

  5. 5.Switch currency or metal

    Edit the final URL segment in Get gold price. Symbols use METAL-CURRENCY-SPOT. For multiple symbols, create input items and use https://api.goldprice.dev/v1/spot/{{ $json.symbol }} in the HTTP Request node.

    JSON · n8n · multi-currency input items
    // SplitInBatches input — one item per currency
    [
      { "symbol": "XAU-USD-SPOT" },
      { "symbol": "XAU-INR-SPOT" },
      { "symbol": "XAU-EUR-SPOT" },
      { "symbol": "XAG-USD-SPOT" }
    ]
    
    // INR — Indian gold market (largest retail gold-search globally)
    // EUR — European pricing surfaces

Expected output

The API returns this shape:

JSON · GET /v1/spot/XAU-USD-SPOT
{
  "symbol": "XAU",
  "quote_currency": "USD",
  "unit": "troy_ounce",
  "contract_type": "spot",
  "price": "4826.40",
  "bid": "4825.91",
  "ask": "4826.89",
  "is_stale": false,
  "computed_at": "2026-08-18T08:00:00Z"
}

The HTTP Request node output panel shows the full JSON. Downstream nodes reference any field via expressions like <code>{{ $json.price }}</code> or <code>{{ $json.computed_at }}</code>.

Common errors

CodeSymptomFix
401HTTP Request node fails with 401 UnauthorizedAPI key missing or invalid. Open Credentials → X-API-Key, paste a fresh key from your dashboard. Verify the credential is selected in the HTTP Request node's Authentication dropdown — Generic Credential Type → Header Auth.
429Sporadic 429 Too Many Requests on the error output branchSchedule cadence is too aggressive or several workflows share the same plan. Hourly is about 720 calls in 30 days; every 15 minutes is 2,880. Reduce the trigger cadence and wait for the API reset guidance before retrying. Persistent failed executions are visible through the node's error output.
N/AWorkflow JSON contains the API key in plaintext after exportYou pasted the key into the URL or a header field instead of using a credential. Delete it, create a Header Auth credential as in step 3, and select it in the Authentication dropdown. n8n does not export credential values; inline values are exported verbatim.
N/AThe manual run works but the hourly workflow never runsThe imported workflow is intentionally inactive. Publish it after the manual credential test succeeds; the Schedule Trigger only fires for a published workflow.

FAQ

How often does the price update?

The spot endpoint can update every 60 seconds. The downloadable workflow runs hourly, and each execution makes one API call. Change the cadence only after checking the monthly quota impact.

Will this fit the free tier with auto-refresh?

Yes at hourly cadence: 24 × 30 is about 720 calls/month, inside the 1,000-call Free tier. Every 15 minutes is about 2,880/month, and every 5 minutes is about 8,640/month. Multiple workflows add together.

Can I use this commercially?

The Free tier is for personal use. For commercial automation (production workflows for clients, services you sell), upgrade to Physical ($10/mo) or Pro ($30/mo) — monthly billing, cancel anytime, no annual lock-in. See /pricing.

Why pin to HTTP Request v4?

The download declares HTTP Request typeVersion: 4.2 and Schedule Trigger typeVersion: 1.2, matching the n8n 2.x workflow export shape used here. Review any migration notice n8n shows after import before publishing.

What metals are supported?

Gold (XAU), silver (XAG), copper (HG) — platinum and palladium are not offered on any tier. Substitute the metal code in the symbol, e.g. XAG-USD-SPOT.

Is the free tier really free?

Yes — 1,000 calls/month, no credit card, no expiration. Get the key at /onboarding.

Can I have Claude write this for me?

Yes. Give Claude the goldprice.dev MCP server and ask: Build an n8n 2.x workflow that calls /v1/spot/XAU-USD-SPOT hourly with HTTP Request v4.2. Use Header Auth for X-API-Key and keep credentials out of the export. Check the imported nodes and test manually before publishing.

Going further

  • Add a Postgres node after HTTP Request to insert {symbol, price, computed_at} rows for time-series analytics
  • Branch on price > threshold via an IF node and trigger a Slack/Discord alert when the alert fires
  • Loop over multiple input items to track gold, silver, and copper in one workflow
  • Wire the error output to a Slack channel so 429s become visible alerts instead of silent failures

Next steps

Try the same setup in a different platform:

Browse all 11 tutorials →