Historical Gold Price Data API

Download historical gold prices for symbol XAU. Retrieve one day or a date range, choose a quote currency and unit, and receive structured JSON for charts, research, and reporting.

GET YOUR API KEY VIEW API DOCUMENTATION

Five-year historical gold price chart

Preview the long-term trend, then use the API to retrieve structured historical gold data.

Five-year historical gold prices chart for XAU
Historical gold price chart updated daily

Use gold price history in everyday decisions

Give finance, pricing, and operations teams a consistent gold price history for valuations, margin reviews, budgeting, and customer reporting. Select the dates, currency, and unit that match the way your business works.

Review valuations

Reference gold prices from a specific transaction or reporting date.

Analyze margins

Compare historical metal costs with product pricing and sales periods.

Build reports

Use consistent XAU data across finance, operations, and customer reports.

Gold pricing capabilities

Use the same reliable gold pricing service for historical analysis, current rates, currency-based reporting, and price-change comparisons.

Historical gold rates

Retrieve XAU spot prices for a specific date or a range of dates.

Explore historical gold rates

Get live gold rates

Access the latest available gold price sourced from a global network of commercial market-data providers.

View the live gold price API

Gold prices in 150+ currencies

Request historical or live XAU prices in the quote currency your business uses.

View supported currencies

Gold price fluctuation

Compare two dates and retrieve the percentage change in the gold price.

Compare gold price changes

Request a historical gold price by date

Put a date in YYYY-MM-DD format in the endpoint path to retrieve that day's historical gold rate. The previous day's rate becomes available at 00:05 GMT and response timestamps use UTC. For the latest available XAU rate instead, use the live gold price API.

Sample historical XAU request

https://api.metalpriceapi.com/v1/2026-07-01?api_key=[API_KEY]&base=USD&currencies=XAU

The JSON response includes the requested date, currency, and gold rate in a structured format your reporting tools or development team can use.

Download a gold price date range

Use the timeframe endpoint for daily historical gold rates between a required start and end date. A single request can cover up to 365 days; split longer histories into consecutive requests.

Gold timeframe request

https://api.metalpriceapi.com/v1/timeframe?api_key=[API_KEY]&start_date=2026-07-01&end_date=2026-07-30&base=USD&currencies=XAU&unit=gram

Results are returned as JSON and can be downloaded for internal analysis or converted to CSV for spreadsheet workflows. Detailed implementation guidance is available when your technical team needs it.

VIEW TIMEFRAME DETAILS

Gold history API parameters and units

Parameter How to use it
start_date First date in a timeframe request, formatted as YYYY-MM-DD.
end_date Last date in the range. The maximum range is 365 days.
base Quote currency for the gold price. It defaults to USD.
currencies Use XAU to limit the response to gold.
unit Gold defaults to price per troy ounce. Paid plans can request troy_oz, gram, or kilogram.
Response format JSON over HTTPS, suitable for saving directly or transforming into CSV.

Historical gold API key features

  • Historical XAU prices for a specific date
  • Date-range requests covering up to 365 days
  • JSON responses with a documented CSV export workflow
  • Gold prices in more than 150 quote currencies
  • Troy-ounce, gram, and kilogram unit options
  • Bank-Level Security with 256-bit SSL encryption
  • Detailed documentation, client libraries, and code samples

Start using historical gold data

Review endpoint details, compare plan limits, or create an API key for your first XAU request.

GET STARTED

Join 12,000+ customers already using MetalpriceAPI. No credit card required.

Publish gold prices on WordPress

Use our free WordPress integration when you also need to display current gold prices on your website.

VIEW WORDPRESS PLUGIN