QVeris
QVERIS GUIDES · GOLD PRICE API

Free Gold Price API: XAU, JSON & Python

Filter gold price APIs by real-time pricing, historical coverage, currencies and units, free quotas, and licensing, then integrate them into apps, dashboards, or agents. Start with a callable XAU/USD tool, cURL and Python requests, and observed gold-price fields. Compare international and China access, data timestamps, and trial credits before your first call.

Original gold API selection diagram: define, compare, validate and integrate; a checklist, not proof of tested historical or live coverage

A gold price API you can start with

For XAU/USD, start with Gold Price Aggregation. The October 21, 2026 end-to-end test returned HTTP 200 and success=true, with price, bid and ask in USD per troy ounce. The request examples below use that exact tool.

  • Free means trial access. QVeris currently lists 1,000 one-time signup trial credits after verification. Each of the two tested calls recorded 1 credit; settlement was still pending at response time.
  • Region changes the setup. The international test used the aggregation tool; the China test used a different MetalpriceAPI tool and endpoint.
  • Latest does not prove real time. The two returned data timestamps differed by 8 hours, 45 minutes, 5 seconds. Neither call establishes an update-frequency guarantee.

All test times on this page are Beijing time (UTC+08:00). These are dated test observations, not a live price feed. Catalog verification remains unverified. See current trial and billing terms.

Open the exact XAU/USD gold price tool

Gold Price Aggregation is the international-region starting point. Use the tool page to inspect its inputs and current billing rule, then obtain a Token for the same region before calling the API.

SettingValue
Tool IDqveris_finance.gold_price_aggregation_v1
Method / endpointPOST https://qveris.ai/api/v1/tools/execute
Parameters{"symbol":"XAU","quote":"USD","limit":1}
AuthenticationAuthorization: Bearer <international-region Token>
Observed resultHTTP 200 · success=true · USD / troy_ounce

Recommended path: this guide → exact tool details → matching-region Token → one request. Use general tool search when you need a different capability, and the Call API documentation for the execution contract.

Call the gold price API with cURL or Python

Configure your international-region Token as the environment variable QVERIS_API_KEY in your local terminal or server. The examples contain no credentials. The cURL and Python snippets are alternatives: each execution sends one billable request.

cURL: one XAU/USD request

bash
: "${QVERIS_API_KEY:?Set the matching region Token in QVERIS_API_KEY first}"
curl --fail-with-body --silent --show-error --max-time 30 \
  --request POST "https://qveris.ai/api/v1/tools/execute" \
  --header "Authorization: Bearer $QVERIS_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "tool_id": "qveris_finance.gold_price_aggregation_v1",
  "parameters": {
    "symbol": "XAU",
    "quote": "USD",
    "limit": 1
  }
}'

Python 3: request and print the returned JSON

Uses only the Python standard library. Save as gold_price.py and run python3 gold_price.py after configuring the environment variable.

python
import json
import os
import urllib.error
import urllib.request

token = os.environ.get("QVERIS_API_KEY")
if not token:
    raise SystemExit("Set QVERIS_API_KEY to your international-region Token.")

payload = {
    "tool_id": "qveris_finance.gold_price_aggregation_v1",
    "parameters": {"symbol": "XAU", "quote": "USD", "limit": 1},
}
request = urllib.request.Request(
    "https://qveris.ai/api/v1/tools/execute",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {token}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=30) as response:
        result = json.load(response)
except urllib.error.HTTPError as exc:
    raise SystemExit(f"HTTP {exc.code}: check the region, credits and parameters.") from exc
except (urllib.error.URLError, TimeoutError) as exc:
    raise SystemExit("Network failure or timeout. Check Usage before retrying.") from exc

if not isinstance(result, dict) or result.get("success") is not True:
    raise SystemExit("Tool execution did not succeed; inspect the response before retrying.")
print(json.dumps(result, ensure_ascii=False, indent=2))

The Python example checks HTTP errors and the API’s success flag, then prints the real response without assuming a nested price-field path. Neither example automatically retries. A timeout can leave the execution outcome uncertain; check Usage before submitting another call. For application retries, respect 429 responses and the documented execution contract.

Gold price JSON: observed values and field meanings

The international test returned price = ask = 4,122.22 and bid = 4,121.72, in USD per troy ounce. The data time was October 21, 2026 at 16:45:04 Beijing time, with commodity_price_api as the source.

The JSON below is a normalized excerpt prepared from the test record, not the complete raw API response. The wrapper keys, currency/unit labels and ISO-formatted Beijing timestamp are editorial normalization. Do not use this excerpt as a wire-schema contract.

Observed values · normalized excerpt
{
  "tool_id": "qveris_finance.gold_price_aggregation_v1",
  "observed_fields": {
    "price": 4122.22,
    "ask": 4122.22,
    "bid": 4121.72
  },
  "currency": "USD",
  "unit": "troy_ounce",
  "source": "commodity_price_api",
  "data_time_beijing": "2026-10-21T16:45:04+08:00"
}
Field / conceptObserved valueHow to read it
price4122.22The returned price; it equals ask in this sample. Do not assume it is a midpoint.
bid / ask4121.72 / 4122.22Returned bid/ask values. Their difference is 0.50 USD per troy ounce in this sample.
Currency / unitUSD / troy_ounceUS dollars per troy ounce of gold, not a price per gram or a jewelry quote.
Data time2026-10-21 16:45:04 +08:00Timestamp associated with the returned data; keep it alongside the value.
Sourcecommodity_price_apiThe source named in this test. Do not relabel it as an exchange benchmark.

Store the raw response as well as your normalized values. Preserve source, currency, unit and timezone, and flag missing or stale data before displaying it as a current quote.

International and China APIs: compare the tested routes

Authentication, search and one data call succeeded in each region in the supplied test record. Tool availability must still be checked separately: an ID lookup in China did not return the international gold aggregation tool.

Test detailInternational regionChina region
ToolGold Price AggregationRetrieve Latest Exchange Rates
API hostqveris.aiapi.qveris.cn
Inputsymbol=XAU, quote=USD, limit=1base=USD, currencies=XAU
Observed statusHTTP 200 · success=trueHTTP 200 · success=true
Data time (Beijing)2026-10-21 16:45:042026-10-21 07:59:59
Single execution durationAbout 0.97 secondsAbout 7.84 seconds
Credit record at response1 credit · settlement pending1 credit · settlement pending

The China result’s data timestamp was 8 hours, 45 minutes, 5 seconds earlier than the international result. This is a comparison of two returned timestamps, not a measured end-to-end market delay. Response duration is also separate from data freshness. The observed China result should not be advertised as real-time gold pricing.

China-region cURL example

Use a China-region Token in QVERIS_CN_API_KEY. The MetalpriceAPI tool details page is on the international website; the tested China API endpoint remains https://api.qveris.cn/api/v1/tools/execute.

bash
: "${QVERIS_CN_API_KEY:?Set the matching region Token in QVERIS_CN_API_KEY first}"
curl --fail-with-body --silent --show-error --max-time 30 \
  --request POST "https://api.qveris.cn/api/v1/tools/execute" \
  --header "Authorization: Bearer $QVERIS_CN_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "tool_id": "metalpriceapi.latest.retrieve.v1.f8ea59a7",
  "parameters": {
    "base": "USD",
    "currencies": "XAU"
  }
}'

Read USDXAU and XAU in the correct direction

Returned rate fields · excerpt
{
  "USDXAU": 4137.5007344064,
  "XAU": 0.0002416918
}

With base=USD, XAU=0.0002416918 is the amount of gold per US dollar, while USDXAU=4137.5007344064 is the reciprocal dollar price per troy ounce. 1 / 0.0002416918 ≈ 4137.5007344064. Never label 0.0002416918 as the USD gold price. See the MetalpriceAPI unit and rate documentation.

This call did not verify CNY per gram, Shanghai gold, jewelry retail prices or historical data. The international catalog also listed commodity_price_api direct access and an NBP today-gold-price tool; neither was executed in this test, so neither is presented here as tested.

Is this gold price API free? Trial credits and billing

As checked on October 21, 2026, the international QVeris pricing page lists 1,000 one-time trial credits after signup verification. Discover and Inspect are free; execution follows the selected tool’s billing rule. The trial is not an unlimited or permanently free gold-price feed. China-region eligibility and offers must be checked in that region’s account.

Both public tool detail pages displayed 1 credit per call when checked. The two successful test calls each recorded 1 credit, but settlement was still pending when the responses arrived. These are observed pre-settlement records, not a claim that final charges have been reconciled.

After trial credits are used, further billable calls require sufficient credits under the account’s current plan or top-up terms. Check the tool rule before execution and Usage or the credits ledger afterward for final settlement. Retries, extra tools and external AI-client fees can add cost.

Live, historical and local gold prices: what is covered?

Is a free live gold price API actually live?

Both calls returned a latest-price result, but the tests did not establish either tool’s refresh interval, maximum delay or market-hours behavior. Check the source timestamp on each response. The catalog’s “Updated” or “Freshness” timestamp describes the catalog entry, not necessarily the gold observation. MetalpriceAPI documents plan-dependent delay; that alone does not identify the upstream plan behind the tested QVeris call. Read the provider documentation.

Can I get free historical gold prices by API?

Historical gold data was not tested. The latest-price request on this page does not establish historical coverage. For a historical workflow, inspect a suitable tool, then verify date range, daily or intraday granularity, gaps, revisions, price methodology, units and cost with a separate test.

Does XAU/USD give me CNY per gram or a local retail price?

No such capability was verified here. A currency or weight conversion is a calculation, not evidence of a Shanghai-market quote or a jewelry store’s retail price. Spot, benchmark, futures and retail datasets have different meanings. The World Gold Council gold-price reference and LBMA Gold Price information help distinguish price methodologies; they are not additional tested QVeris endpoints.

Keep the gold API selection checklist

CheckWhat to confirm
Price definitionXAU spot, benchmark, futures, bid/ask or retail; keep source and methodology explicit.
FreshnessObservation timestamp, stated update frequency, cache behavior and acceptable age.
Units and currenciesUSD per troy ounce versus another currency or weight; verify exchange-rate direction.
Access and costRegion-specific Token, exact tool ID, credit rule, account quota and retry cost.
HistorySeparate endpoint, range, granularity and revisions; not established by a latest-price call.
Usage rightsConfirm the permissions for the intended application and redistribution.

Keep the initial acceptance task small: inspect the tool, run one request, validate the JSON, retain its timestamp and review the final usage record. A successful call is one piece of evidence, not a reliability or licensing guarantee.

Frequently asked questions

Is there a free gold price API I can try?

Yes. The QVeris international gold aggregation tool returned XAU/USD data in the October 21, 2026 test. The international pricing page lists 1,000 one-time trial credits after signup verification. Calls follow the tool billing rule; this is not permanently free access.

Which tool ID should I use for gold prices?

The tested international tool is qveris_finance.gold_price_aggregation_v1 with symbol=XAU, quote=USD and limit=1. The tested China tool is metalpriceapi.latest.retrieve.v1.f8ea59a7 with base=USD and currencies=XAU. Use the endpoint and Token for the matching region.

What does the gold price API return?

The international test returned price and ask of 4122.22, bid of 4121.72, USD per troy ounce, the commodity_price_api source, and a data time of October 21, 2026 at 16:45:04 Beijing time. These are dated observations, not current prices.

Why is the XAU exchange-rate value so small?

For the tested MetalpriceAPI request with base=USD, XAU is gold per dollar. USDXAU is the reciprocal dollar price per troy ounce. Do not use the XAU rate directly as a USD gold price.

Is the China-region gold price API real time?

The China call succeeded, but its data timestamp was about 8 hours 45 minutes earlier than the international sample. That test does not support a real-time claim or establish a fixed update schedule.

Does this example include historical gold data?

No. Only one latest-price call per region was tested. Historical data, CNY per gram, Shanghai gold and jewelry retail prices need separate capability checks and tests.

How much did each test call cost?

Each test recorded 1 credit and each detail page displayed 1 credit per call when checked. Settlement was pending at response time; final charges were not reconciled in the supplied test record. Review Usage or the credits ledger for the final amount.

Does a successful call mean the tool is production-certified?

No. The catalog verification_status remains unverified. One successful call demonstrates that request at that time; it does not establish continuous availability, formal certification or commercial redistribution rights.

Test scope and sources

Updated October 21, 2026. The two-region execution results above come from the supplied end-to-end test record: successful authentication and discovery, then one actual query in each region. This page revision rechecked the public guide, tool details, pricing and call documentation; it did not repeat paid data calls. No Tokens are included.

Both tool detail URLs returned HTTP 200 with matching titles and tool IDs. Their catalog status remained unverified. A single successful query does not establish continuous availability, formal certification or commercial redistribution rights. The test record does not include complete raw responses or a final settlement audit.

The retained whiteboard illustration is a selection workflow, including checks for live and historical needs; it is not evidence that every pictured capability was tested.

Try one gold price request

XAU / USD · Live Demo

Open the international gold aggregation tool, set symbol=XAU, quote=USD and limit=1, review the current billing rule, then run one request. Check price, bid/ask, unit, source, data time and final credit usage.

The button opens the tool’s existing execution section. It does not prefill parameters or run a request automatically; enter the values above before selecting Run Call.